I'd like to get the centroid of a set of polygons with SRID 4326
I start from this simple query to verify the ST_Centroid
function
CREATE TABLE test AS
SELECT ogc_fid, geom, ST_Centroid(geom) centriod_geom
FROM s_table
However, when I check the SRID of two geometry columns in the test
table, it appears the SRID of centriod_geom
changes to 0.
SELECT Find_SRID('public', 'test', 'geom');
SELECT Find_SRID('public', 'test', 'centriod_geom');
geometry column | find_srid |
---|---|
geom | 4326 |
centriod_geom | 0 |
What should I do if I need the centriod_geom
to be 4326?