Recently I have updated my postgresql version. I have also upgraded pgAdmin from 3 to 4. But I was unable to load shapefile. I didn't find any plugin called shapefile loader. How can I get the shapefile loader plugin in pgAdmin 4?
-
2pgadmin 4 seems to be inferior to its predecessor regarding performance, menu design and features. I use qgis to load shapefiles to postgis– hilpersNov 11, 2016 at 15:48
-
@hilpers Would you please state a procedure or any tutorial link of how to load through QGIS– Devils DreamNov 15, 2016 at 8:04
-
2@DevilsDream have a look here at point 2.5: docs.qgis.org/2.0/de/docs/training_manual/databases/…– fidelfischNov 20, 2016 at 17:21
-
1Pgadmin 4 is trash, try and continue using pgadmin3, ogr2ogr or the db manager in QGIS– ziggyAug 2, 2018 at 21:23
6 Answers
I also had to upload a shapefile to postgresql and found this solution perfect. Navigate to the given path
"C:\Program Files\PostgreSQL\9.6\bin\postgisgui"
Run the gui file "shp2pgsql-gui.exe"
and a PostGIS Shapefile Import/Export Manager
will appear. Here you can import shapefile from a specified path.
-
1For convenience, I pinned this to the start menu to save hunting for it again. Apr 6, 2017 at 10:30
-
1
-
@banbar I used the below procedure to use pgShapeloader with pgAdmin 4 on Mac– blabbathJun 13, 2018 at 6:29
The other answers on this question so far doesn't cover the linux case. So, for linux users and in general for all other platforms, we can use QGIS to import shapefile to PostGIS or anyother spatial database.
Open QGIS, In top navigation bar, choose Database from the menu, select DB Manager.
Simply, connect to your database and choose import Layer/file option to import shapefile to database
original answer can be found here
Another option (for MacOS) is to download the Opengeo Suite 4.8 from here http://mac.softpedia.com/get/Developer-Tools/OpenGeo-Suite.shtml.
Then only pull the PostGIS Utilities to your applications folder. You can then delete the pgAdminIII App and just use the pgShapeLoader. Works with pgAdmin4 too.
After that, follow instructions from this Boundless tutorial:
http://postgis.net/workshops/postgis-intro/loading_data.html
I don't know if or how this is working for Windows.
I am running postgres 10.4 with pgAdmin4 on MacOS 10.13.
I use pg Admin 4 and I have got the shapefile DBF loader that works perfectly and I access it through the start menu. Whereas with pg Admin 3 it is under plugin on the GUI but not with pg admin 4. pg Admin 4 is not trash, it is perfect and works perfectly. I use both 3 and 4. Please ensure that you install the software correctly with all the necessary tools.
-
1I also use Pgadmin 3 and Pgadmin 4. I would say that Pgadmin 4 is inferior to Pgadmin 3 because it's less intiutive for me and there is a lot of unnecessary design and menus whereas pgadmin 3 is cleaner and faster to load. But indeed, with a correct setup, you have the DB loader plugin in both versions. Oct 4, 2019 at 11:48
I had the same problem and used the shp2pgsql-gui.exe that you can find at C:\Program Files\PostgreSQL\9.6\bin\postgisgui, it works fine.
Append the following on plugins.ini file and restart pgAdmin this should fix it!
;PostGIS shp2pgsql-gui (Windows):
;
Title=PostGIS Shapefile and DBF loader
Command="$$PGBINDIR\postgisgui\shp2pgsql-gui.exe" -h "$$localhost" -p $$5432 -U "$$postgres" -d "$$YOUR_DB_NAME" -W "$$YOUR_PASSWD"
Description=Open a PostGIS ESRI Shapefile or Plain dbf loader console to the current database.
KeyFile=$$PGBINDIR\postgisgui\shp2pgsql-gui.exe
Platform=windows
ServerType=postgresql
Database=Yes
SetPassword=Yes