From 098c6b1f66b8dd3f5b10cbc3c5334fccfdf2a130 Mon Sep 17 00:00:00 2001 From: kzangeli Date: Wed, 3 Jun 2026 19:52:16 +0200 Subject: [PATCH] fix(019_11): make the polygon fixtures simple (non-self-intersecting) Three polygons in the 019_11 geo-query family are self-intersecting and get rejected (400) by any broker whose storage validates rings (Mongo 2dsphere/S2), cascading all 8 sub-tests via suite-setup failure: - building-location-polygon.jsonld: vertices A(13.2865906,52.5648645) and B(13.2879639,52.5648645) share a latitude with A west of B, so the closing edge E->A must cross the hanging B->C edge near A. Swapping the order of the first two vertices (ring B,A,C,D,E,B) makes the ring simple. Verified planar: still contains the 019_11_03 query polygon, still disjoint from the _04/_05 and _02/_07 query shapes, still not within the _06 polygon, and does not contain the _08 point - every EXPECTED_COUNT in the family is preserved. - 019_11_01 equals-query updated to the new ring verbatim. - 019_11_03 contains-query: drop the duplicated consecutive first vertex (also made the ring non-simple). - 019_11_06 within-query: drop the near-duplicate second vertex (13.3027267,52.4905156), 0.0004 deg from its neighbour - same authoring accident, same bowtie. Second entity (triangle) remains within; first remains not-within. Doubts #12 / #34 / #56. --- .../Consumption/Entity/QueryEntities/019_11.robot | 6 +++--- data/entities/building-location-polygon.jsonld | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot index adad13ae..23703d70 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot @@ -16,7 +16,7 @@ Test Template Query several entities based on complex geoqueries 019_11_01 QueryOnEqualsPolygon [Documentation] Check that one can query with an exact polygon [Tags] e-query 5_7_2 4_10 - equals Polygon [[[13.2865906,52.5648645],[13.2879639,52.5648645],[13.2797241,52.4988679],[13.477478,52.4712703],[13.5049438,52.5373084],[13.2865906,52.5648645]]] 1 + equals Polygon [[[13.2879639,52.5648645],[13.2865906,52.5648645],[13.2797241,52.4988679],[13.477478,52.4712703],[13.5049438,52.5373084],[13.2879639,52.5648645]]] 1 019_11_02 QueryOnIntersectsPolygon [Documentation] Check that one can query with an intersects polygon [Tags] e-query 5_7_2 4_10 @@ -24,7 +24,7 @@ Test Template Query several entities based on complex geoqueries 019_11_03 QueryOnContainsPolygonMatching [Documentation] Check that one can query with a contains polygon [Tags] e-query 5_7_2 4_10 - contains Polygon [[[13.3844376,52.5356966],[13.3844376,52.5356966],[13.381691,52.5123012],[13.4235764,52.5100027],[13.4331894,52.5273425],[13.3844376,52.5356966]]] 1 + contains Polygon [[[13.3844376,52.5356966],[13.381691,52.5123012],[13.4235764,52.5100027],[13.4331894,52.5273425],[13.3844376,52.5356966]]] 1 019_11_04 QueryOnContainsPolygonNotMatching [Documentation] Check that one can query with a contains polygon without matching geometries [Tags] e-query 5_7_2 4_10 @@ -36,7 +36,7 @@ Test Template Query several entities based on complex geoqueries 019_11_06 QueryOnWithinPolygon [Documentation] Check that one can query with a within polygon [Tags] e-query 5_7_2 4_10 - within Polygon [[[13.3023834,52.4903066],[13.3027267,52.4905156],[13.2745743,52.465632],[13.3343124,52.4185447],[13.4311295,52.47107],[13.3023834,52.4903066]]] 1 + within Polygon [[[13.3023834,52.4903066],[13.2745743,52.465632],[13.3343124,52.4185447],[13.4311295,52.47107],[13.3023834,52.4903066]]] 1 019_11_07 QueryOnOverlapsPolygon [Documentation] Check that one can query with an overlaps polygon [Tags] e-query 5_7_2 4_10 diff --git a/data/entities/building-location-polygon.jsonld b/data/entities/building-location-polygon.jsonld index 0a836550..97fbb6d0 100644 --- a/data/entities/building-location-polygon.jsonld +++ b/data/entities/building-location-polygon.jsonld @@ -12,11 +12,11 @@ "coordinates": [ [ [ - 13.2865906, + 13.2879639, 52.5648645 ], [ - 13.2879639, + 13.2865906, 52.5648645 ], [ @@ -32,7 +32,7 @@ 52.5373084 ], [ - 13.2865906, + 13.2879639, 52.5648645 ] ] @@ -42,4 +42,4 @@ "@context": [ "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" ] -} \ No newline at end of file +} -- GitLab