[gdal-dev] Fwd: How to reuse memory pointer of GDAL Memory driver

Mateusz Loskot mateusz at loskot.net
Fri Jun 3 12:10:54 PDT 2016


On 3 June 2016 at 20:45, Pol Monsó Purtí <lluna.nova at gmail.com> wrote:
> I've seen this mysterious article http://www.gdal.org/frmt_mem.html which
> references the `DATAPOINTER` option. I've seen another reference
> [here](https://lists.osgeo.org/pipermail/gdal-dev/2006-November/010583.html)
> which does
>
>
> sprintf(filename,"MEM:::DATAPOINTER=%d,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%d,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0",datpt,pixels,lines,datatype);
>     dataset = GDALOpen(filename,GA_Update);
>
> How would this translate to c++?

The line above is valid C++, isn't it.
If you followed to Frank's answer [1], you'd see it slightly corrected
but the technique remains the same.

[1] https://lists.osgeo.org/pipermail/gdal-dev/2006-November/010603.html

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list