-
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.
Ensure output rings are not self-intersecting
Fixes #11 Squashed commit of the following: commit 6d8e70b Author: Mike Fogel <[email protected]> Date: Wed Mar 21 23:24:46 2018 -0300 Remove starting point from ring if superflous commit 360d7c4 Author: Mike Fogel <[email protected]> Date: Wed Mar 21 22:17:37 2018 -0300 Get Ring.factory() fullfilling its spec commit 7553870 Author: Mike Fogel <[email protected]> Date: Wed Mar 21 17:57:57 2018 -0300 Fill in Ring.factory() Also change the Ring constructor to expect an in-order array of sweep events. commit 6f0c5f5 Author: Mike Fogel <[email protected]> Date: Wed Mar 21 16:51:31 2018 -0300 Move ring-building process to within a factory() commit 9208549 Author: Mike Fogel <[email protected]> Date: Tue Mar 20 23:29:09 2018 -0300 Good test case
- Loading branch information
Showing
10 changed files
with
471 additions
and
93 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 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
29 changes: 29 additions & 0 deletions
29
test/end-to-end/no-self-intersecting-rings-output/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,29 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": null, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[[0, 0], [2, 0], [3, 2], [2, 4], [0, 4], [0, 0]]] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": null, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[[1, 1], [3, 2], [1, 3], [1, 1]]] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": null, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[[3, 2], [4, 1], [4, 3], [3, 2]]] | ||
} | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
test/end-to-end/no-self-intersecting-rings-output/xor.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,14 @@ | ||
{ | ||
"type": "Feature", | ||
"properties": null, | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[ | ||
[[0, 0], [2, 0], [3, 2], [2, 4], [0, 4], [0, 0]], | ||
[[3, 2], [1, 1], [1, 3], [3, 2]] | ||
], | ||
[[[3, 2], [4, 1], [4, 3], [3, 2]]] | ||
] | ||
} | ||
} |
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
Oops, something went wrong.