Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


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

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


share|improve this question
Could you show how you created the geometry? Just cut-n-paste the exact text. – BradHards Dec 4 '12 at 8:34
i'm not creating it, it's already in the DB, i just need to figure out the correct SRID of these geometries. thanks – Kourosh Dec 4 '12 at 8:36
My guess is you're choosing the wrong column, or the column wasn't built correctly. However you need to tell us more. Can you run "\d myTable" in the psql console? – BradHards Dec 4 '12 at 8:40
the column is "geom - geometry(MultiPolygon)" – Kourosh Dec 4 '12 at 8:45
up vote 4 down vote accepted

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.

share|improve this answer
Juan, this means I need to remove the current geometry column and create a new one? is it possible to fix the current column? thanks – Kourosh Dec 4 '12 at 10:19
You don't need to remove the current geometry column. Just update the GEOMETRY_COLUMN entry with the actual SRID or if no entry in that table exists, insert a new row with your geometry column data (schema, table name, column name, srid, geometry type). It will help if you post the ouput of "\d myTable" in the psql console as @BradHards suggested. – juanluisrp Dec 4 '12 at 10:50
@juanluisrp, it looks like AddGeometryColumns() was not applied to some fields in my table, but everything works fine except Find_SRID(). What are the other benefits of applying AddGeometryColumns() ? – vak Sep 17 '15 at 12:29
@vak simply you don't need to manually do all the configuration that AddGeometryColumns() does. – juanluisrp Sep 22 '15 at 10:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.