How to load an ESRI Shapefile into a PostGIS DB
Assuming a shapefile called myshapefile.shp, a table mytable in schema xyz, in a PostGIS enabled database called mydb on localhost. The table is owned by user dbuser who has password “secret”. Using shp2pgsql shp2pgsql myshapefile -I xyz.mytable > statements.sql psql…