-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 update / fixes required #6832
Comments
{
"rel" : "http://www.opengis.net/def/rel/ogc/1.0/map",
"type" : "application/json",
"title" : "Maps available for this dataset (as JSON)",
"href" : "/ogcapi/collections/Daraa:AgricultureSrf/map?f=json"
} None of the following requests work:
So this is a server error. The OGCAPI driver only follows the href as it is specified. |
@rouault Thank you very much for looking into this. Oops, apologies, there is definitely a server error that I am fixing right now -- that JSON link should not be included. I did not expect these to still be present, so that is why I made wrong assumptions about what the client might be doing. However, there is no longer a separate JSON document describing the map, so the client should not be looking for or negotiating an EDIT: Fixed. -- The Now it fails with:
Most likely because it is looking for an intermediate JSON map metadata document that no longer exists.
Most likely because it is looking for the old
It seems that the reason blueMarble and SRTM_ViewFinderPanorama still worked was because they went through OGC API - Coverages. |
The churn in OGC APIs is quite concerning. #6881 tries to fix most issues reported here, but tilesets API don't work due to the JSON output of requests like https://maps.gnosis.earth/ogcapi/tileMatrixSets/WorldCRS84Quad having changed in incompatible way... Sigh^2. Hint for potential contributors: changes should be done in gcore/tilematrixset.cpp |
@rouault Thank you very much for the fixes. Which change(s) do you refer too? I thought we had taken a great amount of care to minimize any changes, and I honestly didnt't think anything was changed about this since our last successful Tiles TIEs with GDAL. Some things that might have changed since then in that particular file:
|
My guess is that GDAL expects the JSON profile of OGC Two Dimensional Tile Matrix Set v1.0 (https://docs.opengeospatial.org/is/17-083r2/17-083r2.html), whereas https://maps.gnosis.earth/ogcapi/tileMatrixSets/WorldCRS84Quad is probably v2 (https://docs.opengeospatial.org/is/17-083r4/17-083r4.html) (weird that the OGC ID of the doc is the same, except the revision number) |
@rouault Yes it is definitely 2.0, 1.0 is more or less abandoned. I personally prefer the version URIs like: http://www.opengis.net/doc/IS/tms/2.0 I wish they did not re-direct to the OGC document numbers. |
Also note that a client is not actually required to parse the TileMatrixSet definition and can recognize a registered TileMatrixSet when the e.g., when it recognizes http://www.opengis.net/def/tilematrixset/OGC/1.0/WorldCRS84Quad (CURIE: |
OGCAPI: update for map api; also for tiles but not working properly due to churn in tilematrixset spec (fixes #6832)
…ue to churn in tilematrixset spec (fixes #6832)
[Backport release/3.6] OGCAPI: update for map api; also for tiles but not working properly due to churn in tilematrixset spec (fixes #6832)
In the context of the OGC Web Mapping Code Sprint.
Related QGIS issue about better supporting OGC API: qgis/QGIS#50296 .
Note: OGC API - Tiles is now published.
Expected behavior and actual behavior.
First part: (out of date OGC API - Maps)
Using gdalinfo and ogrinfo with some OGC API collection end-points offering vector tiles reports a failure, and triggers invalid
/map?f=json
requests.For example:
OGCAPI:https://maps.gnosis.earth/ogcapi/collections/Daraa:AgricultureSrf
Note that the
f=
parameter is not specified by most OGC API (EDR being the one exception), and that clients should always use theAccept:
header instead to negotiate a particular representation, or follow typed links (that would already contain thef
parameter). Thehref
in links must be treated as opaque and the client should not add additional parameters.The map metadata resource is no longer part of the OGC API - Maps specification. Instead, the landing page and/or collection contains a link to a map resource with the
[ogc-rel:map]
relation type, which is directly the map itself.Second part: (out of date OGC API - Tiles)
Furthermore, although both gdalinfo and ogrinfo on a multi-layer collection shows subdatasets in gdalinfo and ogrinfo, QGIS will report a failure to add the layer. It is unclear whether this is a GDAL or QGIS bug... It used to be that QGIS would show a dialog listing available collections to add.
For example:
OGCAPI:https://maps.gnosis.earth/ogcapi/collections/Daraa
One change that has been introduced that may be the source of the problem is the separate
tilesets-map
/tilesets-vector
/tilesets-coverage
URIs for different tilesets types, as opposed totilesets
for all.Also please note that the client should support both
http://
URIs and CURIEs, e.g.[ogc-rel:tilesets-vector]
, for TileMatrixSets URIs as well (but see opengeospatial/NamingAuthority#211).Note that both Map and Coverage collections still seem to work fine in QGIS, e.g.:
https://maps.gnosis.earth/ogcapi/collections/SRTM_ViewFinderPanorama
https://maps.gnosis.earth/ogcapi/collections/blueMarble
Steps to reproduce the problem.
First problem (single layer collection showing FAILURE: in ogrinfo and gdalinfo):
gdalinfo
OGCAPI:https://maps.gnosis.earth/ogcapi/collections/Daraa:AgricultureSrf
ogrinfo
OGCAPI:https://maps.gnosis.earth/ogcapi/collections/Daraa:AgricultureSrf
Second problem (neither multi-layer nor single layer collection offering vector tiles working in QGIS:
QGIS > Add Layer > Vector > File > OGCAPI:https://maps.gnosis.earth/ogcapi/collections/Daraa ; Add button
or
QGIS > Add Layer > Vector > File > OGCAPI:https://maps.gnosis.earth/ogcapi/collections/Daraa:AgricultureSrf ; Add button.
GDAL version and provenance
GDAL 3.3.1, released 2021/06/28
QGIS version | 3.22.2-Białowieża
The text was updated successfully, but these errors were encountered: