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

[WFS provider] Recognize OGC HTTP URIs #50281

Merged
merged 4 commits into from
Sep 28, 2022
Merged

[WFS provider] Recognize OGC HTTP URIs #50281

merged 4 commits into from
Sep 28, 2022

Conversation

rouault
Copy link
Contributor

@rouault rouault commented Sep 21, 2022

Fixes #29391

  • Add a QgsOgcCrsUtils::parseCrsName() function to parse the different styles of OGC CRS names
    Recognizes the following flavors:
        //! CRS flavor
        enum class CRSFlavor
        {
          UNKNOWN, //! unknown/unhandled flavor
          AUTH_CODE, //! e.g EPSG:4326
          HTTP_EPSG_DOT_XML, //! e.g. http://www.opengis.net/gml/srs/epsg.xml#4326 (called "OGC HTTP URL" in GeoServer WFS configuration panel)
          OGC_URN, //! e.g. urn:ogc:def:crs:EPSG::4326
          X_OGC_URN, //! e.g. urn:x-ogc:def:crs:EPSG::4326
          OGC_HTTP_URI, //! e.g. http://www.opengis.net/def/crs/EPSG/0/4326
        };
    
  • QgsGmlStreamingParser::readEpsgFromAttribute(): use QgsOgcCrsUtils::parseCrsName()
  • QgsCoordinateReferenceSystem::createFromOgcWmsCrs(): use QgsOgcCrsUtils::parseCrsName()
  • [WFS provider] Use QgsOgcCrsUtils::parseCrsName() to be able to handle OGC HTTP URIs

@rouault rouault added Bug Either a bug report, or a bug fix. Let's hope for the latter! backport queued_ltr_backports Queued Backports labels Sep 21, 2022
@github-actions github-actions bot added this to the 3.28.0 milestone Sep 21, 2022
src/core/qgsogcutils.h Outdated Show resolved Hide resolved
src/core/qgsogcutils.h Outdated Show resolved Hide resolved
@rouault rouault force-pushed the fix_29391 branch 2 times, most recently from 5941983 to 218744e Compare September 23, 2022 09:28
…styles of OGC CRS names (fixes qgis#29391)

Recognizes the following flavors:
```
    //! CRS flavor
    enum class CRSFlavor
    {
      UNKNOWN, //! unknown/unhandled flavor
      AUTH_CODE, //! e.g EPSG:4326
      HTTP_EPSG_DOT_XML, //! e.g. http://www.opengis.net/gml/srs/epsg.xml#4326 (called "OGC HTTP URL" in GeoServer WFS configuration panel)
      OGC_URN, //! e.g. urn:ogc:def:crs:EPSG::4326
      X_OGC_URN, //! e.g. urn:x-ogc:def:crs:EPSG::4326
      OGC_HTTP_URI, //! e.g. http://www.opengis.net/def/crs/EPSG/0/4326
    };
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
2 participants