[gdal-dev] Do any of the utilities (gdalwarp, gdal_translate) allow for assigment of ColorInterp?
Ethan Alpert
ealpert at digitalglobe.com
Fri Aug 28 14:13:37 PDT 2015
Thank you! Looks like Option 2 for me.
-----Original Message-----
From: Even Rouault [mailto:even.rouault at spatialys.com]
Sent: Friday, August 28, 2015 2:55 PM
To: gdal-dev at lists.osgeo.org
Cc: Ethan Alpert
Subject: Re: [gdal-dev] Do any of the utilities (gdalwarp, gdal_translate) allow for assigment of ColorInterp?
On Friday 28 August 2015 20:02:38 Ethan Alpert wrote:
> I'm running in to a problem with gdalbuildvrt.
>
> I started getting the following error from gdalbuildvrt.
>
> Warning 6: gdalbuildvrt does not support heterogenous band characteristics.
> Skipping ....
>
> I'm using 1.10
>
> I've isolated the problem to some of my files in DTED2 format have the
> following:
>
> Band 1 Block=1x3601 Type=Int16, ColorInterp=Undefined
>
> The other data in my build VRT looks like:
>
> Band 1 Block=1201x6 Type=Int16, ColorInterp=Gray
>
>
> To fix this I translated the DTED2 to VRT's and manually inserted
> <ColorInterp>Gray</ColorInterp> to the VRTRasterBand.
>
> I need a better way to do this. Any ideas?
Yep
1) Remove the test at line 706 of gdalbuildvrt.cpp:
pasBandProperties[j].colorInterpretation !=
GDALGetRasterColorInterpretation(hRasterBand) ||
2) Or for each some.dt2, creates a some.dt2.aux.xml file with following
content:
<PAMDataset>
<PAMRasterBand band="1">
<ColorInterp>Gray</ColorInterp>
</PAMRasterBand>
</PAMDataset>
which will override the default color interpretation
3) Or modify the DTED driver to report gray
>
>
> This electronic communication and any attachments may contain confidential
> and proprietary information of DigitalGlobe, Inc. If you are not the
> intended recipient, or an agent or employee responsible for delivering this
> communication to the intended recipient, or if you have received this
> communication in error, please do not print, copy, retransmit, disseminate
> or otherwise use the information. Please indicate to the sender that you
> have received this communication in error, and delete the copy you
> received.
>
> DigitalGlobe reserves the right to monitor any electronic communication sent
> or received by its employees, agents or representatives.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
This electronic communication and any attachments may contain confidential and proprietary information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received.
DigitalGlobe reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives.
More information about the gdal-dev
mailing list