2

sorry it's google translate An error occurred while importing data into PostGIS using shp2pgsql. Among multiple shp files, an error occurs only in data with "" special characters.

enter image description here

The command I used is this

shp2pgsql -s 3857 -W UTF-8 -I -c -g the_geom C:\data\vector01.shp test_tb | psql -h localhost -p 5432 -U user -d dbname

But when I run it with shp2pgsql-gui.exe, there is no problem

1
  • Assuming you've been able to make the conversion using the GUI version, this might make a good bug report (after you create a minimal reproducible example)-- or is there a reason you can't use the GUI version? Commented Aug 22, 2022 at 12:12

1 Answer 1

0

whenever you run command line tools, enclose your filename in double quotes, like this:

shp2pgsql -s 3857 -W UTF-8 -I -c -g the_geom "C:\data\vector01.shp" test_tb | psql -h localhost -p 5432 -U user -d dbname

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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