-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
raise warning/error or use WKT for WMTS boundingbox CRS when no URI exists #1043
Comments
This comment has been minimized.
This comment has been minimized.
Considering WMTS is a >10 yr old spec and not really up to date I would say: Let's do what ever we think is good for the users :-) I'm fine having WMTS response that are not 💯 following the specs especially if it's for |
FYI: in the new OGC Tiles
for the bounding box. The OGC tiles specs allows the CRS to be either a URI or a wkt https://schemas.opengis.net/tms/2.0/json/crs.json |
okay excellent, I will work on this and double check things with qgis (rasterio can also probably use the wmts.xml files also to make sure everything is working). |
by the way @vincentsarago, have you reconsidered #546 ? The reason for me using wmts is to quickly demonstrate mosaic.json capabilities to users more familiar with QGIS. Now that QGIS has support via the OGCAPI gdal driver for OGC tiles it would make it even easier. |
What reconsideration? I've just added |
hmm okay I thought the last comment on that issue was indicating a won't fix. But in my testing I also wasn't able to use QGIS or the GDAL OGCAPI successfully, either way I got an error relating to a missing "bbox" parameter. Looking at GDAL's source there is a lookup for that key in the "coverage" section of the driver, but I didn't investigate further and I haven't really read into the coverages aspect of ogcapi yet. In QGIS I did select to use Do you have a working example with |
We can't fully support the OGC Tiles API, I'm not sure what QGIS/GDAL expect to be honest! |
okay well I may have misinterpreted that comment regarding what the OGC Tiles endpoints are for then. In anycase to solve the question for this issue something like |
@AndrewAnnex do we have anything to do here? |
okay yes there would need to be a PR to implement the options I suggested in the first posting or the most recent idea for |
So an issue I've known would be coming my way is in the use of
CRS_to_uri
inside the WMTSCapabilities.xml endpoints for the bounds object CRS parameter, which when using a slightly tweaked/custom CRS can result in aNone
being specified in the WMTS XML document. This causes issues with clients like QGIS, but will work as soon as a valid CRS URI (or interestingly WKT) is swapped in.After looking at this, I think I must conclude that this isn't a bug in pyproj/rasterio/rio-tiler. It is totally possible to define a tilematrixset or COG that uses a CRS that may use a geographic CRS that won't resolve with
to_authority
despite only minor modifications.Lowering the confidence parameter used in rio-tiler could help in some cases but won't work universally and could cause some other unintended issues. So it made the most sense to open an issue here and discuss solutions.
I think then there are 2/3 options
CRS_to_uri
evals toNone
None
to pass throughAfter reviewing OGC 06-121r9 (sections 10.2-10.3) it does look like for the most part clients would be expecting this CRS parameter to be a URI/URN. However, while testing I was able to use the full WKT string for the crs parameter and QGIS/GDAL was able to use it correctly. Given the ubiquity of GDAL, my expectation would be that this could be seen as a sensible fall back even if it's technically out-of-spec with the OGC, although maybe this is just plainly a bad idea...
My suspicion then is that option 1 would also be too aggressive of a fix and that it might just be best to keep the change in behavior minimal by logging a warning.
I am happy to implement this, but wanted to check with others before starting to see if there are other ideas or ways to work with the WMTS spec in ways I hadn't considered
The text was updated successfully, but these errors were encountered: