[gdal-dev] Re: 254 into 255

Chaitanya kumar CH chaitanya.ch at gmail.com
Fri Oct 28 03:09:26 EDT 2011


I'm sorry. I should have said that gdalbuildvrt does not support creation of
the lookup table.

On Fri, Oct 28, 2011 at 12:22 PM, Hermann Peifer <peifer at gmx.eu> wrote:

> On 27/10/2011 14:48, Chaitanya kumar CH wrote:
>
>> However it [gdalbuildvrt] doesn't support complex sources..
>>
>
> Chaitanya, could you perhaps elaborate on the above statement?
>
>
> joolek,
>
> About the batch-processing of 3000 files: in my Linux/Bash/GDAL-from-trunk
> environment, I would do something like indicated below.
>
> Hope this helps, Hermann
>
> for f in path/to/mytiffs/*.tif; do
>  gdal_translate -of vrt $f /dev/stdout |
>  awk '
>    BEGIN { lut = "<LUT>0:0,253:253,254:255</**LUT>" }
>    { gsub(/SimpleSource>/, "ComplexSource>") }
>    $1 == "</ComplexSource>" { $0 = lut ORS $0 }
>    { print }' > tmp.vrt
>  gdal_translate tmp.vrt ${f%.tif}_modified.tif
> done
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111028/1b51e0cc/attachment.html


More information about the gdal-dev mailing list