GeoJSON Centroid

Compute the arithmetic mean (vertex centroid) of every position contained in GeoJSON.

Description

Compute the arithmetic mean (vertex centroid) of every position contained in GeoJSON.

GeoJSON Centroid: Compute the arithmetic mean (vertex centroid) of every position contained in GeoJSON.

When to use GeoJSON Centroid

Use this GeoJSON operation to summarize valid geometry for display, indexing, or further spatial processing while retaining the original feature coordinates.

GeoJSON
GeoJSON geometry, feature or collection.

How GeoJSON Centroid works

Compute the arithmetic mean (vertex centroid) of every position contained in GeoJSON. The tool evaluates the supplied inputs together and returns the named outputs below; it does not infer omitted operating conditions or change the units shown.1

Longitude
Mean longitude of all vertices.
Latitude
Mean latitude of all vertices.

Limitations and assumptions

  • GeoJSON uses longitude-latitude coordinates in WGS 84 and planar shortcuts can mis-handle the antimeridian, poles, holes, invalid rings, mixed geometries, and large extents. A vertex mean is not always a geometric or geodesic centroid.
  • Use finite inputs in the displayed units and preserve more precision than the final presentation requires. Independently verify safety-critical, financial, compliance, or production decisions.

Alternative or Complementary approaches

Validate geometry, normalize longitude handling, and use a geospatial library with an appropriate projected or geodesic method for precision analysis.

References

  1. GeoJSON — Wikipedia contributors

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies