-
Notifications
You must be signed in to change notification settings - Fork 47
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
On invalid geometry make valid and clean #78
base: master
Are you sure you want to change the base?
On invalid geometry make valid and clean #78
Conversation
…clean) for the on_invalid_geometry parameter
…clean) for the on_invalid_geometry parameter
mapbox_vector_tile/polygon.py
Outdated
else: | ||
for ls in boundary: | ||
if lnum == 0: | ||
exterior_lines.append(ls) | ||
else: | ||
interior_lines.append(ls) | ||
interior_lines.append(ls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this spacing change intentional?
Is there a reason why we always don't want to perform this operation? ie, right before returning a multipolygon in the other make valid path, always ensure it's "cleaned" first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I commented separately but didn't officially "review". Can we update the make_it_valid
function to fold in the multi polygon logic you added directly? Or is there a reason why it has to be separate?
Also looks like there's a merge conflict now, can you rebase off master?
@engobi Can you bring this PR up to date, please? |
@@ -913,6 +913,9 @@ def test_too_small_geometry(self): | |||
on_invalid_geometry=on_invalid_geometry_make_valid) | |||
result = decode(pbf) | |||
features = result['foo']['features'] | |||
import sys | |||
sys.stderr.write(str(features)) | |||
sys.stderr.write("\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to have these prints in here?
this has been open for a while, any appetite to try and get this merged in still? |
Adding new geometry validity function on_invalid_geometry_make_valid_and_clean, that applies the validity function clean_multi in case of invalids multipolygons have been returned by make_it_valid function.