Modify

Opened 4 years ago

Closed 4 years ago

#3294 closed defect (fixed)

[PATCH] use wmsplugin cache more often (zoomlevel 100 m != 101 m)

Reported by: alexm Owned by: xeen
Priority: normal Component: Core imagery
Version: latest Keywords: cache
Cc:

Description

When I download Yah00 or Landsat images at let's say zoom level 100m, they are only reused at exactly this zoom level - but at 101m I get basically the same resolution data from yahoo, just a bit scaled or something.

Maybe the cache should also remember on which zoom levels the data is available and provide an option "change resolution to xx m that is in the cache".

Otherwise it is almost impossible to find that zoomlevel again and actually use the cache!

Attachments (2)

josm_patch_3294.svndiff (6.5 KB) - added by alexm 4 years ago.
WMS Bookmarks including Resolution
josm_patch_3294-fix1.diff (6.5 KB) - added by alexm 4 years ago.
Updated Patch

Download all attachments as: .zip

Change History (17)

comment:1 Changed 4 years ago by alexm

  • Summary changed from use wmsplugin cache more often to use wmsplugin cache more often (zoomlevel 100 m != 101 m)

comment:2 Changed 4 years ago by xeen

Currently the cache just stores the images under a random name that encodes coordinates, resolution and so on. It's not possible to extract that information from the filename however. This is of course fixable, but would require some work.

The WMS zoom level is determined when you activate the layer. Zooming in will solely scale up the images but not request a higher zoom level from the server. Unless you right click on the WMS layer and select "reload" the cache will be used. You can easily go to an exact zoom level by clicking the coordinates in the statusbar und the lower left. Just enter '100m' and you'll be there. Also, if you only use the scroll wheel to zoom in and out, you will arrive at 100m again if you started from there.

comment:3 follow-up: Changed 4 years ago by anonymous

Nice idea, but that jump function is not working :(

What about giving the wms pluging a set of usefull ("Most effective") standard zoom levels to choose from, when creating the WMS Layer and make it less dependend on the current viewpoint ?

comment:4 Changed 4 years ago by alexm

The most recent comment was done by me.

comment:5 in reply to: ↑ 3 Changed 4 years ago by vsandre

Replying to anonymous:

Nice idea, but that jump function is not working :(

You can do that with the utilsplugin

comment:6 Changed 4 years ago by alexm

THe function is there, but when I enter 5.0 5.0 and "100" (m) it is not working.

comment:7 Changed 4 years ago by xeen

It works for me. Which JOSM version, utilsplug version and which projection do you use?

comment:8 Changed 4 years ago by xeen

(if you create a new layer using ctrl+n you need to zoom out a bit first so the map scaler displays reasonable values. Otherwise jump to will not work properly. This is a known bug though, but I can't find the bug number right now)

comment:9 Changed 4 years ago by alexm

Thanks, jumping works now.

Okay. I downloaded a lot of landsat at around 200m , but entering it again does not work. In the code, internally it looks like some pixel-per-km value is used and I enter meter so I guess it is different.
I guess I have to download all of it again? Or choose the right decimal points of the meter scale ... sound's like fun.

Alex

comment:10 Changed 4 years ago by xeen

  • Owner changed from team to xeen

I can confirm this issue. I'll look into it.

comment:11 Changed 4 years ago by xeen

I've looked into it, and it seems that upon zooming the grid from which tiles are requested changes, even if the zoom level is restored to the same value afterwards.

I.e. 8.6011951 becomes 8.6011264 and therefore no cache is hit. I'll see if I can find out why that's the case.

comment:12 Changed 4 years ago by xeen

Bug depends on #3325

comment:13 Changed 4 years ago by alexm

I can not confirm that changing the grid leads to cache-MISS. But: The concerning the resolution, we must hit the right PixelPerDegree value up to the final decimal digit.

I made a small patch that adds the new function "Set WMS Bookmark" to the popup menu for WMS layers. Then, the current resolution can be restored easily by selecting the added entry in WMS menu (with #PPD=12345.67890).

But maybe it would be better to store such information in the cache directory in some kind of index file (and also the information for which position data was feteched at which resolution and so on) Then we could provide a menu or even icons on the WMS layer for "fetch from cache" that change the resoultion to the cached value.

Changed 4 years ago by alexm

WMS Bookmarks including Resolution

Changed 4 years ago by alexm

Updated Patch

comment:14 Changed 4 years ago by stoecker

  • Summary changed from use wmsplugin cache more often (zoomlevel 100 m != 101 m) to [PATCH] use wmsplugin cache more often (zoomlevel 100 m != 101 m)

comment:15 Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.