PostGIS with MAPublisher and QGIS
This is a personal note-to-self more than a “how to”. Using PostGIS on a Mac seems easier than it used to. Installation of Postgres is straight forward using the installer and instructions available from postgresapp.com, and managing the data using pgAdmin works well and is well documented. Adding PostGIS extensions is straight forward. (such as CREATE EXTENSION postgis;). Installation is shown at around minute 5 in the video.
Why I might use PostGIS
By using a postgres/postgis database, I can keep a consistent dataset that is available to both QGIS and Adobe Illustrator using MAPublisher. I can’t do this using a geopackage at the moment.
Postgres/PostGIS also offers access to geometry functions, though some of this can be done within a geopackage. GeoPackage Routing: Executing Advanced Analysis Offline | OGC.
Caveats for M1 Chip use – January 20, 2021
I’m installing on a new Macbook Pro with an M1 Processor. The installer for osm2pgsql, located at Installation – osm2pgsql, doesn’t seem to be working on an Arm Processor. But maybe it will soon. Here’s the github note.
I’m not sure about running the TIGER Geocoder. I was thinking about this for analyzing Pennsylvania Voter Data when I feel like geocoding millions of addresses by block.
Creating a database with PostGIS using pgAdmin
Adding PostGIS extensions
- CREATE EXTENSION postgis;
- CREATE EXTENSION postgis_raster;
- CREATE EXTENSION fuzzystrmatch; (probably not needed)
Download and Add shapefiles
- database name,
- the user id,
- localhost (127.0.0.1),
- port 5432.