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

Server WFS 1.1: honor srsName and axis order #45270

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Sep 27, 2021

Fixes #45216

@elpaso elpaso added Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server labels Sep 27, 2021
@github-actions github-actions bot added this to the 3.22.0 milestone Sep 27, 2021
Copy link
Contributor

@rouault rouault left a comment

Choose a reason for hiding this comment

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

This looks good to me, but one could argue that if no SRSNAME is passed, we should use EPSG urns and their axis order rule, but that's probably another topic

@pathmapper
Copy link
Contributor

pathmapper commented Sep 27, 2021

Nice that SRSNAME=urn:ogc:def:crs:EPSG::4326 is now honored 🎉 , but QGIS Desktop is requesting with SRSNAME=EPSG:4326 so I think #45216 isn't fixed as the server response didn't change for this case and LON/LAT axis order is still returned.

Should QGIS Desktop request with urn:ogc:def:crs:EPSG::4326 instead EPSG:4326 ?

@rouault
Copy link
Contributor

rouault commented Sep 27, 2021

Should QGIS Desktop request with urn:ogc:def:crs:EPSG::4326 instead EPSG:4326 ?

it depends on what is advertized in the GetCapabilities response. I suspect it might be EPSG:4326, in which case QGIS desktop/client behaviour of requesting what is advertized is appropriate .

@elpaso
Copy link
Contributor Author

elpaso commented Sep 27, 2021

Should QGIS Desktop request with urn:ogc:def:crs:EPSG::4326 instead EPSG:4326 ?

it depends on what is advertized in the GetCapabilities response. I suspect it might be EPSG:4326, in which case QGIS desktop/client behaviour of requesting what is advertized is appropriate .

Exactly: getcapabilities hasn't changed.

@pathmapper
Copy link
Contributor

pathmapper commented Sep 27, 2021

Thanks, so to fix #45216 QGIS server needs to advertise urn:ogc:def:crs:EPSG::4326. I don't think there's currently an option/setting to achieve this.

Would it be an option that QGIS Server is advertising urn:ogc:def:crs:EPSG::4326 in GetCapabilities by default instead of EPSG:4326? Or would this be a breaking change?

@elpaso elpaso merged commit 0449b41 into qgis:master Sep 29, 2021
@elpaso elpaso deleted the bugfix-gh45216-server-wfs11-srsname branch September 29, 2021 08:07
@rldhont
Copy link
Contributor

rldhont commented Mar 7, 2022

@elpaso @rouault we found an issue after this fix. Can you review the fix #47570 ? Thanks

ptitjano added a commit to ptitjano/QGIS that referenced this pull request Nov 2, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
troopa81 pushed a commit to troopa81/QGIS that referenced this pull request Nov 9, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Nov 13, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Nov 13, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Nov 20, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Nov 22, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Dec 21, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Dec 22, 2023
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Feb 14, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Feb 26, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Mar 5, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Mar 5, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Mar 13, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Mar 19, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Mar 19, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
lbartoletti pushed a commit that referenced this pull request Mar 20, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of #45270.
lbartoletti pushed a commit that referenced this pull request Mar 20, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of #45270.
nyalldawson pushed a commit that referenced this pull request Mar 27, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of #45270.
nyalldawson pushed a commit that referenced this pull request Mar 27, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of #45270.
ptitjano added a commit to ptitjano/QGIS that referenced this pull request Apr 2, 2024
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed and has the same behavior as `SRSNAME=EPSG:4326`.

This is a follow-up of qgis#45270.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WFS Layer from QGIS Server is not rendered because of an issue with coordinate axis order
4 participants