[Gdal-dev] assign nodata to existing tif?

Frank Warmerdam warmerdam at pobox.com
Fri Nov 25 14:58:01 EST 2005


On 11/25/05, Matt Wilkie <matt.wilkie at gov.yk.ca> wrote:
> Hello,
>
> How do I define the nodata value in an existing geotiff?
>
> I've created some mosaicks with gdal_merge, which doesn't assign nodata,
> and now I want to tell those mosaicks which value is nodata (so that
> when I gdal_translate them with jpeg compression the nodata values are
> excluded from the resampling).

Matt,

You can use the -a_nodata switch to gdal_translate to treat
a particular value as nodata.  However, this doesn't normally
affect the nearest neighbour resampling done by gdal_translate.
Perhaps you mean for the CDED writer, which is pretty special
in this regard?

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list