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

On invalid geometry make valid and clean #78

Open
wants to merge 59 commits into
base: master
Choose a base branch
from

Conversation

engobi
Copy link

@engobi engobi commented Nov 10, 2016

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.

Thierry Bomandouki and others added 30 commits October 28, 2016 13:50
…clean) for the on_invalid_geometry parameter
…clean) for the on_invalid_geometry parameter
@coveralls
Copy link

coveralls commented Nov 14, 2016

Coverage Status

Coverage decreased (-0.7%) to 94.803% when pulling 4222d97 on Mappy:on_invalid_geometry_make_valid_and_clean into a1c9916 on tilezen:master.

else:
for ls in boundary:
if lnum == 0:
exterior_lines.append(ls)
else:
interior_lines.append(ls)
interior_lines.append(ls)
Copy link

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?

@rmarianski
Copy link
Member

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?

Copy link
Member

@rmarianski rmarianski left a 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?

@nvkelso nvkelso assigned engobi and unassigned rmarianski Dec 17, 2016
@nvkelso
Copy link
Member

nvkelso commented Mar 15, 2017

@engobi Can you bring this PR up to date, please?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 91.236% when pulling 68772f3 on Mappy:on_invalid_geometry_make_valid_and_clean into 5f54ef2 on tilezen:master.

@@ -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")
Copy link
Member

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?

@rmarianski
Copy link
Member

this has been open for a while, any appetite to try and get this merged in still?

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

Successfully merging this pull request may close these issues.

6 participants