Bug report #14658

Wmts layer not appearing

Added by Vincenzo Pizzo over 4 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WMS
Affected QGIS version:2.14.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22622

Description

I have some issues with this wmts server: http://webapps.sit.puglia.it/arcgis/rest/services/Background/CatastoImpianto/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml
I connect to the server, the layer appears but nothing is displayed. The same wmts layer is correctly displayed in arcmap so I suppose the wmts server is ok.


Related issues

Related to QGIS Application - Bug report #14596: wmts nor referenced Closed 2016-03-31

Associated revisions

Revision 430694ba
Added by Martin Dobias about 4 years ago

Fix identify tool for WMS if webkit is not available (fixes #14658)

History

#1 Updated by Giovanni Manghi over 4 years ago

  • Operating System deleted (WINDOWS 8)
  • Target version deleted (Version 2.14)

this is the log

2016-04-11T18:20:17    0    repeat tileRequest 1 tile 0(retry 1)
2016-04-11T18:20:18    0    repeat tileRequest 1 tile 0(retry 2)
2016-04-11T18:20:18    0    repeat tileRequest 1 tile 0(retry 3)
2016-04-11T18:20:18    1    Tile request max retry error. Failed 3 requests for tile 0 of tileRequest 1 (url: http://webapps.sit.puglia.it/arcgis/rest/services/Background/CatastoImpianto/ImageServer/WMTS/tile/1.0.0/Background_CatastoImpianto/default/nativeTileMatrixSet/0/506/564.png)

#2 Updated by Vincenzo Pizzo over 4 years ago

  • Assignee set to Giovanni Manghi

Sorry but I'm a novice.
What do you mean?

#3 Updated by Jürgen Fischer over 4 years ago

  • Assignee deleted (Giovanni Manghi)

#4 Updated by Giovanni Manghi over 4 years ago

Vincenzo Pizzo wrote:

Sorry but I'm a novice.
What do you mean?

it was just to add more informations to this report.

#5 Updated by Saber Razmjooei over 4 years ago

  • Status changed from Open to Feedback

Are you trying to add it from Layer > Add Layer > Add WMS or through the Browser panel.

I had some problems (with 2.8) when trying to add it from the Browser panel but from layer or toolbar it works fine.

#6 Updated by Giovanni Manghi over 4 years ago

  • Status changed from Feedback to Open

Saber Razmjooei wrote:

Are you trying to add it from Layer > Add Layer > Add WMS or through the Browser panel.

I had some problems (with 2.8) when trying to add it from the Browser panel but from layer or toolbar it works fine.

this does not seems the case.

Other arcgis 10 based wmts services seems to work, like

http://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroNHD/MapServer/WMTS/1.0.0/WMTSCapabilities.xml

but anyway in the log do still show similar log messages like the one posted above.

#7 Updated by Martin Dobias about 4 years ago

My impression is that the server does not follow WMTS specification properly.

Info from GetCapabilities ... layer's extent:

<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::32633">
<ows:LowerCorner>494382.83364768786 4409764.91267182</ows:LowerCorner>
<ows:UpperCorner>800070.7019800352 4683797.957030918</ows:UpperCorner>
</ows:BoundingBox>

And the base tile matrix:

<TileMatrix>
<ows:Identifier>0</ows:Identifier>
<ScaleDenominator>7559.523809523809</ScaleDenominator>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>565</MatrixWidth>
<MatrixHeight>507</MatrixHeight>
</TileMatrix>

Now, valid range of tiles for zoom level 0 are in interval <9807, 10313> for X tile numbers and <10362, 10926> for Y tile numbers - it is mentioned here [1] (look for Start Tile / End Tile links) but such information does not appear in WMTS GetCapabilities. QGIS makes use of the MatrixWidth and MatrixHeight values, so even though if it calculates correct tile for area within valid extent, e.g. tile [10062, 10702], see [2], it clamps the tile range to <0, MatrixWidth-1> for X tile numbers and <0, MatrixHeight-1> for Y tile numbers. (Optionally, it uses TileMatrixLimits if they are present, which is not the case here).

In my opinion, the server should report correct MatrixWidth and MatrixHeight values, and optionally it should make use of TileMatrixLimits to define valid range of tiles. A second opinion would be welcome to confirm or reject my theory.

If I remove bounds checking in QgsWmtsTileMatrix::viewExtentIntersection(), things work as expected. It may be possible to add an option to disable the bounds checking to work around issues with other ArcGIS WMTS servers.

[1] http://webapps.sit.puglia.it/arcgis/rest/services/Background/CatastoImpianto/ImageServer/

[2] http://webapps.sit.puglia.it/arcgis/rest/services/Background/CatastoImpianto/ImageServer/WMTS/tile/1.0.0/Background_CatastoImpianto/default/default028mm/0/10062/10702.png

#8 Updated by Martin Dobias about 4 years ago

  • Status changed from Open to Closed

#9 Updated by Martin Dobias about 4 years ago

  • Status changed from Closed to Feedback

Arrgh... this one is not fixed yet, I have only mistakenly mentioned this bug in my commit (it actually fixes #15596)

#10 Updated by Giovanni Manghi almost 4 years ago

  • Status changed from Feedback to Open

#11 Updated by Giovanni Manghi over 3 years ago

  • Regression? set to No
  • Easy fix? set to No

#12 Updated by Martin Dobias over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF