[Gdal-dev] gdalwarp with MEM format

Frank Warmerdam warmerdam at pobox.com
Mon Mar 27 21:28:58 EST 2006


Upendra wrote:
> Hello,
>   I am new to GDAL API. Could anyone help give me some
> hint on this? In "GDAL FAQ" section in the GDAL
> homepage, one of the questions is:
>   Why won't gdalwarp or gdal_merge write to most
> formats?
> 
> And in the answer, I see the following statement:
> 
>  "When you encounter this problem it is generally a
> good idea to first write the result to GeoTIFF format,
> and then translate to the desired target format."
> 
> Is it possible to write the data first to MEM format
> instead of GeoTIFF format and then translate to the
> desired target format? Could there be any problems?
> That way I don't have to write to the disk.

Upendra,

Well, the comment was mostly written for users of the
gdalwarp commandline program.  With it there is no option
to write to MEM, and then to the output file.

But if you are using the API, then yes, as long as the output image
isn't impractically large you could write it to MEM format and then
pass that to CreateCopy() to write to disk in the desired output format.

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 OSGF, http://osgeo.org




More information about the Gdal-dev mailing list