Skip to content
Snippets Groups Projects
Commit c496ee5a authored by Martin Bauer's avatar Martin Bauer
Browse files

Added UC2

parent 0eeb8a02
No related branches found
No related tags found
2 merge requests!5SDS-2024-0118R01-Value provided by NGSI-LD use cases,!4SDS-2024-0118_Value_provided_by_NGSI-LD_use_cases
......@@ -467,9 +467,10 @@ The basis for modelling the information required for this use case is the NGSI-L
The query for parking sites within a given geographic area, e.g. around the current location of a car:
```
GET /ngsi-ld/v1/entities/?type=OnStreetParking,OffStreetParking&geoproperty=location&georel=near%3BmaxDistance==1000&geometry=Point&coordinates[-3.8040616,43.4631649]
Accept: application/json
Accept: application/json
Host: localhost:9090
Link: <http://example.org/myContext.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
Link: <http://example.org/myContext.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
```
It queries for all NGSI-LD Entities of type OnStreetParking or OffStreetParking, and geographically scopes it with the circle around the geographic point with coordinates -3.8040616,43.4631649 and a radius of 1000m.
......@@ -521,6 +522,78 @@ In order to do this, the application needs to know the following:
## 6.3 Use Case: Query parking sites in the vicinity (UC2)
Use Case 2 (UC2) is about querying for a _free_ parking spot within the proximity of a car.
Figure 6.3-1 visualizes this scenario.
![UC2 - Query for free parking spots in proximity](media/UC2-query_free_parking_spot-visualization.png)
**Figure 6.3-1: UC2 - Query for free parking spots in the proximity**
The NGSI-LD Entity Type used is ParkingSpot, also from the NGSI-LD compatible Smart Data Model<a href="#_ref_i.5">[i.5]</a> on Parking. For this purpose, we are only interested in the following properties of each parking spot:
- categrory
- location
- name
- parkingSite (relation)
- status
The query for parking spots within a given geographic area, e.g. within 100m around the current location of a car, filtered according to the status being _free_ and restricting the result to the elments: id, type, category, location, name and status:
```
GET /ngsi-ld/v1/entities/?type=ParkingSpot&geoproperty=location&georel=near%3BmaxDistance==100&geometry=Point&coordinates=[-3.8040616,43.4631649]&q=status==“free”&pick=id,type,category,location,name,status
Accept: application/json
Host: localhost:9090
Link: <http://example.org/myContext.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
```
Excerpt of result:
```
[{
"id": "urn:ngsi-ld:ParkingSpot:santander:daoiz_velarde_1_5:3",
"type": "ParkingSpot",
"category": {
"type": "Property",
"value": [
"onStreet"
]
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
-3.80356167695194,
43.46296641666926
]
}
},
"name": {
"type": "Property",
"value": "A-13"
"status": {
"type": "Property",
"value": "free",
"observedAt": "2018-09-21T12:00:00Z“
}
},
...
```
The advantages for the application are the following:
- Application can reuqest information by specifying what it needs ("free parking spaces in the close vicinity")
- Application gets result with a single request (unless paging is required due to number of results)
- Application can gegographically scope the request
- Application can filter by status, i.e. only get “free” parking spaces
- Application can project to only get the properties and relationships they are interested in
In order to do this, the application needs to know the following:
- Data model:
- type: ParkingSpot
- GeoProperty name: location
- Property names: category, location, name and status – and its possible values (“free”)
- its current location
- Root URL: localhost:9090
## 6.4 Use Case: Retrieve or query agriculture parcel(s) modelled as composite digital twins (UC3)
## 6.5 Use Case: Subscribe to be notified when temperature is above/below threshold in building (UC4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment