1

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.

  1. PostgreSQL-9.4.17
  2. Postgis 2.4.3
  3. GDAL 1.10.1
  4. Ubuntu 14.04
  5. I've edited my pg_hba.conf to "trust"
  6. I've created a table, granted all permissions, created password for superuser postgres. I'm able to import other SQL files
  7. Edited permissions on the geojson file I want to import
  8. 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 .

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Mar 11, 2018 at 20:17
0

1 Answer 1

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.

answered Mar 12, 2018 at 4:06
2
  • 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. Commented Mar 13, 2018 at 11:21
  • Will do when I get the chance Commented Mar 14, 2018 at 18:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.