0

I want to create a geometry from a geojson file. I load the file with the json library in python 2.7, then use this line

point = ogr.CreateGeometryFromJson(geojson)

to convert.

This line is from the ogr library which depends on the GDAL Library (Version GDAL/OGR 1.11.3-1) When I run this line, python crashes. I only get Segmentation fault: 11.

The geojson looks something like this:

"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "someCRS" } },

"features": [
{ "type": "Feature", "properties": { "value1": "x", "value2": 886, "value3": 0, "value3": "y", "value4": "9878665", "value5": "91", "altitude": 0.000000, "feature": "y", "id": 4, "value6": 0, "value7": "xyz", "value8": 883645, "value9": 3.024 }, "geometry": { "type": "Point", "coordinates": [ 1, 1 ] } }
}]
four-eyes
  • 10,740
  • 29
  • 111
  • 220

0 Answers0