I have an urgent and annoying need to run some Node.js code to fix GeoJSON polygons to conform to the "right-hand rule", but I'm a Python person. Anyone have experience integrating Node.js and Python?
I'm looking at installing this:
The Node.js code I need to use is this: https://github.com/mapbox/geojson-rewind
I'm wondering if it would just be easier to port that code into Python. I expect the need to fix GeoJSON again in the future, so this will come up again. Sadly, I'm not well versed in Node.js enough to really understand how the geojson-rewind code works.
I'm also not a totally awesome programmer. I'd much rather use someone else's code than my own, since I'm sure someone else would do it better.
@ekansa the algorithm is pretty simple to determine if they're inside out https://stackoverflow.com/a/1165943 .
@ekansa (then if it's inside out just reverse the order of the points). If you just need to fix actual files, the geojson-rewind thing can be ran as a command line tool according to the README