ST_Centroid for geography
|Reported by:||Mike Taves||Owned by:||robe|
The idea is to determine the centroid of a geography with this signature:
CREATE OR REPLACE FUNCTION ST_Centroid(geog geography, use_spheroid boolean DEFAULT true) RETURNS geography AS '$libdir/postgis-2.2', 'geography_centroid' LANGUAGE c IMMUTABLE STRICT COST 100;
Currently, GEOS computes the geometry centroid, so some of this would need to be recreated in liblwgeom using lengths and areas on either a sphere or spheroid. This enhancement would require a reliable geodesic area calculation using GeographicLib (#2918).
Single or multipart Point, Line, and Polygon geography objects will be considered.