[gdal-dev] Creating modified copies of a file

Even Rouault even.rouault at mines-paris.org
Tue Jul 5 18:38:25 EDT 2011


Le mercredi 06 juillet 2011 00:26:06, Cole, Derek a écrit :
> Just as an interesting side-note: I tried to do a CreateCopy on one of
> these files that was 7GB. Using CreateCopy() it took almost 2 hours. When
> I simply copied to file contents using a cp command (this is CentOS), the
> copy takes about a minute. I am not sure why that is so terribly slow in
> GDAL.

This is very well possible if the block dimensions of the source and target 
are not compatible. You might want to play with the BLOCKXSIZE and BLOCKYSIZE 
creation options. 

Anyway, you cannot simply compare cp and CreateCopy(). CreateCopy() can do 
much smarter things than just cp...

> 
> Also, I experimented trying to insert a band into an already existing NITF
> file, but the software spits back an error message that the format does
> not support it.

Yes very few formats can support AddBand().


More information about the gdal-dev mailing list