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

sort_by is broken for fields named differently between pydov and WFS #390

Closed
Roel opened this issue Jul 27, 2023 · 0 comments · Fixed by #391
Closed

sort_by is broken for fields named differently between pydov and WFS #390

Roel opened this issue Jul 27, 2023 · 0 comments · Fixed by #391
Assignees
Labels
Milestone

Comments

@Roel
Copy link
Member

Roel commented Jul 27, 2023

  • PyDOV version: 3.0.0
  • Python version: 3.10.6
  • Operating System: Ubuntu

Description

Sorting on fields having a different name in pydov compared to the WFS service is broken in pydov 3.0.0

What I Did

from pydov.search.bodemclassificatie import BodemclassificatieSearch
from owslib.fes2 import SortBy, SortProperty

s = BodemclassificatieSearch()

df = s.search(max_features=1, sort_by=SortBy([SortProperty('x')]))
Traceback (most recent call last):
  File "/home/roel/Sideprojects/pydov/example_bodemclassificaties.py", line 7, in <module>
    df = s.search(max_features=1, sort_by=SortBy([SortProperty('x')]))
  File "/home/roel/Sideprojects/pydov/pydov/search/abstract.py", line 988, in search
    trees = self._search(location=location, query=query, sort_by=sort_by,
  File "/home/roel/Sideprojects/pydov/pydov/search/abstract.py", line 833, in _search
    tree = _get_remote_wfs(
  File "/home/roel/Sideprojects/pydov/pydov/search/abstract.py", line 814, in _get_remote_wfs
    raise WfsGetFeatureError(
pydov.util.errors.WfsGetFeatureError: Error retrieving features of layer 'bodem:bodemclassificaties' from DOV WFS server:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 https://www.dov.vlaanderen.be/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="InvalidParameterValue" locator="GetFeature">
<ows:ExceptionText>Illegal property name: x for feature type bodem:bodemclassificaties</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
@Roel Roel self-assigned this Jul 27, 2023
@Roel Roel added the bug label Jul 27, 2023
@Roel Roel added this to the 3.1.0 milestone Jul 27, 2023
@Roel Roel linked a pull request Jul 27, 2023 that will close this issue
5 tasks
@Roel Roel closed this as completed in #391 Aug 1, 2023
@Roel Roel mentioned this issue Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant