Sunday, 15 March 2015

Merging/Joining GeoJSON and JSON?


I want OSM administrative boundaries from http://global.mapit.mysociety.org/area/14455.html. I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I want them both in just one file, or to be able to merge the information.


I haven't found a solution to merge the GeoJSON.


What's the workflow to get the two files joined and saved as a shapefile, for example?



Answer



You can simply use this python script to merge the jsons together.



Then, it's your personal preference for how to convert it into a shapefile.


You can go with ogr2ogr like:


ogr2ogr -f "ESRI Shapefile" output.shp raw.geojson

or if you're more comfortable with a GUI, you can open the json in qgis and save as a shapefile.


No comments:

Post a Comment