The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net

[closed] Store Area Function - Cached Tile Tracking

Something wrong? Report it here
Post Reply
Yemble
Posts: 333
Joined: Sun Apr 28, 2013 5:02 pm

[closed] Store Area Function - Cached Tile Tracking

Post by Yemble »

There is something not quite right with the analysis phase of the Store Area function, in that it does not always recognise tiles that already exist in the cache. This results in a potentially large number of unecessary tile downloads, especially when covering a large map area.

To prove this I panned around the Isle Of Man at all OSGB 1:50K zoom levels to ensure that every available tile was in cache. I then used Store Area to define an area around IoM at 1:50K scale. This should not download any tiles and yet it does. This experiment is totally repeatable. Unfortunately, this is hampering my attempt to create an offline map on the entire UK at OSGB 1:50K and 1:25K scales since this issue effectively makes the process never ending!

One other issue I have encountered is that the download process sometimes does not come to a clean end. Instead it stays hung at 100% with only the option to cancel. This only happens when there have been some errors, but not every time.
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Store Area Function - Cached Tile Tracking

Post by Psyberia-Support »

Hi and thanks for your post,
Are you sure that you haven't just missed some tiles during your first download?
I tried to reproduce this issue few times and it worked just fine.
Here is how I proceeded to be sure to have the exact same area selected:
- Moved the map to the wanted area and selected a zoom level about 1:100k;
- Opened the store area tool;
- Adjusted the maximum zoom level to something like 1:25k, without moving the map or adjusting the area so the default area is preserved;
- Started the process to completely download the area;
- At the end of the process, I closed the store area tool and opened it just after (again without moving anything);
- Re-adjusted the maximum zoom level to the previously used one. At that point, I was sure that the exact same area had been selected, and that no nothing should be downloaded again.
- Re-started the process, and as expected no images have been downloaded (At the end of the process you can long-press a map and select 'Details' to check how many images have been really downloaded).
Please let me know if you can reproduce your issue with a similar process.
Concerning the second point, I also came across it one time. I'll try to reproduce and fix it.
Best regards.
Do you like AlpineQuest ? Leave a small comment on Google Play !
Yemble
Posts: 333
Joined: Sun Apr 28, 2013 5:02 pm

Re: Store Area Function - Cached Tile Tracking

Post by Yemble »

Hi, yes I am certain that there is an issue here with the tile analysis phase. It only really shows up when a very large area is chosen. The problem never arises when the zoom selector is green.

For example, I have now, successfully downloaded the entire southern half of the UK at all three 1:50K zoom levels. I know this, because if I select a smaller sub-set area "window" and start the download, no tiles are downloaded (which is correct). By moving this windows around the entire area I can verify that the entire region is fully downloaded. Yet, if I then select an area that covers the same region in its entirety in a single window - then the download will always find another 5000 tiles to download, which has to be a duplication of existing cached data!

Putting my programming hat on, I would suggest that this sounds like a wrap-around of some variable - maybe a short integer needs to be a long, or something along those lines?

On the non-completion issue, for large downloads (well into the red zone), I would estimate the frequency of the problem at about one in five downloads.
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Store Area Function - Cached Tile Tracking

Post by Psyberia-Support »

Ok thanks for the detail.
I'll have a closer look at this and let you know.
Do you like AlpineQuest ? Leave a small comment on Google Play !
Yemble
Posts: 333
Joined: Sun Apr 28, 2013 5:02 pm

Re: Store Area Function - Cached Tile Tracking

Post by Yemble »

One thing I have noticed, is that there seems to be increased numbers of "phantom" tile downloads at the edges of the map (OSGB not the base map). This makes me wonder if something goes wrong where no tiles actually exist to be downloaded. This does not cover the entire issue, but it may be a contributing factor.
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Store Area Function - Cached Tile Tracking

Post by Psyberia-Support »

Hi,
Just an update on this subject: I have improved the area downloader for the next version.
[*] I think I have located and fixed the issue of the "100% un-terminated" process. I'll see with time if I come across it again.
[*] I have also improved the speed (it should more than double).
[*] Tiles in error are now reprocessed at the end of the process (max 50% of the initial number are reprocessed, and only network ones).
[*] I have made other small improvements and fixes.

However I haven't found the reason of your main issue.
I don't think it's an issue of wrap-around data type. I have only found a minor display error caused by that (select Google Map, maximum level, then zoom to the minimum level to select the larger area, and you will see a negative tiles count - now fixed).
I also checked edges of the maps, but could not reproduce it either. Tiles are considered as "success" if they were successfully downloaded and stored locally. So if the server replies something like "tile doesn't exist for this area", then it will be considered as an error. So if you have a first process as complete success, you should never have tiles to re-download.

Best regards
Do you like AlpineQuest ? Leave a small comment on Google Play !
Yemble
Posts: 333
Joined: Sun Apr 28, 2013 5:02 pm

Re: Store Area Function - Cached Tile Tracking

Post by Yemble »

The ability to configure a much larger tile maximum for the download area has helped enormously with this issue, especially if the download is kept in the green.

One area of the UK OSGB map that does still exhibit the issue repeatedly (at least for me) are the Orkney and Shetland isles at the North East tip of Scotland. On the base map, these look to be two island clusters connected by an unbroken expanse of sea. However, once you zoom into the 1:50K / 1:25K scales, it is clear that the OS have split this area into several land 'maplets' and excluded most of the sea only areas. These areas either appear as black or as unknown tiles (white).

So, if I surround both island groups on the base map with a download area (max set to 100000 and kept in the green), the number of tiles reported as being required for downloading is always far in excess of the actual number. If you let the process run to completion, then run it again with the same area, it will still report several thousands of missing tiles, even though the previous download completed 100% successfully.

I'll give it yet another go tonight on my Note, but I remain convinced that there is an anomaly somewhere in the process...

BTW, eagerly looking forward to the next version with all of these useful tweaks (plus others mentioned elsewhere) :-)
Yemble
Posts: 333
Joined: Sun Apr 28, 2013 5:02 pm

Re: Store Area Function - Cached Tile Tracking

Post by Yemble »

Ha... isn't that just typical... having convinced myself last week that there was a repeatable issue with large tile downloads, when I repeat the experiment with the same map area today, AQ works perfectly! I kept the download within the green, but with an area covering Orkney and Shetland and it did not download any tiles on the second attempt... which means that it worked properly.

OMG, I'm hanging my head in shame :oops:
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Store Area Function - Cached Tile Tracking

Post by Psyberia-Support »

Thanks for the feedback by the way.
I'm glad to see that there is something less to fix!
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply