[gdal-dev] How to add an external mask as internal mask to a GeoTIFF?
daniele.romagnoli at geo-solutions.it
Tue Jul 19 06:27:05 PDT 2016
thanks for the feedback.
I was using it as a -co "GDAL_TIFF_INTERNAL_MASK=YES" to the latest command
and I was getting
*Warning 6: driver GTiff does not support creation option
Appending the line you provided me to that command worked!
On Tue, Jul 19, 2016 at 3:12 PM, Even Rouault <even.rouault at spatialys.com>
> Hi Daniele,
> > I have 2 issues with that:
> > 1) This solution is really not optimal. Wondering if there is a single
> > command to attach an external tif as a mask band of an existing raster
> > (provided it has same CRS, resolution, bbox, ecc)
> None that I can think of. Your workflow is probably close to optimum if you
> don't want to create the VRT at hand
> I think we would welcome a contribution of a Python script that would allow
> things like :
> - gdal_add_band.py -mask in.tif mask.tif out.vrt
> - gdal_add_band.py -alpha in.tif alpha.tif out.vrt
> - gdal_add_band.py in.tif extra_band.tif out.vrt
> > 2) What I get is that the mask has been set as an external file
> > final.tif.msk.
> > Is there any config option or opening option to open the final.tif in
> > update mode so that the band mask can be added as internal geotiff mask?
> Yes, "--config GDAL_TIFF_INTERNAL_MASK YES". See "Internal nodata masks"
> paragraph of http://gdal.org/frmt_gtiff.html
> Spatialys - Geospatial professional services
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
Ing. Daniele Romagnoli
Senior Software Engineer
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev