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

fix: allow percent sign in getFeature filter #1877

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

steff-o
Copy link
Contributor

@steff-o steff-o commented Oct 25, 2023

Fixes #1848 by moving the wfs part of getFeture() to WfsSource class as it already urlecodes arguments correctly.
Also fixes #1523 when strategy = 'all' as that wasn't fixed in #1579
Probably also solves at least part of #1534, but on the other hand, it makes #1535 and #1536 almost impossible to merge.

As a bonus some redundant code from getFeature is removed and hopefully it will be easier to implement filters for QGIS and other servers and support for different WFS versions etc by keeping all code in one place.

I have tried to make it as backwards compatible as possible, but there is a small risk that if someone utilized or tried to compensate for the weaknesses (e.g. no coordinate transform) in a plugin or external code that may break. To my knowledge getFeature is used in search (internally in Origo) and from the MultiSelect plugin, which should be unaffected. The things that are deliberately not entirely backwards compatible are:

  • The WFS version in getFeature was 1.0.0. This implementation will use the same version as WfsSource, which right now is hardcoded as 1.1.0
  • The request will follow the method (GET, POST) that the layer is configured with. Old implementation of getFeature was always GET.

None of those should pose any problem unless the layer is configured only to be used by getFeature and you have a special 1.0.0 server for that that or it does not support post requests but you have configured the layer as 'POST' anyway.

Copy link
Contributor

@jokd jokd left a comment

Choose a reason for hiding this comment

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

Seems to work as intended so LGTM

@filleg
Copy link
Contributor

filleg commented Oct 30, 2023

Works well with QGIS server, nice cleanup!

Except the filters with feature id, but that's a separate issue as you mentioned.

#1535 is no longer necessary since QGIS server 3.28, which added support for different projections with GeoJSON.

@jokd jokd merged commit 0ade01c into origo-map:master Oct 31, 2023
3 checks passed
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.

getFeature crashes when WFS filter contains percent sign Configured vector layer extent not fully respected
3 participants