Saturday, 5 May 2018

Opening GeoJSON file with mixed geometries in QGIS?


If I have a GEOJson file, for example a file named test.js with inside the following:


{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
"properties": {"prop0": "value0"}
},
{ "type": "Feature",

"geometry": {
"type": "LineString",
"coordinates": [
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
]
},
"properties": {
"prop0": "value0",
"prop1": 0.0
}

},
{ "type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
[100.0, 1.0], [100.0, 0.0] ]
]
},
"properties": {

"prop0": "value0",
"prop1": {"this": "that"}
}
}
]
}

how to open it with QGIS?


I open QGIS, press "add vector layer", choose "File" but I am not able to open it.


If I choose GEOJson format, my file is not showed in browser window.



If I do not specify input type, I get the error: "your file is not valid or recognized data source".


How have I to format this file?


It seems there is a lack of documentation about this topic.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...