-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some extra unit tests for geometry:
- Add some tests for conversion to/from WKT, using a bulk lot of testsdata from PostGIS - Add some tests for area/length calculation, using some test data and results from PostGIS/geos unit tests - Add tests for spatial relations, using test data from PostGIS. Note that this required adding support for calculating the DE-9IM relation. I'll expose this to users via the expression engine in 2.14. Along the way this also fixes a number of bugs relating to WKT geometry import, such as - add support for alternate MultiPoint(1 1,2 2,...) format - fix GeometryCollection to support collections with multi* children and GeometryCollection children (allowed by spec)
- Loading branch information
1 parent
7f325d5
commit 55c27ce
Showing
11 changed files
with
787 additions
and
31 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
MultiPolygon( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )|291 | ||
Point(1 2)|0 | ||
MultiPoint ((1 2),(2 3))|0 | ||
LineString(1 2,2 3,3 4)|0 | ||
Polygon (())|0 | ||
LineString ()|0 | ||
MultiPolygon ((()))|0 | ||
MultiLineString ()|0 | ||
MultiPoint ()|0 | ||
GeometryCollection ()|0 | ||
Polygon ((60 180, 140 240, 140 240, 140 240, 200 180, 120 120, 60 180))|8400 | ||
Polygon ((60 180, 140 120, 100 180, 140 240, 60 180))|2400 | ||
Polygon ((60 180, 140 120, 100 180, 140 240, 140 240, 60 180))|2400 |
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,11 @@ | ||
MultiPolygon( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )|140 | ||
MultiLineString((0 0, 1 1),(0 0, 1 1, 2 2) )|4.24264068711929 | ||
Point (1 2)|0 | ||
MultiPoint ((1 2),(2 3))|0 | ||
Polygon (())|0 | ||
LineString ()|0 | ||
MultiPolygon ((()))|0 | ||
MultiLineString ()|0 | ||
MultiPoint ()|0 | ||
GeometryCollection ()|0 | ||
LineString (0 0, 10 10, 20 0)|28.2842712 |
Oops, something went wrong.