[gdal-dev] Map Caching with GDAL
Frank Warmerdam
warmerdam at pobox.com
Sun Feb 3 13:10:49 EST 2008
marcello ferrero wrote:
> Hi Robert,
> thanks for the reply.
> Maybe I'm wrong, but tilecache and memcached both are server side
> modules, while I need something for the client side of my application
> (think about something like google maps mobile).
> On the other side GDAL in-memory raster seems to me capable of
> managing pre-decoded raster buffers that in my case would occupy too
> much memory.
>
> That's why I need something that is able to read a png (or jpeg)
> encoded buffer from memory as it was a file reading.
Marcello,
I didn't really follow your question closely the first time around. GDAL
does support reading some file formats directly from memory. This is
used in drivers like WCS for instance. Some useful entry points are:
http://www.gdal.org/cpl__vsi_8h.html#1ecb3a78729ecea4d2ce22065a605244
http://www.gdal.org/cpl__vsi_8h.html#66e2e6f093fd42f8a941b962d4c8a19e
You can see this in use in the minimal HTTP driver which just fetches
a remote file, and then opens it from the memory buffer.
http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/wcs/httpdriver.cpp
Note that "in memory" files must have filenames in the /vsimem/ subtree.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list