#3669 closed enhancement (fixed)
[PATCH] gdal_merge.py alpha mask
Reported by: | stefanklug | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | Utilities | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Hi,
gdal_merge.py doesn't handle tiff files with alpha masks so I've added this functionality.
My patch changes the behaviour of gdal_merge as follows:
- If a band is recognized as Alpha Band it is automatically treated as having a NODATA value of 0.
I'm not sure if this is the way to go. But it makes some sense, as the resulting alpha channel is a correct alpha merge, independent of the nodata value used for the other bands.
- If a band has mask flag GMF_ALPHA set, the mask band controls the parts that get written to the destination
Would be great if someone could review and possibly checkin the patch.
Regards
Stefan
Attachments (1)
Change History (7)
by , 13 years ago
Attachment: | gdal_merge.patch added |
---|
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Summary: | gdal_merge.py alpha mask → [PATCH] gdal_merge.py alpha mask |
---|
comment:3 by , 8 years ago
The patch worked for me on GDAL 1.10.1, so +1. The raster files I work on generally have alpha masks, which makes gdal_merge.py unusable for most of my use cases.
comment:4 by , 8 years ago
Milestone: | → 2.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This patch has never been reviewed.