Questions tagged [shp2pgsql]

Command line tool for converting shapefiles into database tables.

shp2pgsql is a command line tool that converts a shapefile into a series of SQL commands that can be loaded into a PostGIS/PostgreSQL database. The output of this command can be captured in a SQL file or piped directly to the psql command, which will execute the commands against a target database. The tool is included in PostGIS.

71 questions
5
votes
0 answers

pgAdmin does not integrate shp2pgsql in menu

Recently I updated my pgAdmin to 4, and I still want to use PostGIS Shapefile Import/Export Manager. I did not find any method to make this happen and even if shp2pgsql-gui still works outside pgadmin, this does not appear on pgAdmin's menu. Am I…
marina_d
  • 59
  • 1
1
vote
0 answers

shp2pgsql no more AddGeometryColumn() function?

Problem: I encounter a fresh error when using shp2pgsql on Ubuntu 18.04. This commands worked a few months ago: $ sudo shp2pgsql -s 4326 /path/to/myshapefile.shp | psql -h localhost -p 5432 -d databasename -U postgres Field height is an FTDouble…
swiss_knight
  • 10,309
  • 9
  • 45
  • 117
1
vote
1 answer

shp2pgsql dumping double fields with comma separator instead of dot

I guess the source shapefile is the culprit, but is there any way to change to fix it through shp2pgsql? Obviously Postgres throw an error with: INSERT INTO "public"."a" ("area","perimeter", ...) VALUES ('5282,98830007762','313,033597376014', ...);
jpp1jpp1
  • 11
  • 1
0
votes
0 answers

Changing only schema, from public to another, with shp2pgsql

For example shp2pgsql myGeoms.shp | more produce a SQL script that creates and inserts values into a public.MagicName table. I need to preserve MagicName and change only public to mySchema... Is it possible? the -h summary say to use something…
Peter Krauss
  • 2,292
  • 23
  • 43