Having read everywhere as to the cause of these errors I'm at a loss. Trying to import geojson Point data into a new PostgreSQL database with the POSTGIS extension enabled.
- PostgreSQL-9.4.17
- Postgis 2.4.3
- GDAL 1.10.1
- Ubuntu 14.04
- I've edited my pg_hba.conf to "trust"
- I've created a table, granted all permissions, created password for superuser postgres. I'm able to import other SQL files
- Edited permissions on the geojson file I want to import
- GeoJSON is valid
The issue comes when I try to import a geojson file using ogr2ogr
ogr2ogr -f "PostgreSQL" PG:"dbname=dbname user=postgres" "file.geosjon" -nln tableName
And all i get in response is:
Segmentation fault (core dumped)
Using pgadmin if I inspect the table it imports all the correct column headers but no actual data.
I'm thinking its a permission issue or version issue after reading this .
1 Answer 1
Turns out the geojson wasn't formatted properly. Had empty arrays as property values...really wish gdal and ogr2ogr had better documentation or error logging. Oh well.
-
GDAL should never crash. Please create a ticket at trac.osgeo.org/gdal and attach some faulty GeoJSON data. Alternatively you can write mail to gdal-dev mailing list.user30184– user301842018年03月13日 11:21:19 +00:00Commented Mar 13, 2018 at 11:21
-
Will do when I get the chancetasty– tasty2018年03月14日 18:06:33 +00:00Commented Mar 14, 2018 at 18:06