Import shape file into postgis?

13,694

Solution 1

Disclaimer: I know this isn't a valid answer, but I don't have the reputation to comment.

I'd strongly recommend QGIS for this. The import dialog that comes with the Database Manager is rather great. First load the shapefile into QGIS and add a new connection via the "Add PostGIS Layers" button (elephant icon) on the left > "New". Then go to Database > DB Manager > DB Manager, select the newly created connection and open the import dialog (down arrow icon).

If you're into command line tools try ogr2ogr (http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet)

Solution 2

I just found this. It works perfectly:

"C:\Program Files\PostgreSQL\9.6\bin\postgisgui\shp2pgsql-gui.exe"

Share:
13,694
Henrik K
Author by

Henrik K

Updated on June 11, 2022

Comments

  • Henrik K
    Henrik K almost 2 years

    I can find multiple tutorials that show how to import shapefiles to postgis via pgAdmin-3. But pgAdmin-3 is no longer supported.

    How to do this with pgAdmin-4?