Modify

Opened 17 months ago

Closed 3 months ago

Last modified 3 months 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 https://github.com/osmlab/editor-layer-index/pull/290#issuecomment-288808627

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.

URL:http://josm.openstreetmap.de/svn/trunk
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
Revision:11772
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: [-Djava.security.manager, -Djava.security.policy=file:<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

Plugins:
+ 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:
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/StolpersteineLight&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ %UserProfile%\Documents\OSM\JOSMSVN\data\defaultpresets.xml
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/DE.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Industrial&zip=1
+ http://somewhere.dk/email/josm/source.xml

Map paint styles:
+ %UserProfile%\Documents\OSM\JOSMSVN\styles\standard\elemstyles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- %UserProfile%\Documents\OSM\eigene styles\maxspeed\maxspeed_2.8_01 zeige richtungspfeile.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/sac_scale&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ShowID&zip=1
- %UserProfile%\Documents\OSM\eigene styles\PriorityRoad\PriorityRoad_1.0.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1
- %UserProfile%\Documents\OSM\eigene styles\layer checker\layer checker_1.2.mapcss
- %UserProfile%\Documents\OSM\TestNew\newicons.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1
- %UserProfile%\Documents\OSM\patches\old MPs\dataquality.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&style&zip=1
- https://raw.githubusercontent.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LitObjects&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1
- %UserProfile%\Documents\OSM\eigene styles\Tourenplanung.mapcss
- %UserProfile%\Documents\OSM\eigene styles\SpecificBuildingValues\SpecificBuildingValues.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- %UserProfile%\Documents\OSM\eigene styles\area-symbol.zip
- http://www.freietonne.de/ft_icons/josm/FreieTonne_rules_presets_zip.php
- https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1
- http://www.openrailwaymap.org/styles/standard.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/DestinationSignRelation&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Incline&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AdvertisingStyle&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1
- https://github.com/gmgeo/osmic-josm-style/archive/master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/hazmat&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Suburb&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Postcode&zip=1

Validator rules:
+ https://raw.githubusercontent.com/<user.name>n-a-bauer/josm-validators/master/mtb.validator.mapcss
+ %UserProfile%\Documents\OSM\TestNew\new.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
- %UserProfile%\Documents\OSM\TestNew\germ.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/CzechRepublicAddressSystem&zip=1

Last errors/warnings:
- W: java.net.MalformedURLException: unknown protocol: c

Attachments (1)

14562.patch (1.8 KB) - added by wiktorn 3 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 17 months ago by Klumbumbus

Description: modified (diff)

comment:2 Changed 17 months ago by Don-vip

I think there's already a ticket for this.

comment:3 Changed 17 months ago by wiktorn

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

comment:4 Changed 17 months ago by Klumbumbus

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

(Checked with custom tms entry http://caltopo.s3.amazonaws.com/topo/{zoom}/{x}/{y}.png and adding it at z17, displays 403 error.)

comment:5 Changed 3 months ago by Don-vip

Duplicate of #13738?

comment:6 Changed 3 months ago by wiktorn

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.

comment:7 in reply to:  6 Changed 3 months ago by Klumbumbus

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 Changed 3 months ago by wiktorn

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

Changed 3 months ago by wiktorn

Attachment: 14562.patch added

comment:9 Changed 3 months ago by wiktorn

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 Changed 3 months ago by Don-vip

Milestone: 18.06

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.