Endpoint · extractionPOSTapi.geoprimitives.dev /v1/geometry/centroid
Find the area centroid of a polygon: a representative point for labelling, joining, or reverse geocoding a shape you only have a boundary for.
Read more
Find the area centroid of a polygon: a representative point for labelling, joining, or reverse geocoding a shape you only have a boundary for. It is the centre of mass of the area with holes subtracted, not the average of the vertices, so densely sampled edges do not drag it. Know what a centroid is not: on a concave or ring-shaped polygon the centre of mass can fall outside the polygon itself, and this endpoint returns it anyway rather than nudging the point inside. Test it with POST /v1/pip if you need a point that is guaranteed to be inside. Not turf's centroid, which is the arithmetic mean of the vertices and drifts towards whichever part of the boundary happens to be densely sampled. The moment integral is evaluated in a Lambert cylindrical equal-area projection of the WGS 84 authalic sphere, so the cos(latitude) area weighting is right at high latitude, then inverted back to longitude and latitude. Non-areal input, and polygons that enclose zero area, fall back to the vertex mean and say so in the method field. Input is EPSG:4326 only. Limits: 100000 positions across the whole document, 1 MiB request body.Overview
Grade?
UNRATED
0 of 30 paid calls toward a letter
Price
$0.01 per call
Paid calls
none yet
delivery unknown until someone pays
More info
Seller?
URL
https://api.geoprimitives.dev/v1/geometry/centroid
Seen
first 34 days ago · last 14 days ago
51 free handshakes
Payment
Pays through
— never asked
Offered on?
— never asked
Listed on?
Base
Paid calls
No paid calls yet.
Delivery is unknown until someone pays. A handshake only shows it asks for payment.
Paid for on the same host1 of 21 endpoints at api.geoprimitives.dev
| Endpoint | Grade | Paid calls | Last result | Last seen |
|---|---|---|---|---|
| GET /v1/marine/depth?lat=57.0405&lon=-135.3421 | UNRATED | 2 | delivered | 12 hr ago |
Verify it yourself
npx teppi-check https://api.geoprimitives.dev/v1/geometry/centroidcurl -s https://api.teppi.xyz/v1/trust/cap_01M1A59RX1FYXQ84DVHM52V1EF