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

Read queryLayers metadata for WMS data source #5408

Merged
merged 2 commits into from Jan 17, 2020

Conversation

adube
Copy link
Contributor

@adube adube commented Jan 8, 2020

Issue

With the introduction of #5250 (Support layer group filtering), a WMS data source that use a "group" as WMS layer can have multiple inner WFS layers, each of which get filtered properly.

However, an issue occurs when we try to query such a data source: we get duplicate records. More precisely, we have 1 set or records per WFS layer. For example, in a group "hotel_filter", which groups 2 layers: "hotel" and "hotel_layer", we have 2 sets of results, one for "hotel" and one for "hotel_layer".

We should have only one.

Assumption

It is assumed that a WMS data source that uses a group layer should only have ONE of its inner WFS layer to return data when queries are issued. It's okay to have multiple inner layers within a group that can return data.

It is assumed that all WFS layer within a group can be filtered through the WMS layer in the map.

Fix

This patch implements a way to only have 1 set of records returned for a WMS data source that use a group: by using the queryLayers metadata.

This metadata was already introduced for WMTS, and used to be only used by WMTS. Now, if defined in a WMS data source, it means that only the layers defined in there should be queried.

That metadata is read in the GMF data source manager, and is translated as a new property of the GmfLayerChildLayer object: getData. That new property is not an official property supported by the Themes service, but is rather a calculated value to have a nice way to know at the "child layer level" if it is queryable and can have data fetched (i.e. if it can be used to issue requests). That property is assumed to be true, if not defined.

@adube adube force-pushed the gsgmf-1171-getdata-metadata branch from 5cd9d0d to 48d2d90 Compare January 9, 2020 13:14
@adube adube changed the title [WIP] Read queryLayers metadata for WMS data source Read queryLayers metadata for WMS data source Jan 9, 2020
@adube adube requested review from sbrunner and fredj January 9, 2020 13:17
@adube
Copy link
Contributor Author

adube commented Jan 9, 2020

@fredj or @sbrunner Ready for review.

Copy link
Member

@sbrunner sbrunner left a comment

Choose a reason for hiding this comment

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

Looks good to me @fredj can you have a look on the code?

@adube adube force-pushed the gsgmf-1171-getdata-metadata branch from 48d2d90 to cce8217 Compare January 13, 2020 13:59
@adube adube changed the title Read queryLayers metadata for WMS data source [WIP] Read queryLayers metadata for WMS data source Jan 15, 2020
@adube adube force-pushed the gsgmf-1171-getdata-metadata branch from cce8217 to f2cdb46 Compare January 17, 2020 13:11
@adube adube changed the title [WIP] Read queryLayers metadata for WMS data source Read queryLayers metadata for WMS data source Jan 17, 2020
@adube
Copy link
Contributor Author

adube commented Jan 17, 2020

Fix applied. Ready for code review: @fredj

@adube adube force-pushed the gsgmf-1171-getdata-metadata branch from bcab8b4 to 70a6a0a Compare January 17, 2020 14:26
Copy link
Member

@fredj fredj left a comment

Choose a reason for hiding this comment

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

looks good, thanks

@adube adube merged commit a372f34 into master Jan 17, 2020
@adube adube deleted the gsgmf-1171-getdata-metadata branch January 17, 2020 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants