Replaces the densify_by_distance algorithm to retain the original polygon vertices (which fixes #411 ) and to only add new points on polygon segments longer than the distance argument. Example image (same as shown in the issue) showing the now correctly densified polygon:
Fixes a problem with densify_by_factor where the last/closing vertex was not included in the returned densified point list.
Makes the footprint method return counter-clockwise polygons to align with the GeoJSON specification. Updates tests to use counter-clockwise polygons. I found that Shapely's convex_hull and simplify methods return clockwise polygons, so these methods are now wrapped in an Shapely's orient function to enforce counter-clockwise polygons.
PR checklist:
[x] Code is formatted (run scripts/format).
[x] Code lints properly (run scripts/lint).
[x] Tests pass (run scripts/test).
[ ] Documentation has been updated to reflect changes, if applicable.
Related Issue(s):
Description:
densify_by_distance
algorithm to retain the original polygon vertices (which fixes #411 ) and to only add new points on polygon segments longer than thedistance
argument. Example image (same as shown in the issue) showing the now correctly densified polygon:densify_by_factor
where the last/closing vertex was not included in the returned densified point list.footprint
method return counter-clockwise polygons to align with the GeoJSON specification. Updates tests to use counter-clockwise polygons. I found that Shapely'sconvex_hull
andsimplify
methods return clockwise polygons, so these methods are now wrapped in an Shapely'sorient
function to enforce counter-clockwise polygons.PR checklist:
scripts/format
).scripts/lint
).scripts/test
).