Closed martinfleis closed 7 months ago
Attention: 8 lines
in your changes are missing coverage. Please review.
Comparison is base (
65379ef
) 85.0% compared to head (6c2b321
) 85.0%. Report is 1 commits behind head on main.
I think this is great. I would just drop this in directly, and write a wrapper to intercept the old arguments and warn about the new argument names next release, with voronoi_frames()
being changed fully over within 2 releases.
I have merged this with voronoi_frames
including some transition period. There are very minor differences in the output:
clip=False
, shapely defaults to a rectangle going significantly beyond the extent of original points but still way smaller that what libpysal is doing at the moment. See the comparison:I can try to expand that but I don't think it is worth it very much, so I'd just say this is a price to pay.
Still need to update docstring and add tests.
CI failing due to some deep dependency in GDAL causing segfaults... solution in progress elsewhere.
The only remaining failures are caused by a geopandas regression on main https://github.com/geopandas/geopandas/issues/3178.
Ready for review!
The test failure looks like geopandas#3180, which should resolve once that lands in geopandas. So, given that the rest of the tests pass, I will merge this now!
This pushes upstream code I have been refactoring for momepy. It is an implementation of Voronoi tessellation that works not only with points but also lines and polygons by discretising their boundaries into a set of points and dissolving the result back.
It also does not use scipy but shapely and avoids unnecessary bottlenecks when clipping the result to pre-defined limit.
It makes sense to me that it lives in
cg
rather than in momepy, where I'll just wrap it and add sensible default values that work for building footprints.It is a bit different than existing
voronoi_frames
so I am not sure what is the best way forward here... I can try to mimic the API and eventually replace the scipy version with this one. Not sure what is the best way forward.