[gdal-dev] Setting the noData flag in a GeoTIFF

Jonathan Moules jonathanmoules at warwickshire.gov.uk
Tue Dec 3 07:18:25 PST 2013


Hi List,
  I have a question about setting a value as "noData" in GeoTIFFs.

I'm creating a Geotiff with this two stage process (mosaicing a lot of
tiles together):

gdalbuildvrt -hidenodata -srcnodata 255 -vrtnodata 255 -input_file_list
>> tiff_list.txt 255.vrt
>
>
>> gdal_translate -of GTiff -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG
>>  -co JPEG_QUALITY=80 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co
>> PHOTOMETRIC=YCBCR 255.vrt 255mask.tif
>
>
The resultant image is fine, but when I access it, both via ArcGIS and QGIS
it says that there is no noData value set.

I've tried reading into it and came across this -
http://www.gdal.org/frmt_gtiff.html - but it requires a deeper level of the
GeoTIFF library than I have to make much sense of it.

I did see "GDAL_TIFF_INTERNAL_MASK" and tried to set it to true (using -co
and --config), but GDAL just complained about it not being a valid
configuration option.

Can GeoTiffs have a noData value in them that applications will see and
honour? If so, can I set it in GDAL?
It's not critically important, more nice-to-have and also trying to
understand the format better

Thanks,
Jonathan

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131203/ceca244c/attachment.html>


More information about the gdal-dev mailing list