From 76267c8df60857d3ee04db4b0e0d840503f51590 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Tue, 21 Mar 2023 11:28:26 +0100 Subject: [PATCH] fix: temporal queries using a geoquery --- .../021_09.robot | 2 +- ...representation-with-location-sample.jsonld | 30 +++++++++++-------- ...epresentation-021-09-01-expectation.jsonld | 24 +++++++++++---- ...epresentation-021-09-02-expectation.jsonld | 26 +++++++++------- 4 files changed, 54 insertions(+), 28 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot index ff1be30b..a2fde19f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-09-expectation.json Near Point near;maxDistance==2000 Point [-8.503,41.202] ${EMPTY} vehicles-temporal-representation-021-09-01-expectation.jsonld [Tags] te-query 5_7_4 -Within Polygon within Polygon [[-13.503,47.202],[6.541, 52.961],[20.37,44.653],[9.46,32.57],[-15.23,21.37]] location vehicles-temporal-representation-021-09-02-expectation.jsonld +Within Polygon contains Polygon [[[-13.503,47.202],[6.541, 52.961],[20.37,44.653],[9.46,32.57],[-13.503,32.57],[-13.503,47.202]]] location vehicles-temporal-representation-021-09-02-expectation.jsonld [Tags] te-query 5_7_4 *** Keywords *** diff --git a/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld b/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld index 95f6ffc0..6b4f6c1e 100644 --- a/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld +++ b/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld @@ -37,20 +37,26 @@ ], "location":[ { - "type":"Point", - "coordinates":[ - -8.5, - 41.2 - ], - "observedAt":"2020-10-01T12:03:00Z" + "type": "GeoProperty", + "value": { + "type":"Point", + "coordinates":[ + 2.35, + 42.22 + ] + }, + "observedAt":"2020-10-01T12:03:00Z" }, { - "type":"Point", - "coordinates":[ - 2.35, - 42.22 - ], - "observedAt":"2020-10-01T12:05:00Z" + "type": "GeoProperty", + "value": { + "type":"Point", + "coordinates":[ + -8.5, + 41.2 + ] + }, + "observedAt":"2020-10-01T12:05:00Z" } ], "@context":[ diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld index bb57e441..f72267e5 100644 --- a/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld @@ -38,12 +38,26 @@ ], "location":[ { - "type":"Point", - "coordinates":[ - -8.5, - 41.2 - ], + "type": "GeoProperty", + "value": { + "type":"Point", + "coordinates":[ + 2.35, + 42.22 + ] + }, "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type": "GeoProperty", + "value": { + "type":"Point", + "coordinates":[ + -8.5, + 41.2 + ] + }, + "observedAt":"2020-10-01T12:05:00Z" } ] } diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld index 5930cc29..f72267e5 100644 --- a/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld @@ -38,19 +38,25 @@ ], "location":[ { - "type":"Point", - "coordinates":[ - -8.5, - 41.2 - ], + "type": "GeoProperty", + "value": { + "type":"Point", + "coordinates":[ + 2.35, + 42.22 + ] + }, "observedAt":"2020-10-01T12:03:00Z" }, { - "type":"Point", - "coordinates":[ - -8.45, - 41.22 - ], + "type": "GeoProperty", + "value": { + "type":"Point", + "coordinates":[ + -8.5, + 41.2 + ] + }, "observedAt":"2020-10-01T12:05:00Z" } ] -- GitLab