pgadmin-org / pgadmin-org/pgadmin4
Add Utility to Import/Export Shapefiles
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Describe the solution you'd like
The PostGIS extension allows users to import ESRI shapefiles into tables. However, the process for doing so is inconsistent across platforms. On Windows, PostGIS includes a shapefile import/export manager application. But that application isn't available on macOS and Linux, which means users must run the shp2pgsql command-line utility, which is cumbersome due to the multiple arguments it requires.
Given that pgAdmin already allows users to import CSV and text files to tables by running COPY in the background, it would be nice if pgAdmin did similar by providing a GUI interface for shp2pgsql. Given that pgAdmin includes a helpful GIS viewer, this would make pgAdmin even more useful for GIS developers.
Describe alternatives you've considered
Can continue to use existing methods on Windows and macOS.
Additional context
I may be mistaken but I believe pgAdmin 3 had a plugin for this purpose.
This is a screenshot of the PostGIS shapefile loader, which is available for Windows but not macOS or Linux:
PgAdmin would need to detect whether a database has the PostGIS extension installed and thus has access to shp2pgsql.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pgAdmin's existing CSV and text-file import flow that runs COPY in the background, then examine how shp2pgsql availability could be detected for PostGIS databases. Done means a cross-platform GUI supports shapefile import/export and avoids requiring users to assemble shp2pgsql arguments manually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100