Please don’t use assert for validation [1]. Just explicitly raise an exception instead, as Python can strip asserts and an AssertionError is a crap thing to have to catch.
In Python you almost never have to do “for i in range(len(…))”, just do “for path in file_path” [2].
I’ve been using GeoJSON for indoor robotics mapping efforts for about 9 years now and it is a fantastic fit. One thing that kind of sucks is technically the standard insists that the CRS is degrees on an ellipsoid. But I use metres on a flat land.
Luckily most, but not all, tools are okay with this.
This looks useful, the flipped coords is something that will come in handy. And validate too, sometimes I want to know what is wrong for one feature so I can fix the script that is fetching/generating.
Looks useful. I ran into some invalid geojson some time ago. Apparently clock wise vs. counter clockwise direction of coordinates in outer polygons and their holes is a thing. So are self intersecting polygons. There are multiple issues that prevent some products to function properly. E.g. Elasticsearch is particularly picky when it comes to this. I had some polygons that rendered perfectly fine that it still found reason to reject. There is a lot of bad data out there.
In Python you almost never have to do “for i in range(len(…))”, just do “for path in file_path” [2].
1. https://github.com/yazeed44/gjf/blob/b85f4e58fe6ed84b5d2f813...
2. https://github.com/yazeed44/gjf/blob/b85f4e58fe6ed84b5d2f813...