1

I'm trying to import a Shapefile into PostGIS using the ogr2ogr, but it seems that the OGR is not automatically getting the EPSG from Shapefile.

My Shapefile has EPSG 4618, but the table created by ogr2ogr has EPSG 900914.

The code I'm using is as follows:

ogr2ogr -append -f "PostgreSQL" PG:"host=x dbname=x user=x password=x" points.shp -nln points -skipfailures -lco FID=id -lco GEOMETRY_NAME=geom

Anyone has any idea what's going on? Because the files (* .dbf, * .shx and so on) are in the same folder of the * .shp file.

I send below two print screens: one from shapefile and the other from PostGIS, showing the EPSG of each one, that are different, but they should be equal.

Shapefile: enter image description here

PostGIS: enter image description here

The content of .prj file is:

GEOGCS["SAD69",DATUM["D_South_American_1969",SPHEROID["GRS_1967_Truncated",6378160,298.25]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
  • 1
    Maybe this will help (follow Elzouavo's post from Oct 25, 2012; 2:34am; let us know if it helps): osgeo-org.1560.x6.nabble.com/… – Andre Silva Jun 17 '18 at 2:02
  • 2
    Please add the contents of the .prj file into your question. – user30184 Jun 17 '18 at 6:22
  • Thank you Andre, it seems the same error. Do you know how to delete the 900914 entry? When I searched by EPSG 4618, it was found in the spatial_ref_sys and when I searched by the EPSG 900914, it was not found in the spatial_ref_sys. user30184, I added the .prj in the question. – rmmariano Jun 17 '18 at 19:01

Your Answer

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

Browse other questions tagged or ask your own question.