* New Features *
+ - #2951, ST_Centroid for geography (Danny Götte)
- #3788, Allow postgis_restore.pl to work on directory-style (-Fd) dumps
(Roger Crew)
- #3772, Direction agnostic ST_CurveToLine output (Sandro Santilli / KKGeo)
<refsynopsisdiv>
<funcsynopsis>
- <funcprototype>
- <funcdef>geometry <function>ST_Centroid</function></funcdef>
+ <funcprototype>
+ <funcdef>geometry <function>ST_Centroid</function></funcdef>
+
+ <paramdef><type>geometry </type>
+ <parameter>g1</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>geography <function>ST_Centroid</function></funcdef>
+
+ <paramdef><type>geography </type>
+ <parameter>g1</parameter></paramdef>
+ <paramdef choice="opt"><type>boolean </type>
+ <parameter>use_spheroid=true</parameter></paramdef>
+ </funcprototype>
- <paramdef><type>geometry </type>
- <parameter>g1</parameter></paramdef>
- </funcprototype>
</funcsynopsis>
</refsynopsisdiv>
</para>
<para>New in 2.3.0 : support <varname>CIRCULARSTRING</varname> and <varname>COMPOUNDCURVE</varname> (using CurveToLine)</para>
+ <para>Availability: 2.4.0 support for geography was introduced.</para>
+
<para>The centroid is equal to the centroid of the set of component
Geometries of highest dimension (since the lower-dimension geometries
contribute zero "weight" to the centroid).</para>
gserialized_estimate.o \
geography_inout.o \
geography_btree.o \
+ geography_centroid.o \
geography_measurement.o \
geography_measurement_trees.o \
geometry_inout.o \
RETURNS int4
AS 'MODULE_PATHNAME', 'LWGEOM_get_srid'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-
+
-- Availability: 2.2.0
CREATE OR REPLACE FUNCTION ST_SetSRID(geog geography, srid int4)
RETURNS geography
AS 'MODULE_PATHNAME', 'LWGEOM_set_srid'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-
------------------------------------------------------------------------------
+
+-- Availability: 2.4.0
+CREATE OR REPLACE FUNCTION ST_Centroid(geography, use_spheroid boolean DEFAULT true)
+ RETURNS geography
+ AS 'MODULE_PATHNAME','geography_centroid'
+ LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
+-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
+CREATE OR REPLACE FUNCTION ST_Centroid(text)
+ RETURNS geometry AS
+ $$ SELECT ST_Centroid($1::@extschema@.geometry); $$
+ LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
+
+-----------------------------------------------------------------------------