Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#14562 closed enhancement (fixed)

[PATCH] automatically load tms tile from lower zoom level if current zoom level doesn't provide tiles

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 18.06
Component: Core imagery Version:
Keywords: template_report Cc:

Description (last modified by Klumbumbus)

see also

What steps will reproduce the problem?

  1. have a tms source without explizit max_zoom set
  2. zoom in far
  3. add the source

What is the expected result?

tile from highest zoom level

What happens instead?

403 error is displayed

Please provide any additional information below. Attach a screenshot if possible.

only after you zoomed out to the highest zoom level of the source the tiles are loaded. after this no 403 errors are displayed anymore

The reason to not explicitly set the max_zoom is that we maybe don't notice when the imagery provider increases the maxzoom and then we don't present the best tiles to the user.

Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-03-23 00:01:04 +0100 (Thu, 23 Mar 2017)
Build-Date:2017-03-23 02:32:15
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11772 de) Windows 10 64-Bit
Memory Usage: 1832 MB / 3641 MB (833 MB allocated, but free)
Java version: 1.8.0_121-b13, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [,<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest-mehr-RAM.jnlp, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=1024m,4096m, -Djnlpx.splashport=50386, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found

+ AddrInterpolation (33160)
+ DirectDownload (33160)
+ DirectUpload (33182)
+ FastDraw (33182)
+ HouseNumberTaggingTool (33160)
+ Mapillary (v1.4.2)
+ OpeningHoursEditor (33185)
+ Tracer2 (33004)
+ alignways (33182)
+ apache-commons (32994)
+ apache-http (32699)
+ buildings_tools (33004)
+ contourmerge (1030)
+ editgpx (33004)
+ imagery-xml-bounds (33004)
+ imagery_offset_db (33004)
+ jogl (1.0.46)
+ log4j (32699)
+ measurement (33088)
+ osm-obj-info (1484152384)
+ photo_geotagging (33088)
+ photoadjust (33088)
+ reltoolbox (33088)
+ reverter (33088)
+ tag2link (33035)
+ tageditor (33021)
+ tagging-preset-tester (33004)
+ terracer (33088)
+ turnlanes-tagging (254)
+ turnrestrictions (33088)
+ undelete (32699)
+ utilsplugin2 (33182)
+ wikipedia (33098)

Tagging presets:
+ %UserProfile%\Documents\OSM\JOSMSVN\data\defaultpresets.xml

Map paint styles:
+ %UserProfile%\Documents\OSM\JOSMSVN\styles\standard\elemstyles.mapcss
- %UserProfile%\Documents\OSM\eigene styles\maxspeed\maxspeed_2.8_01 zeige richtungspfeile.mapcss
- %UserProfile%\Documents\OSM\eigene styles\PriorityRoad\PriorityRoad_1.0.mapcss
- %UserProfile%\Documents\OSM\eigene styles\layer checker\layer checker_1.2.mapcss
- %UserProfile%\Documents\OSM\TestNew\newicons.mapcss
- %UserProfile%\Documents\OSM\patches\old MPs\dataquality.mapcss
- %UserProfile%\Documents\OSM\eigene styles\Tourenplanung.mapcss
- %UserProfile%\Documents\OSM\eigene styles\SpecificBuildingValues\SpecificBuildingValues.mapcss
- %UserProfile%\Documents\OSM\eigene styles\

Validator rules:
+ %UserProfile%\Documents\OSM\TestNew\new.validator.mapcss
- %UserProfile%\Documents\OSM\TestNew\germ.validator.mapcss

Last errors/warnings:
- W: unknown protocol: c

Attachments (1)

14562.patch (1.8 KB ) - added by wiktorn 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 by Klumbumbus, 7 years ago

Description: modified (diff)

comment:2 by Don-vip, 7 years ago

I think there's already a ticket for this.

comment:3 by wiktorn, 7 years ago

AFAIR we look only 3 levels up to check for tiles. Could it be, that in your situations the difference is bigger?

comment:4 by Klumbumbus, 7 years ago

No, it doesn't look up even if the zoom level is only 1 higher.

(Checked with custom tms entry{zoom}/{x}/{y}.png and adding it at z17, displays 403 error.)

comment:5 by Don-vip, 6 years ago

Duplicate of #13738?

comment:6 by wiktorn, 6 years ago

Resolution: irreproducible
Status: newclosed

I've added caltopo with max z18, and at z17 and z18 it looks alright (fetches images from z16).

I guess that's already fixed.

in reply to:  6 comment:7 by Klumbumbus, 6 years ago

Replying to wiktorn:

I've added caltopo with max z18, and at z17 and z18 it looks alright (fetches images from z16).

Nah, you need to NOT set max_zoom, then zoom to z17 or z18 or z19.. and then add the layer. This ends in 403 errors.

However it seems this is rather a special problem with this source as it works fine with other tms sources like "7th Series (OS7)" or "OS New Popular Edition historic" (both at Maps/United Kingdom) (i.e. it loads the tiles from the highest available zoom level even when the imagery is added at e.g. z24) so I think there is no really a need for a fix in JOSM here.

comment:8 by wiktorn, 6 years ago

Resolution: irreproducible
Status: closedreopened
Summary: automatically load tms tile from lower zoom level if current zoom level doesn't provide tiles[PATCH] automatically load tms tile from lower zoom level if current zoom level doesn't provide tiles

Ok, now I could reproduce it. Attaching preliminary patch. This change, although small, needs attention as it may affect performance

by wiktorn, 6 years ago

Attachment: 14562.patch added

comment:9 by wiktorn, 6 years ago

Resolution: fixed
Status: reopenedclosed

In 13861/josm:

Ensure that tiles from lower zoom leveles are loaded

When lower zoom leveles doesn't have any tiles initiate loading and ensure, that
tiles will be loaded and in tile cache. This tiles will be used to render
imagery when no tiles are availble at current tile zoom level.

Duplicate requests for loading will be handled by TileLoader factories so this
should not generate memory load or unnecessary requests to imagery server.

Closes: #13738, #14562

comment:10 by Don-vip, 6 years ago

Milestone: 18.06

comment:11 by wiktorn, 6 years ago

In 14260/josm:

Fix unnecessary tile downloads.

Only download tiles from upper levels when we finished downloading all tiles in

Closes: #16747
See: #14562

comment:12 by wiktorn, 6 years ago

In 14287/josm:

Rollback [14260].

Because of regressions rollback of [14260].

See: #14562, #16747
Closes: #16789

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.