Centroid
Each feature as a point at its center of mass, keeping its properties. turf.centroid averages a feature's vertices instead; the two differ for uneven shapes.
Syntax
{ "id": "n1", "op": "centroid", "name": "centroid", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out".
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | one edge |
Parameters
This operator has no parameters.
Outputs
| Port | Type |
|---|---|
out | table |
Details
- Category: Geometry
- Operator:
centroid
Older projects
Projects saved before documents used operator classes. These convert to centroid when they open: CentroidOp.