Open ex3ndr opened 6 years ago
I'd just make a Python script calling the prepair binary. Like here for another project of ours that does the same: https://github.com/tudelft3d/val3dity/blob/master/tools/python/gml2poly/val3dity.py#L119
Hope that helps, Hugo
Thanks for the fast reply, but invoking 800k times is not very fast. (i am trying to fix polygons of all parcels in NYC). Actually it takes 2 hours at least. May be simple change can make file-based WKT processing not only for the first line, but for all of them?
hmmm, but if you have a SHP then all are repaired (option --ogr
):
$ ./prepair --shpOut --ogr data/CLC2006_180927.geojson
Documentation is unclear that this is possible. There are some strange words that shp is multipolygon. I assumed that this will be the one.
MultiPolygons are more complex to repair, and we simply process each Polygon them separately, and there's a warning.
Your library is awesome and the only thing on the internet that can be used easily to fix shapes from various datasets.
The only thing it is lacking is batch processing. Invoking this for each file is just too slow. Is there any way to use it for batch processing?