Opened 16 years ago
Closed 16 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 | Milestone: | |
| 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)
Change History (17)
comment:1 by , 16 years ago
| Summary: | use wmsplugin cache more often → use wmsplugin cache more often (zoomlevel 100 m != 101 m) |
|---|
comment:2 by , 16 years ago
follow-up: 5 comment:3 by , 16 years ago
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:5 by , 16 years ago
Replying to anonymous:
Nice idea, but that jump function is not working :(
You can do that with the utilsplugin
comment:6 by , 16 years ago
THe function is there, but when I enter 5.0 5.0 and "100" (m) it is not working.
comment:7 by , 16 years ago
It works for me. Which JOSM version, utilsplug version and which projection do you use?
comment:8 by , 16 years ago
(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 by , 16 years ago
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:11 by , 16 years ago
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:13 by , 16 years ago
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.
comment:14 by , 16 years ago
| Summary: | use wmsplugin cache more often (zoomlevel 100 m != 101 m) → [PATCH] use wmsplugin cache more often (zoomlevel 100 m != 101 m) |
|---|



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.