[gdal-dev] Advice on `GDALCreateAndReprojectImage` and destination no-data value.

Fitch, Simeon fitch at astraea.io
Sat Nov 4 04:41:59 PDT 2023


Thanks Even & Javier!  Very helpful advice! Much appreciated.

Simeon

On Fri, Nov 3, 2023 at 7:02 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> Simeon,
> >     Band 1 Block=210x39 Type=Byte, ColorInterp=Gray
> >
> > The only way I've been able to get the behavior I need is to open the
> > written dataset from the filesystem and set the no-data value
> > explicitly in the band, which is inefficient and awkward.
>
> You don't have much alternative than doing that if you use
> GDALCreateAndReprojectImage(). But GDALCreateAndReprojectImage() is a
> "simplistic" warp API that doesn't have all the bells and whistles of
> what gdalwarp lib. You could potentially submit a patch to
> GDALCreateAndReprojectImage() to set the nodata value, which would be
> reasonable, but perhaps you could just bind the GDALWarp() C function
> that is the heart of the gdalwarp binary. You'd get all the advanced
> heuristics of gdalwarp that you don't get with the less advanced warp
> functions.
>
> Even
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
>

-- 
The content of this email is intended for the person or entity to which it 
is addressed only. This email may contain confidential information. If you 
are not the person to whom this message is addressed, be aware that any 
use, reproduction, or distribution of this message is strictly prohibited. 
If you received this in error, please contact the sender and immediately 
delete this email and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20231104/e6d9e051/attachment.htm>


More information about the gdal-dev mailing list