[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-400-g497e63d

git at osgeo.org git at osgeo.org
Fri Aug 13 03:10:34 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, main has been updated
       via  497e63d0a4d224c0fd1573747d91a6acf70213c3 (commit)
      from  9f12ffaa0bc2495e7b9f6f027f32bdaf6941ce4c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 497e63d0a4d224c0fd1573747d91a6acf70213c3
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Aug 13 11:20:32 2021 +0200

    Add GetFaceContainingPoint tests (query point in opposite quadrant)
    
    Closest point is a node of degree 3

diff --git a/topology/test/regress/getfacecontainingpoint.sql b/topology/test/regress/getfacecontainingpoint.sql
index 8780423..df7a485 100644
--- a/topology/test/regress/getfacecontainingpoint.sql
+++ b/topology/test/regress/getfacecontainingpoint.sql
@@ -9,6 +9,53 @@ SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(24 14,
 -- Add holes touching shell defined in CCW order
 SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(32 14, 33 17,31 17, 32 14)');
 
+-- Add cluster of edges forming 2 adjacent faces
+-- and exposing a node of degree 3 on the upper-right
+-- corner where all edge-ends are on the lower-left
+-- quadrant and the central edge have the bounding box
+-- with smallest x/y
+--
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(11 8, 19 12)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(12 9, 19 12)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(12.42 8.2, 19 12)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(11 8, 12 9)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(11 8, 12.42 8.2)');
+
+-- Add cluster of edges forming 2 adjacent faces
+-- and exposing a node of degree 3 on the bottom-right
+-- corner where all edge-ends are on the upper-left
+-- quadrant and the central edge have the bounding box
+-- with smallest x and biggest y
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(11 20, 19 16)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(12 19, 19 16)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(12.42 19.8, 19 16)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(11 20, 12 19)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(11 20, 12.42 19.8)');
+
+-- Add cluster of edges forming 2 adjacent faces
+-- and exposing a node of degree 3 on the bottom-left
+-- corner where all edge-ends are on the upper-right
+-- quadrant and the central edge have the bounding box
+-- with biggest x/y
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(45 20, 37 16)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(44 19, 37 16)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(43.58 19.8, 37 16)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(45 20, 44 19)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(45 20, 43.58 19.8)');
+
+-- Add cluster of edges forming 2 adjacent faces
+-- and exposing a node of degree 3 on the upper-left
+-- corner where all edge-ends are on the bottomr-right
+-- quadrant and the central edge have the bounding box
+-- with biggest x and smallest y
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(45 8, 37 12)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(44 9, 37 12)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(43.58 8.2, 37 12)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(45 8, 44 9)');
+SELECT NULL FROM topology.TopoGeo_addLineString('city_data', 'LINESTRING(45 8, 43.58 8.2)');
+
+
+
 
 -- Get face containing the "point on surface" of each face's geometry
 SELECT 'pos', face_id, topology.GetFaceContainingPoint(
@@ -65,7 +112,20 @@ INSERT INTO city_data.query_points VALUES
 -- Query point on the right of the closest segment and right of ring
 ( 13, 'POINT(33.1 17.2)' ),
 -- Query point near the start of a dangling edge
-( 14, 'POINT(8 36)' );
+( 14, 'POINT(8 36)' ),
+-- Query point near node of degree 3 with leftmost-bottommost edge
+-- not in query point face
+( 15, 'POINT(19.5 12.2)' ),
+-- Query point near node of degree 3 with leftmost-uppermost edge
+-- not in query point face
+( 16, 'POINT(19.5 15.8)' ),
+-- Query point near node of degree 3 with rightmost-uppermost edge
+-- not in query point face
+( 17, 'POINT(36.5 15.8)' ),
+-- Query point near node of degree 3 with rightmost-bottommost edge
+-- not in query point face
+( 18, 'POINT(36.5 12.2)' )
+;
 
 SELECT 't'||id, topology.GetFaceContainingPoint('city_data', g)
 FROM city_data.query_points
diff --git a/topology/test/regress/getfacecontainingpoint_expected b/topology/test/regress/getfacecontainingpoint_expected
index d284e60..9df926e 100644
--- a/topology/test/regress/getfacecontainingpoint_expected
+++ b/topology/test/regress/getfacecontainingpoint_expected
@@ -9,6 +9,14 @@ pos|8|8
 pos|9|9
 pos|10|10
 pos|11|11
+pos|12|12
+pos|13|13
+pos|14|14
+pos|15|15
+pos|16|16
+pos|17|17
+pos|18|18
+pos|19|19
 ERROR:  Two or more faces found
 ERROR:  Two or more faces found
 ERROR:  Two or more faces found
@@ -27,3 +35,7 @@ t11|10
 t12|10
 t13|10
 t14|1
+t15|12
+t16|15
+t17|16
+t18|19

-----------------------------------------------------------------------

Summary of changes:
 topology/test/regress/getfacecontainingpoint.sql   | 62 +++++++++++++++++++++-
 .../test/regress/getfacecontainingpoint_expected   | 12 +++++
 2 files changed, 73 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list