Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS-T layers temporal constrains support #34497

Merged
merged 16 commits into from
Mar 5, 2020

Conversation

Samweli
Copy link
Contributor

@Samweli Samweli commented Feb 17, 2020

This PR adds the ability to constrain WMS temporal layers inside QGIS, that is, user will be able to constrain the datetime range for any temporal data source including from WMS-T providers.

This implementation lets user specify needed datetime range on the layer from the source tab on the layer properties dialog.

This PR include changes from the Temporal API here, the Temporal API is currently subject to changes.

Build up discussions about this can be found here and here .

Here below is an example of the workflow.
Workflow-Temporal Layers






Screenshot of the consecutive results from the workflow.
WMS-T Layer time constrains feature at test

Note: For instant based requests, specifying a range with equal begin and end datetime will result into using the specified datetime instant and not a range.

@timlinux
Copy link
Member

CC @tomkralidis

@Samweli Samweli force-pushed the wms-t_layer_time_constraints_v2 branch 3 times, most recently from e12f88a to 8c6d58b Compare February 17, 2020 20:36
@roya0045
Copy link
Contributor

@Samweli great PR!

Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @Samweli !

src/core/qgsmapsettings.cpp Outdated Show resolved Hide resolved
src/core/qgsrendercontext.cpp Outdated Show resolved Hide resolved
src/core/qgstemporalrangeobject.cpp~HEAD Outdated Show resolved Hide resolved
src/core/qgstemporalrangeobject.cpp~HEAD~HEAD Outdated Show resolved Hide resolved
src/gui/qgstemporallayerwidget.h Outdated Show resolved Hide resolved
src/gui/qgstemporallayerwidget.cpp Outdated Show resolved Hide resolved
src/gui/qgstemporallayerwidget.cpp Outdated Show resolved Hide resolved
src/core/raster/qgsrasterdataprovidertemporalproperties.h Outdated Show resolved Hide resolved
src/core/qgsmaplayertemporalproperties.h Outdated Show resolved Hide resolved
@Samweli
Copy link
Contributor Author

Samweli commented Feb 18, 2020

@Samweli great PR!

Thanks @roya0045

@Samweli
Copy link
Contributor Author

Samweli commented Feb 18, 2020

Great work @Samweli !

Thanks @nyalldawson !

@Samweli Samweli force-pushed the wms-t_layer_time_constraints_v2 branch 4 times, most recently from 41ebd68 to 1b76e62 Compare February 19, 2020 15:58
@nyalldawson nyalldawson added this to the 3.14.0 milestone Feb 22, 2020
@nyalldawson
Copy link
Collaborator

Can you please rebase (not merge) off the new master branch?

@Samweli
Copy link
Contributor Author

Samweli commented Feb 24, 2020

Can you please rebase (not merge) off the new master branch?

Sure

@Samweli Samweli force-pushed the wms-t_layer_time_constraints_v2 branch 6 times, most recently from 840e347 to 675e90c Compare February 25, 2020 07:35
@m-kuhn
Copy link
Member

m-kuhn commented Feb 25, 2020

Awesome work !!

Copy link
Member

