PostGIS SRID – Why Does Find_SRID Return Zero?

coordinate systempostgispostgresqlsrid

using

SELECT Find_SRID('public', 'myTable', 'myColumn');

I get zero as the result, what does it mean?

Best Answer

From Postgis doc:

The syntax is find_srid(, , ) and the function returns the integer SRID of the specified column by searching through the GEOMETRY_COLUMNS table. If the geometry column has not been properly added with the AddGeometryColumns() function, this function will not work either.

So you shoud have a row in GEOMETRY_COLUMNS table for F_TABLE_SCHEMA 'public', F_TABLE_NAME 'mytable' and F_GEOMETRY_COLUMN 'mycolumn' where the SRID is 0. You can update this row with the correct SRID.

Related Question