3

I'm converting layers from shape files to postgis with the below command:

shp2pgsql -s 22175 -c  -W "latin1" path/file.dbf' table_name db_name | psql -d db_name

Next, I add this layer to the GeoServer but the field native SRS is empty. I thought that the SRID were wrong so I run:

SELECT ST_SRID(geom) FROM table_name;

And to my surprise I get 22175 the conversion is not the problem. What I am doing wrong?

Note: already exits other layers have been added (by someone else) and that layers have the field native SRS filled with value EPSG:22175.

What am I doing wrong?

  • did you check the geometry_columns table? – Ian Turton Jun 6 '13 at 15:20
  • The table is empty. But if this is the problem, why the others layers works? – Overflow012 Jun 6 '13 at 15:24
1

In my experience the native SRS field is empty usually because the user, as which Geoserver is accessing the database, does not have at least SELECT rights to the table.

  • Either the table, or the metadata views/tables. – Alex Leith Jul 9 '17 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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