On Thu, Oct 27, 2011 at 8:14 AM, Travis Kirstine <[email protected]> wrote: > I have a rgb geotiff with a external mask file > rgb_withmaskfile.tif.msk, I would like to convert the files to a > compressed GeoTiff using a command simalar to the one below. This > command will generate a illegal band # error > > gdal_translate rgb_withmaskfile.tif results.tif -b 1 -b 2 -b 3 -mask 4 > -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR --config > GDAL_TIFF_INTERNAL_MASK YES
Travis, Is the mask really band 4? I presume the mask (from the .msk file) is not treated as a regular band of the source file and cannot be referenced as such. I would hope that gdal_translate would automatically try to translate the associated mask though I must confess I haven't tried this myself. If it does not then please file a ticket. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
