[FWTools] (no subject)

Frank Warmerdam warmerdam at pobox.com
Tue Jan 10 14:47:34 EST 2006


On 1/10/06, Travis Kirstine GIS Tech <tkirstine at jdbarnes.com> wrote:
> Frank,
> The reason for my last question is that I have had few strange results from
> the gdal_merge command.  I have been merging together overlapping RGB images
> with different resolutions (30cm and 20cm).  The 20cm image has a no data
> value of 0 0 0.  My basic command is:
> gdal_merge.bat -o output_30cm.tif -of GTiff -n 0 30cm_input.tif
> 20cm_input.tif
> The problem I'm finding is that areas that are near black (0, 7, 15) are
> being converted to values with higher red values (80, 9, 19).

Travis,

Good point.  Currently gdal_merge.py applies the the
nodata value on each band independently rather than the
more obvious approach of checking each band and only
considering a pixel "nodata" if all bands match their
respective nodata values.

The gdal_merge.py script could likely be altered to
do this differently but it would be a bit tricky since
at a very high level gdal_merge.py treats the bands
independently.

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 FWTools mailing list