Skip to content

Commit

Permalink
[sensorthings] Offer MultiDatastreams as valid expansion targets
Browse files Browse the repository at this point in the history
Fixes #59531
  • Loading branch information
nyalldawson committed Feb 4, 2025
1 parent 0459679 commit 266746a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/providers/sensorthings/qgssensorthingsutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,8 @@ QList<Qgis::SensorThingsEntity> QgsSensorThingsUtils::expandableTargets( Qgis::S
return
{
Qgis::SensorThingsEntity::HistoricalLocation,
Qgis::SensorThingsEntity::Datastream
Qgis::SensorThingsEntity::Datastream,
Qgis::SensorThingsEntity::MultiDatastream,
};

case Qgis::SensorThingsEntity::Location:
Expand Down Expand Up @@ -889,19 +890,22 @@ QList<Qgis::SensorThingsEntity> QgsSensorThingsUtils::expandableTargets( Qgis::S
case Qgis::SensorThingsEntity::Sensor:
return
{
Qgis::SensorThingsEntity::Datastream
Qgis::SensorThingsEntity::Datastream,
Qgis::SensorThingsEntity::MultiDatastream,
};

case Qgis::SensorThingsEntity::ObservedProperty:
return
{
Qgis::SensorThingsEntity::Datastream
Qgis::SensorThingsEntity::Datastream,
Qgis::SensorThingsEntity::MultiDatastream
};

case Qgis::SensorThingsEntity::Observation:
return
{
Qgis::SensorThingsEntity::Datastream
Qgis::SensorThingsEntity::Datastream,
Qgis::SensorThingsEntity::MultiDatastream
};

case Qgis::SensorThingsEntity::FeatureOfInterest:
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_provider_sensorthings.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ def test_expandable_targets(self):
[
Qgis.SensorThingsEntity.HistoricalLocation,
Qgis.SensorThingsEntity.Datastream,
Qgis.SensorThingsEntity.MultiDatastream,
],
)

Expand Down

0 comments on commit 266746a

Please sign in to comment.