Hi All,
Devdatta posted on another thread a python program he made for converting even lines and polygons to .geojson format and it extracts the metadata too.
Coincidentally I was also making something along the same lines over the weekend and didn't notice the update there.
So here's another path up the mountain:
We've worked with different libraries, and I'm posting mine too for these reasons:
- I've used a 'feedparser' module that does most of the grunt work of converting the XML to geojson formatted objects. Which gave me time to:
- Used geojson and geojson_utils packages that can be taken forward for programmatically doing GIS-type operations like merging separated parts into multi-polygon (which is something mentioned about Bhuvan's data), computing distance and area, detecting intersections etc
- Parsed the numbers in the metadata even if they're like: "-3.34e-4". So the output .geojson shapefile has numeric fields if the metadata was carrying it, one can directly use them to render choropleth etc.
See a bad example.
- Did a "right hand rule" rectification that was needed to produce valid GeoJSON that checks out on
geojsonlint.com . (not critical but some places still need it)
- Save an additional CSV where the metadata is laid out in a neat table, and if it's a point locations file, then the csv will have lat-long columns and can be used directly for mapping, like I did with the asi-monuments data
previously.
I've made it in a python 3
Jupyter Notebook; We could make this into a user-friendly website or a EXE program that runs on windows, but that will take some work. Contact if interested.
Extra:
1. Here's a site that makes embeddable choropleth maps without coding needed, and can import the numbers from outside:
https://app.datawrapper.de (yes, QGIS can do it too, but single-task-focus brings user-friendliness)