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

qgswfsgetcapabilities: Restore previous empty bounding box behavior #55927

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

ptitjano
Copy link
Collaborator

@ptitjano ptitjano commented Jan 22, 2024

Description

According to the WFS 1.1.0 specs "The element is used to indicate the edges of an enclosing rectangle in decimal degrees of latitude and longitude in WGS84" but the expected behavior is not specified when the data are empty.

Up to QGIS 3.32, QGIS server returned:

<ows:WGS84BoundingBox dimensions="2">
<ows:LowerCorner>0 0</ows:LowerCorner>
<ows:UpperCorner>0 0</ows:UpperCorner>

However, as a side effect of a change in QGSRectangle (see: #54646), QGIS server now returns since the 3.34 version:

<ows:WGS84BoundingBox dimensions="2">
<ows:LowerCorner>inf inf</ows:LowerCorner>
<ows:UpperCorner>-inf -inf</ows:UpperCorner>

This changes restores the QGIS 3.32 behavior.

cc @troopa81

@github-actions github-actions bot added this to the 3.36.0 milestone Jan 22, 2024
Copy link

github-actions bot commented Jan 22, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 63413f8)

Copy link
Contributor

@troopa81 troopa81 left a comment

Choose a reason for hiding this comment

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

It seems ok to me. Could you add a test scenario for this?

According to the WFS 1.1.0 specs "The <WGS84BoundingBox> element is
used to indicate the edges of an enclosing rectangle in decimal
degrees of latitude and longitude in WGS84" but the expected behavior
is not specified when the data are empty.

Up to QGIS 3.32, QGIS server returned:
```
<ows:WGS84BoundingBox dimensions="2">
<ows:LowerCorner>0 0</ows:LowerCorner>
<ows:UpperCorner>0 0</ows:UpperCorner>
```

However, as a side effect of a change in `QGSRectangle` (see:
qgis#54646), QGIS server now returns
since the 3.34 version:
```
<ows:WGS84BoundingBox dimensions="2">
<ows:LowerCorner>inf inf</ows:LowerCorner>
<ows:UpperCorner>-inf -inf</ows:UpperCorner>
```

This changes restores the QGIS 3.32 behavior.
@ptitjano ptitjano force-pushed the wfs-empty-bounding-box branch from 97e9a43 to 63413f8 Compare January 23, 2024 17:38
@ptitjano
Copy link
Collaborator Author

It seems ok to me. Could you add a test scenario for this?

Done

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.

4 participants