@m-kuhn m-kuhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did a basic code sanity check. @nyalldawson has a much better overview of the temporal api questions.
One thing that needs to be checked (I tagged some but didn't go through everywhere) is if dataProvider() or temporalCapabilities() could be nullptr.

src/providers/wms/qgswmsprovider.h Outdated Show resolved Hide resolved
src/providers/wms/qgswmsdataitems.cpp Outdated Show resolved Hide resolved
src/gui/raster/qgsrasterlayerproperties.cpp Outdated Show resolved Hide resolved
src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp Outdated Show resolved Hide resolved
src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp Outdated Show resolved Hide resolved
@Samweli Samweli force-pushed the wms-t_layer_time_constraints_v2 branch from 675e90c to 2c04d22 Compare February 25, 2020 09:08
@Samweli
Copy link
Contributor Author

Samweli commented Feb 25, 2020

Awesome work !!

Thanks @m-kuhn

@Samweli
Copy link
Contributor Author

Samweli commented Feb 25, 2020

I just did a basic code sanity check. @nyalldawson has a much better overview of the temporal api questions.
One thing that needs to be checked (I tagged some but didn't go through everywhere) is if dataProvider() or temporalCapabilities() could be nullptr.

Ok, will need to add checks for those.

@timlinux
Copy link
Member

Thanks for the inputs @m-kuhn !

updates on tests and abstract temporal class

updates on qgsabstracttemporal sip and tests

update qgsabstracttemporal test

updated docs

moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions

edits per review on qgs map canvas

remove access of private members from qgstemporalrangeobject

updated render context test and fix travis tests

added new temporal property class

added tests for temporal property

added tests for temporal property

added temporal widget ui

temporal support in raster layers, from wms provider

temporal properties in raster layer properties

added abstract temporal class

updates on tests and abstract temporal class

updates on qgsabstracttemporal sip and tests

update qgsabstracttemporal test

updated docs

temporal support in raster layers, from wms provider

update qgsabstracttemporal test

updated docs

moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions

edits per review on qgs map canvas

updated render context test and fix travis tests

added new temporal property class

added new map layer temporal properties sub classes with tests

updates on map layers temporal properties classes

fix travis tests

add read and write xml tests

added abstract temporal class

updates on tests and abstract temporal class

updates on qgsabstracttemporal sip and tests

update qgsabstracttemporal test

updated docs

edits per review on qgs map canvas

temporal properties in raster layer properties

temporal support in raster layers, from wms provider

moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions

edits per review on qgs map canvas

remove access of private members from qgstemporalrangeobject

updated render context test and fix travis tests

added new temporal property class

added new map layer temporal properties sub classes with tests

updated layer times ui

added advanced options in layer time constrains ui

fix for refreshing wms layer after temporal properties update

update on wms-t temporal properties

added support for bi-temporal WMS-T
@Samweli Samweli force-pushed the wms-t_layer_time_constraints_v2 branch from e9d9f0f to c1275d0 Compare February 29, 2020 19:00
Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very close now, just a few minor things to tweak!

src/core/qgsdataprovider.h Outdated Show resolved Hide resolved
src/core/raster/qgsrasterlayertemporalproperties.cpp Outdated Show resolved Hide resolved
src/gui/raster/qgsrasterlayerproperties.cpp Outdated Show resolved Hide resolved
src/gui/raster/qgsrasterlayertemporalpropertieswidget.h Outdated Show resolved Hide resolved
src/providers/wms/qgswmsdataitems.cpp Outdated Show resolved Hide resolved
@nyalldawson
Copy link
Collaborator

Looks good, just needs the build fixed now :)

src/core/raster/qgsrasterlayerrenderer.cpp Outdated Show resolved Hide resolved
src/core/raster/qgsrasterlayerrenderer.cpp Outdated Show resolved Hide resolved
src/core/raster/qgsrasterlayerrenderer.cpp Outdated Show resolved Hide resolved
src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT! 🎉

Let's hope the CI is happy, and I'll merge...

@DelazJ
Copy link
Contributor

DelazJ commented Mar 5, 2020

Thanks @Samweli
I did not check the current code but from the gif, may I suggest to make the layer properties GUI more compact and look like other tabs: less spacing and margins, no group with single item? maybe are there alignment issues (gif was too fast to check)?

@nyalldawson
Copy link
Collaborator

@DelazJ I'll assist with that post-merge

@DelazJ
Copy link
Contributor

DelazJ commented Mar 5, 2020

Thanks @nyalldawson

@nyalldawson
Copy link
Collaborator

@elpaso seems the postgres raster tests are still being flaky -- see https://travis-ci.org/qgis/QGIS/jobs/658537736?utm_medium=notification&utm_source=github_status

@nyalldawson nyalldawson merged commit c178276 into qgis:master Mar 5, 2020
@DelazJ
Copy link
Contributor

DelazJ commented Mar 5, 2020

@nyalldawson @3nids I'm a bit lost: Isn't "feature" label supposed to create issue report in docs repo? Or is "needs documentation" the single label trigger (though "changelog" seems to have triggered some - qgis/QGIS-Documentation#4953 qgis/QGIS-Documentation#4952 qgis/QGIS-Documentation#4951 - recently)?

@pigreco
Copy link
Sponsor Contributor

pigreco commented May 12, 2020

Please add Temporal label

@Gustry Gustry added the Temporal Temporal filtering or animation label May 12, 2020
@timlinux timlinux added Changelog Items that are queued to appear in the visual changelog - remove after harvesting and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Temporal Temporal filtering or animation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants