I'm sorry. I should have said that gdalbuildvrt does not support creation of the lookup table.<br><br><div class="gmail_quote">On Fri, Oct 28, 2011 at 12:22 PM, Hermann Peifer <span dir="ltr"><<a href="mailto:peifer@gmx.eu">peifer@gmx.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On 27/10/2011 14:48, Chaitanya kumar CH wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
However it [gdalbuildvrt] doesn't support complex sources..<br>
</blockquote>
<br>
Chaitanya, could you perhaps elaborate on the above statement?<br>
<br>
<br>
joolek,<br>
<br>
About the batch-processing of 3000 files: in my Linux/Bash/GDAL-from-trunk environment, I would do something like indicated below.<br>
<br>
Hope this helps, Hermann<br>
<br>
for f in path/to/mytiffs/*.tif; do<br>
gdal_translate -of vrt $f /dev/stdout |<br>
awk '<br>
BEGIN { lut = "<LUT>0:0,253:253,254:255</<u></u>LUT>" }<br>
{ gsub(/SimpleSource>/, "ComplexSource>") }<br>
$1 == "</ComplexSource>" { $0 = lut ORS $0 }<br>
{ print }' > tmp.vrt<br>
gdal_translate tmp.vrt ${f%.tif}_modified.tif<br>
done<br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>