-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow self-crossing rings using even-odd rule
Closes #30 Squashed commit of the following: commit d58120f Author: Mike Fogel <[email protected]> Date: Sun Aug 19 17:43:35 2018 -0300 Readme updates commit 587b74e Author: Mike Fogel <[email protected]> Date: Sun Aug 19 17:32:45 2018 -0300 Remove logic that threw for self-crossing rings commit 3307efd Author: Mike Fogel <[email protected]> Date: Sun Aug 19 17:28:28 2018 -0300 Test to enforce even-odd rule, not non-zero rule Adpated from the graphic on the wikipedia page https://en.wikipedia.org/wiki/Nonzero-rule commit e8b0ecf Author: Mike Fogel <[email protected]> Date: Sun Aug 19 17:19:25 2018 -0300 Change error tests to working tests These tests fail at this point, going to fix that shortly.
- Loading branch information
Showing
11 changed files
with
133 additions
and
141 deletions.
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
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 was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
test/end-to-end/even-odd-rule-not-non-zero-winding/all.geojson
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]], | ||
[[[1, -1], [2, -1], [2, 0], [1, 0], [1, -1]]], | ||
[ | ||
[[1, 1], [2, 1], [2, 0], [4, 0], [4, 3], [1, 3], [1, 1]], | ||
[[2, 1], [2, 2], [3, 2], [3, 1], [2, 1]] | ||
] | ||
] | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
test/end-to-end/even-odd-rule-not-non-zero-winding/args.geojson
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[0, 0], | ||
[4, 0], | ||
[4, 3], | ||
[1, 3], | ||
[1, -1], | ||
[2, -1], | ||
[2, 2], | ||
[3, 2], | ||
[3, 1], | ||
[0, 1], | ||
[0, 0] | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
test/end-to-end/multipoly-with-self-crossing-rings/all.geojson
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[ | ||
[[0, 0], [4, 0], [2, 2], [4, 4], [0, 4], [0, 0]], | ||
[[2, 2], [1, 1], [1, 3], [2, 2]] | ||
], | ||
[ | ||
[[0, 10], [4, 10], [2, 12], [4, 14], [0, 14], [0, 10]], | ||
[[2, 12], [1, 11], [1, 13], [2, 12]] | ||
], | ||
[ | ||
[[10, 0], [14, 0], [12, 2], [14, 4], [10, 4], [10, 0]], | ||
[[12, 2], [11, 1], [11, 3], [12, 2]] | ||
], | ||
[ | ||
[[10, 10], [14, 10], [14, 14], [10, 10]], | ||
[[10, 10], [12, 11], [13, 11], [10, 10]] | ||
], | ||
[ | ||
[[20, 0], [26, 0], [26, 6], [20, 6], [20, 0]], | ||
[[21, 1], [21, 5], [25, 5], [23, 3], [25, 1], [21, 1]] | ||
], | ||
[[[23, 3], [22, 4], [22, 2], [23, 3]]] | ||
] | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
test/end-to-end/multipoly-with-self-crossing-rings/args.geojson
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[[[0, 0], [4, 0], [1, 3], [1, 1], [4, 4], [0, 4], [0, 0]]], | ||
[ | ||
[ | ||
[0, 10], | ||
[4, 10], | ||
[2, 12], | ||
[1, 13], | ||
[1, 11], | ||
[2, 12], | ||
[4, 14], | ||
[0, 14], | ||
[0, 10] | ||
] | ||
], | ||
[ | ||
[ | ||
[10, 0], | ||
[14, 0], | ||
[12, 2], | ||
[11, 3], | ||
[11, 1], | ||
[14, 4], | ||
[10, 4], | ||
[10, 0] | ||
] | ||
], | ||
[ | ||
[ | ||
[10, 10], | ||
[14, 10], | ||
[14, 14], | ||
[10, 10], | ||
[13, 11], | ||
[12, 11], | ||
[10, 10] | ||
] | ||
], | ||
[ | ||
[[20, 0], [26, 0], [26, 6], [20, 6], [20, 0]], | ||
[[21, 1], [21, 5], [25, 5], [22, 2], [22, 4], [25, 1], [21, 1]] | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} |
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