>
> I'd like any of the developers to read this draft about a common shared
> cache that I'd like to implement in JOSM:
>
> https://josm.openstreetmap.de/wiki/SharedTileCache
>
> Do you see anything missing or that you don't like?
> There is nothing "magical" about it, I'd just like to follow some common
> rules that would enable cache sharing.
>

Thanks for taking positive steps to resolve this cache issue.

This has been mentioned several times in the past in various places or I've at 
least thought it in my head :)

Here are some thoughts, which got a bit longer than I initially intended...

Location on Windows:
 Include Windows 8.1 (I think it follows the Win7 layout) and 
'C:\UsersPath\UserName' is better as %UserProfile%
(indeed see http://en.wikipedia.org/wiki/Home_directory for other OSs)

There
 are many other applications that could use such a shared cache layout 
(they must have there own schemes ATM, even if they at least use the 
standard Z/X/Y.ext structure somewhere.
Immediately can I think of Marble, Navit, GPS Prune and libchamplain which 
would all benefit from using this scheme.
I would be good to contact as many interested parties as possible.

Should there be way to say never cache the tiles? e.g. size=-1

May be specify what is 'short' for the directory name, e.g. up to 20 characters.

I
 have 9.0Gb in my viking-maps cache. If you've been using any such map 
program for a few years you may have got quite a lot of data. 
Transforming between old and new layouts *must be seamless*.
Hence I 
won't be applying your patch, but thank you for it - indeed for a new 
user as yourself - it will be easier to keep that cache layout.

I suspect JOSM can make a more clean cut jump from one lay out to another. 
Depends how vocal the Windows users are :), as they're the ones that would 
notice the change.
But some people do use JOSM for general purpose GPX / shapefile / etc... usage, 
not just OSM editing.

I
 still need to think how best to go about doing this in Viking, may be 
reading from the old first and saving to new - although that does make 
the code more complicated - and of course my time commitments and 
general interest in writing it...

I added the 'DIRECTDIRACCESS' method into Viking, as part of starting to 
building some support for the standard layout.
However
 the current implementation is aimed at pointing a directory source 
where you generate the tiles yourself (such as through an OSM rendering 
stack - not that I've ever gotten around to doing this...) which is why 
it deliberately doesn't download anything.

I never realized JOSM used a flat dir layout. <looks in 
/tmp/JMapViewerTiles_rob/>
I
 can see how this would get slow under Windows. Not such a good 
idea to potentially have many thousands of files in one directory in any OS.


I
 don't really understand the structure behind Viking's original cache 
layout. I guess the omission of the file extension was just because the 
original author didn't think to add it!
The top level dir names all 
seem to end in z0, I believe was in place for UTM positioning where z is
 a zone, as there are repeating UTM zones across the earth with 
Northings & Eastings within them. However I think UTM things get 
translated into Mercator Lat/Longs so the zone part is superfluous 
anyway.

I'm at least glad you're thinking of simple .ini files rather than .json files 
that becoming all the rage by some people ;)

Separately, could you explain how you think will do pruning in JOSM in more 
detail? It can be quite complicated:
e.g.
 How often and when it occurs, how will it find out the size of the 
cache (and how long that will take), does it delete highest zoom, lowest
 zoom or by 'however the files are on disk' first?
Do you worry about creating new files if the size is already reached?
How any feedback to the user will work, if it is required at all?
If you do switch to a cache new layout - are you going to auto delete the old 
layout?


NB
 In the Viking source code repo, in the tools directory there is a 
python program - viking-cache-mbtile.py - that converts a Viking cache 
into a MB Tiles files. You can then convert the MBTiles file into a 
normal TMS layout using http://github.com/mapbox/mbutil mbutil script.


Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.                                     
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to