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

OGCAPI Features url of collection with dot #51663

Closed
2 tasks
j-pallas opened this issue Jan 31, 2023 · 2 comments
Closed
2 tasks

OGCAPI Features url of collection with dot #51663

j-pallas opened this issue Jan 31, 2023 · 2 comments
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@j-pallas
Copy link

What is the bug or the crash?

When a collections names of OGC API FEATURES have a dot, QGIS can't load this layer.

"Layer data source could not be found"

Maybe a solution is to add a forward slash "/" at the end of the URL request

Steps to reproduce the issue

  1. Go to '.Add new Layer '

  2. Click on 'WFS/ OGC API -Features'

  3. New connection. URL https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features
    image

  4. Select one layer and add

  5. See error. "Unavailable layer!. Layer data source could not be found."

Versions

Versió del QGIS
3.22.7-Białowieża
Revisió del codi QGIS
5a65627
Versió de Qt
5.15.3
Versió de Python
3.9.5
Versió de GDAL/OGR
3.4.3
Versió de PROJ
9.0.0
Versió de la base de dades de registres EPSG
v10.054 (2022-02-13)
Versió de GEOS
3.10.2-CAPI-1.16.0
Versió de SQLite
3.38.1
Versió de PDAL
2.3.0
Versió del client PostgreSQL
13.0
Versió de SpatiaLite
5.0.1
Versió de QWT
6.1.6
Versió de QScintilla2
2.13.1
Versió de l'SO
Windows 10 Version 2009

Connectors Python actius
concavehull
2.0
geocatbridge
4.3
OpenICGC
1.1.10
qgisnetworklogger
0.2.0
qgis_resource_sharing
0.16.0
quick_map_services
0.19.28
Socrata
2.2
db_manager
0.1.20
MetaSearch
0.3.5
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@j-pallas j-pallas added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 31, 2023
@rouault
Copy link
Contributor

rouault commented Jan 31, 2023

This is a bug on the server side.
I've just sent the following email to idec@icgc.cat

Title: Issue in OGC API Features implementation

Hi,

I'm a software developer of the QGIS open source software and a user recently reported in https://github.com/qgis/QGIS/issues/51663 an issue with the OGC API features client on your service: https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features

I've diagnosed the source cause to be on the server side. Namely the 2 following endpoints return an error:

1) https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections/inspire:AD.Address

2) https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections/inspire:AD.Address?f=application%2Fjson

I've found that the working URL is https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections/inspire:AD.Address/ with a trailing slash

1) is supposed to work due to requirement 18 of the OGC API features specification : cf https://docs.opengeospatial.org/is/17-069r4/17-069r4.html#_operation_5

2) is supposed to work because it is advertized as a link in the response of https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections?f=application%2Fjson

        {
          "href": ["https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections/inspire:AD.Address?f=application%2Fjson"](https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections/inspire:AD.Address?f=application%2Fjson),
          "rel": "self",
          "type": "application/json",
          "title": "This document"
        },

I would also note that the response to the https://geoserveis.ide.cat/servei/catalunya/inspire/ogc/features/collections/inspire:AD.Address/ request is suboptimal: it contains the list of all possible EPSG CRS codes, which doesn't make sense for Catalonia, where probably not more than 20 of them make sense.

Best regards,

@rouault
Copy link
Contributor

rouault commented Jan 31, 2023

Workaround on QGIS side in #51671

qgis-bot pushed a commit that referenced this issue Feb 23, 2023
nyalldawson pushed a commit that referenced this issue Feb 23, 2023
nyalldawson pushed a commit that referenced this issue Mar 5, 2023
nyalldawson pushed a commit that referenced this issue Mar 6, 2023
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!
Projects
None yet
Development

No branches or pull requests

2 participants