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

Support WMS dimensions in QGIS Server #31351

Merged
merged 14 commits into from
Sep 18, 2019
Merged

Conversation

rldhont
Copy link
Contributor

@rldhont rldhont commented Aug 22, 2019

Description

A WMS server can provide support for several type of dimensions such as time, elevation or other types of dimensions. The dimension has to be defined as the layer level and can be used by the WMS client to filter requested information. WMS Time is part of the WMS Dimension.

To implement this feature in QGIS Feature, the User Interface has been updated to provide a way to defined WMS Dimension.

vectorlayer-server-wms-dimension

To define a dimension the user can select:

  • Name, the dimension name display in getcapabilities and use in WMS request
  • Attribute, the feature attribute to use as the information field to retrieve dimension
  • End Attribute (optional), this option allows to specify the upper end range value
  • units
  • unitSymbol (optional)
  • Default value, if no dimension parameter is used in WMS request: All values, min, max or a reference value
  • Reference value, to define a specific default value

vectorlayer-wms-dimension-dialog

This feature implement the QGIS Enhancement proposal: Add WMS Time support in QGIS server qgis/QGIS-Enhancement-Proposals#110

This feature is funded by Ifremer

Checklist

@rldhont rldhont added Requires Tests! Waiting on the submitter to add unit tests before eligible for merging Feature API API improvement only, no visible user interface changes Server Related to QGIS server labels Aug 22, 2019
@rldhont rldhont added this to the 3.10.0 milestone Aug 22, 2019
src/core/qgsvectorlayer.h Outdated Show resolved Hide resolved
src/app/qgswmsdimensiondialog.h Outdated Show resolved Hide resolved
src/app/qgswmsdimensiondialog.h Outdated Show resolved Hide resolved
@nyalldawson
Copy link
Collaborator

Thanks @rldhont -- looks good!

@rldhont
Copy link
Contributor Author

rldhont commented Aug 26, 2019

Does this need to be a Q_OBJECT? There's no signals or slots yet

No, I removed it and enhance the class with an enum

QList<QgsVectorLayerServerProperties::WmsDimensionInfo> mWmsDimensions;

//! Predefined QGIS Server WMS Dimension names
QStringList mPredefinedWmsDimNames { "Time", "Elevation" };
Copy link
Member

Choose a reason for hiding this comment

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

Could we define an enum instead of using string values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have use a static method to provide predefined WMS Dimension.

@pblottiere
Copy link
Member

Hi @rldhont,

Thanks for your work, I'm happy to see this landing in QGIS Server 👍!

BTW, I didn't see any modification in the GetCapabilties document. Is it normal?

@rldhont
Copy link
Contributor Author

rldhont commented Aug 26, 2019

@pblottiere thanks for the review.
I didn't know that enum can contain strings.

And WMS Getcapabilities has been updated https://github.com/qgis/QGIS/pull/31351/files#diff-adcf66869ada2c21677d80135d1d4cc9

@rldhont rldhont removed the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Sep 7, 2019
@nyalldawson nyalldawson added the Frozen Feature freeze - Do not merge! label Sep 7, 2019
@rldhont
Copy link
Contributor Author

rldhont commented Sep 8, 2019

Hi @nyalldawson I have requested a feature freeze exception before friday because I was almost sure to not have reviewers validation.

I was done all the code and tests before friday, I have not rebased it before. Do you think, this PR could be exempt of feature freeze ?

@nyalldawson
Copy link
Collaborator

@rldhont that's not my call to make...

@nyalldawson nyalldawson modified the milestones: 3.10.0, 3.12 Sep 8, 2019
@rldhont
Copy link
Contributor Author

rldhont commented Sep 9, 2019

@pblottiere @elpaso @mhugent @sbrunner

Hi Devs,

I have finished the code and tests before Friday September 6th 2019, the day of code freeze, and I have rebased it on Saturday September 7th 2019. Do you think I can merge it for 3.10 ?

@timlinux
Copy link
Member

+1 from me to include in 3.10 - nice work @rldhont !

@pblottiere
Copy link
Member

@pblottiere @elpaso @mhugent @sbrunner

Hi Devs,

I have finished the code and tests before Friday September 6th 2019, the day of code freeze, and I have rebased it on Saturday September 7th 2019. Do you think I can merge it for 3.10 ?

Hi @rldhont,

I think that some of my comments have not been addressed yet, but as I have previously stated, I don't want to block your work (especially that it's not "critical" issues). So +0 from me.

@rldhont
Copy link
Contributor Author

rldhont commented Sep 16, 2019

@pblottiere I have done the changes requested.

@pblottiere
Copy link
Member

I have done the changes requested.

Nice, thanks a lot @rldhont 👍!

@rldhont rldhont modified the milestones: 3.12, 3.10.0 Sep 17, 2019
@rldhont rldhont added Freeze Exempt Feature Freeze exemption granted and removed Frozen Feature freeze - Do not merge! labels Sep 17, 2019
@rldhont rldhont merged commit 7a77d90 into qgis:master Sep 18, 2019
@isaomatsunami
Copy link

It's great to see this catched 3.10

@rldhont rldhont deleted the server-wms-dimensions branch January 2, 2020 11:57
@fxstempfel
Copy link

Hello,

As far as I understand this feature should be available in 3.10+, however I cannot see the Dimensions panel as shown in the screenshot above:

GUI

I have 3.12.1 installed on Windows. Am I missing anything?

Thanks!

@Gustry
Copy link
Contributor

Gustry commented Apr 16, 2020

As far as I understand this feature should be available in 3.10+, however I cannot see the Dimensions panel as shown in the screenshot above:

I have 3.12.1 installed on Windows. Am I missing anything?

Your layer is a raster. This work was on vector layer.

@fxstempfel
Copy link

Your layer is a raster. This work was on vector layer.

Thanks for your quick answer. So I guess there's no support yet for WMS Time with raster layers, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API improvement only, no visible user interface changes Feature Freeze Exempt Feature Freeze exemption granted Server Related to QGIS server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants