3

I need to import geojson files into a local PostgreSQL9.6 database on OSX system.

ogr2ogr -f 'PostgreSQL' PG:"dbname=crossmap user=duccioa" "multigraph.geojson" -nln paris.multilayer

Ogr2ogr gives this error:

ERROR 1: Unable to find driver `PostgreSQL'

My GDAL2.1 library have been installed using kyngchaos binary.
I saw there are other posts on the topic but none of them resolved my problem. One issue is that I cannot figure out how to unistall the library (for example to reinstallit with HomeBrew).
The import used to work, I don't understand what went wrong at one point. The only thing I can think of is the installation of the latest version of QGIS 2.18.

Duccio A
  • 427
  • 6
  • 12
  • http://www.gdal.org/formats_list.html and http://www.gdal.org/drv_pg.html might be helpful – RutgerH Nov 17 '17 at 12:57
  • 1
    On Unix (MacOS/Linux) you can use gdalinfo --formats to check your available drivers for rasters and ogrinfo --formats for vectors. If PostGres is not listed there you need to reinstall with postgres support: https://gis.stackexchange.com/questions/33346/how-can-i-update-ogr2ogr-to-include-the-postgresql-driver – RutgerH Nov 17 '17 at 13:03

1 Answers1

0

Please refer to the answer in here https://github.com/OSGeo/homebrew-osgeo4mac/issues/1291#issuecomment-574170548

IamMashed
  • 116
  • 3