从json创建几何体时Gdal崩溃

时间:2016-04-18 18:17:40

标签: python json gdal ogr

我想从geojson文件创建几何体。 我在python 2.7中使用json库加载文件,然后使用此line

point = ogr.CreateGeometryFromJson(geojson)

转换。

此行来自ogr库,该库取决于GDAL库(版本GDAL / OGR 1.11.3-1) 当我运行这一行时,python崩溃了。我只得到Segmentation fault: 11

geojson看起来像这样:

"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 ] } }
}]

0 个答案:

没有答案