[Geowanking] Terraserver tile caching?
nelson at crynwr.com
Sat Jan 15 12:32:02 PST 2005
Andy Armstrong writes:
> Russell Nelson wrote:
> > Anybody have an interest in creating a scalable system for Terraserver
> > tile caching? Right now I'm just throwing everything into one
> > directory. That doesn't scale very well on most filesystems. For
> > example, I have 28,351 tiles stored right now, and I can hear the disk
> > wanking on that directory.
> Is this for some code you're writing? Which language?
Mapview. http://pygps.org/#mapview . Written in Python, but, really,
the language doesn't really matter. What's most important is to have
a standard way to translate a Terraserver T=this & S=that into a
filename. Storing all of the tiles in one directory won't cut it.
Viking, PyTerra, mapview, and terrapaste currently all cache into a
I'll propose something:
1) tiles should be stored in /var/cache/terra. That directory, and
all of its children, should have 777 and the sticky bit set, so
that anybody can store files, but nobody can overwrite files.
2) the name of a tile should be this, as expressed in Perl:
or in Python:
"s$(scale)dt$(type)dz$(zone)d/$(x)d/$(y)d" % locals()
or in C::
sprintf("s%dt%dz%d/%d/%d", scale, type, zone, x, y);
3) Programs automatically create directories as needed.
--My blog is at angry-economist.russnelson.com | Freedom means allowing
Crynwr sells support for free software | PGPok | people to do things the
521 Pleasant Valley Rd. | +1 315-323-1241 cell | majority thinks are
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP | stupid, e.g. take drugs.
More information about the Geowanking