[gdal-dev] Map Caching with GDAL

Robert Coup robert.coup at onetrackmind.co.nz
Fri Jan 25 17:14:06 EST 2008


On 26/01/2008, marcello ferrero <marcello_ferrero at yahoo.com> wrote:
> in order to implement a map caching mechanism for my application I need to read tiles from a server (for example OpenStreetMap) and keep them in memory to speed up subsequent access to the same tiles once they have been already downloaded from the map server.
> To implement this, I'm going to manage a single indexed (x,y,z) data file where I keep the dump of each .png (or .jpg) file.

TileCache running with memcached could do exactly what you want, or
just memcached on its own.
  http://www.tilecache.org/
  http://www.danga.com/memcached/

> Therefore I need to access the .png (or .jpg) tile not from a file (in that case I would simply use GDALOpen to open it), but from a memory buffer.
>
> What are the GDAL functions to do what I need?

Have a look at the in-memory raster documentation:
http://gdal.org/frmt_mem.html

Rob :)


More information about the gdal-dev mailing list