-
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
Open
engobi
wants to merge
59
commits into
tilezen:master
Choose a base branch
from
Mappy:on_invalid_geometry_make_valid_and_clean
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
e612122
Adding extra function which cleans an invalid MultiPolygon
632c251
New test for clean_multi
66dde6a
Add new custom validity function (on_invalid_geometry_make_valid_and_…
6c1e37f
Adding new method that make polygon valid
e463bd8
Script for benching encoding
c904d12
First version of more simple encoding
5444a6f
Improved looping in _geo_encode
f4e1e95
Moved encoding of geometry to a class
8270239
Moved geometry encoding to a dedicated module
427a8e9
Fixed wrong tests : points are skipped in linestrings if they are the…
acaa3a0
Fixed flake8 errors
6e1a21c
Fixed tests unproperly removed
d41a81a
function force_int()
4688db8
Moved all encoding logic to the GeometryEncoder class
2c504fc
flake8
5d29ee5
Don't encode geometries where LINE_TO commands are reduced to 0
5aee985
points and multipoints in the new encoding model
10cdaef
Small refactor
09f5c25
Working version without last_x and last_y as properties
3468ead
Only pure functions
5de59e3
_last_x and _last_y are back as GeometryEncoder variables
d2856fc
Slight improvement in coords_on_grid
385991a
When a shape is to small to be displayed, it shouldn't be added to th…
8e69c4f
Removed useless code
e62d787
Adding extra function which cleans an invalid MultiPolygon
9c50fed
New test for clean_multi
6e3f7fd
Add new custom validity function (on_invalid_geometry_make_valid_and_…
6c3a844
Moved round_fn test from the _round function to the VectorTile class …
64f8b7f
Refactoring code
7d6c9d8
Remove unnecessary lines
e5de72c
More pep8 complian
1ae1511
Applying new code indentation
be0813a
Adding extra function which cleans an invalid MultiPolygon
9aee5d9
New test for clean_multi
682f193
Add new custom validity function (on_invalid_geometry_make_valid_and_…
bb91f4f
Adding new method that make polygon valid
177e990
Refactoring code
95efe73
Remove unnecessary lines
bc27c2d
More pep8 complian
f6c43f2
Applying new code indentation
90fec86
Made winding order optional
561ef6e
Added winding order to addfeatures function
ecd221f
Fix bad merge from bad origin
c545e51
Merge
4bd85b3
Remove unused import
4222d97
Make flake8 happy
03d13ad
Added check_winding_order option to encode function
dd842fb
fixed missing param on __init__ and encoder.py
4d657c2
Fix conflicts
fe7e198
Merge branch 'master' of https://github.com/Mappy/mapbox-vector-tile
73ef4eb
Fix conflicts
104f159
Fix remaining conflicts and make flake8 happy
4ca4f64
On invalid multipolygon clean first before make it valid if necessary
c27eccc
Remove unecessary test
cad219f
Revert two last commits
76def1c
Merge branch 'master' into on_invalid_geometry_make_valid_and_clean
68fea5d
Merge master and fix conflicts
8b044cb
Fix broken tests
68772f3
Make more flake8
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Did you mean to have these prints in here? |
||
self.assertEqual(0, len(features)) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this change the behaviour of
make_it_valid(shape)
that might be called from elsewhere in the code? If that might happen, would it be better to defaultasserted=False
so that existing code doesn't change behaviour?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.
This change does not change the behaviour of
make_it_valid(shape)
, the default valueTrue
preserves the behaviour.