Skip to main content

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​

PortTypeTakes
intableone edge

Parameters​

This operator has no parameters.

Outputs​

PortType
outtable

Details​

Older projects​

Projects saved before documents used operator classes. These convert to centroid when they open: CentroidOp.