Opened 13 years ago

Closed 13 years ago

#3753 closed bug (invalid)

"Zoom to best scale" takes a long time (inf?) for TMS layers.

Reported by: borysiasty Owned by: rblazek
Priority: critical: causes crash or data corruption Milestone: Version 1.7.0
Component: Rasters Version: Trunk
Keywords: raster provider, TMS, zoom to best scale Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

Description

Not long ago the Zoom To Best Scale was working fine with TMS layers (and was an important feature, allowing to synchronize the zoom with available tile levels). Last days it seems to take infinite time, hanging qgis.

Attachments (1)

ola.xml (637 bytes ) - added by borysiasty 13 years ago.
sample TMS source definition

Download all attachments as: .zip

Change History (3)

by borysiasty, 13 years ago

Attachment: ola.xml added

sample TMS source definition

comment:1 by rblazek, 13 years ago

I tried with both current trunk and pre raster providers branch merge r15391 and both work the same way, it takes some time and then gives GDAL error

ERROR 1: GDALWMS: Unable to download block 262143, 262143.
  URL: http://tile.openstreetmap.org/19/262143/262143.png
  HTTP status code: 404, error: (null).
ERROR 1: IReadBlock failed at X offset 262143, Y offset 262143
ERROR 1: GetBlockRef failed at X block offset 262143, Y block offset 262143
Warning: RasterIO error: GetBlockRef failed at X block offset 262143, Y block offset 262143

and zooms to very high resolution.

What do you mean by "synchronize the zoom with available tile levels"? Aren't you mixing with Openlayers?

comment:2 by borysiasty, 13 years ago

Resolution: invalid
Status: newclosed

Ok, I've checked it twice and the ticket was invalid. Sorry. The problem was in the xml file.

The "zoom to best scale" zooms to the zoom level defined in the <TileLevel> tag in the xml file. It was set to 19, while the OSM TMS supports zoom levels up to 18. If you set that tag to 18, everything works ok.

About the "synchronization". The OpenLayers layer, as well as WMS-C one, fixes the scale series to available zoom levels, so it works OOTB and it's fine. With the gdal minidriver, the scale is contnous, so the user has to take care of it and keep it always 1:2257, 1:4514, 1:9028 etc. Otherwise the image is ugly rescaled. There simplest way to keep the scale always corresponding to the avilable zoom levels is to use the "zoom to best scale" and then only use "zoom in" and "zoom out" to keep the 2x factor. I hope I'm clear this time :)

Note: See TracTickets for help on using tickets.