Skip to content

Missing elevation in DataStream #2319

@enricoboldrini

Description

@enricoboldrini

It seems that latitude and longitude are being set in datastream after observations are added to the stream, reading these values from the location. However the elevation is not copied.

To reproduce:

curl -s -X POST "${BASE_URL}Things" -H "Content-Type: application/json" -d '{"@iot.id":"1", "name":"mything","description":"mything"}'

curl -s -X POST "${BASE_URL}Things(1)/Locations" -H "Content-Type: application/json" -d '{ "name": "myloc","description": "myloc","encodingType": "application/geo+json",
"location": {
"type": "Point",
"coordinates": [44.5, 11.3, 50]
}
}'

curl -s -X POST "${BASE_URL}ObservedProperties" -H "Content-Type: application/json" -d '{"@iot.id":"2","name":"myop","description":"myop","definition":"myop"}'

curl -s -X POST "${BASE_URL}Sensors" -H "Content-Type: application/json" -d '{"@iot.id":"3","name":"mys","description":"mys","encodingType":"application/json","metadata":""}'

curl -s -X POST "${BASE_URL}Things(1)/Datastreams"
-H "Content-Type: application/json"
-d "{
"name": "myds",
"@iot.id": "4",
"description": "myds",
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement\",
"unitOfMeasurement": {"name": "degree", "symbol": "°", "definition": "http://unit\"},
"observedArea": {
"type": "Point",
"coordinates": [44.5, 11.3, 50]
},
"Sensor": {"@iot.id": 3},
"ObservedProperty": {"@iot.id": 2}
}"

At this point the Datastream has been uploaded, but trying to retrieve it no observedArea is present, even if it was present in the just uploaded json.

curl -s -X POST "${BASE_URL}Datastreams(4)/Observations" -H "Content-Type: application/json" -d '{"result": 12.5,"phenomenonTime": "2025-01-15T12:00:00.000Z" }'

At this point, after one observation has been uploaded the Datastream observed Area appear, but without the elevation:

"observedArea": {
"type": "Point",
"coordinates": [
44.5,
11.3
]
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions