Skip to content

Commit

Permalink
Merge pull request #60426 from qgis/backport-60420-to-release-3_40
Browse files Browse the repository at this point in the history
[Backport release-3_40] [sensorthings] Offer MultiDatastreams as valid expansion targets
  • Loading branch information
alexbruy authored Feb 5, 2025
2 parents 7c78e08 + 47c6631 commit b962090
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 @@ -863,7 +863,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 @@ -891,19 +892,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 b962090

Please sign in to comment.