Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch processing? #31

Open
ex3ndr opened this issue Mar 21, 2018 · 5 comments
Open

Batch processing? #31

ex3ndr opened this issue Mar 21, 2018 · 5 comments

Comments

@ex3ndr
Copy link

ex3ndr commented Mar 21, 2018

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?

@hugoledoux
Copy link
Member

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

@ex3ndr
Copy link
Author

ex3ndr commented Mar 21, 2018

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?

@hugoledoux
Copy link
Member

hmmm, but if you have a SHP then all are repaired (option --ogr):

$ ./prepair --shpOut --ogr data/CLC2006_180927.geojson

@hugoledoux hugoledoux reopened this Mar 21, 2018
@ex3ndr
Copy link
Author

ex3ndr commented Mar 21, 2018

Documentation is unclear that this is possible. There are some strange words that shp is multipolygon. I assumed that this will be the one.

@hugoledoux
Copy link
Member

MultiPolygons are more complex to repair, and we simply process each Polygon them separately, and there's a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants