Zoltan,<br><br>The creation of 0394w.tif failed. Does the process have write permission on directory?<br>I note that you did not specify the -of option for nearblack. In it's absence, nearblack creates the output file in Erdas Imagine format.<br>
<br><br><div class="gmail_quote">On Sun, Feb 20, 2011 at 10:50 PM, Zoltan Szecsei <span dir="ltr"><<a href="mailto:zoltans@geograph.co.za">zoltans@geograph.co.za</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;">
<div bgcolor="#ffffff" text="#000000">
Hi Chaitanya (& all),<br>
I tried your nearblack comment, and got:<br>
<br>
nearblack -white -o 0394w.tif 0394.tif<br>
Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription"
does not end in null byte<br>
</div></blockquote><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription"
does not end in null byte<br>
Warning 1: TIFFFetchNormalTag:ASCII value for tag "Software" contains
null byte in value; value incorrectly truncated during reading due to
implementation limitati<br>
ERROR 4: Creation of file 0394w.tif failed.<br>
<br>
<br>
I think I am having trouble understanding the setting/using of nodata
values.<br>
I have now also downloaded and compiled gdal 1.8.0 (but nearblack
remained on v1.7.3) on ubuntu 10.04 LTS, and recreated my vrt, to no
improvement.<br>
<br>
To recap: I have 179 3*8bit RGB band aerial images that have been
orthorectified. The resulting skewness in the images has created white
slivers in the corners, and I am presuming that these white slivers are
recognised as "nodata". (My first mistake?)<br>
<br>
I use the following to create a vrt: <br>
gdalbuildvrt -addalpha -hidenodata -srcnodata "255 255 255" -vrtnodata
"0 0 0" -input_file_list files 177_untiled_orthos_nodata_180.vrt<br>
<br>
Thinking that the above will tell gdalbuildvrt that, for the input
orthos, white should be recognised as 'nodata', and in the VRT, those
white pixels should be converted to black, as nodata.<br>
Well, as you've guessed, it didn't happen this way, and I still have
the white bits after mosaicking my VRT thus:<br>
gdal_translate -projwin -16000 -3520650 -13000 -3525650
177_untiled_orthos_nodata.vrt try1.tif<br>
<br>
I tried re-running gdalbuildvrt specifying -vrtnodata "255 255 255" (to
match the input ortho files) and the outside border of my vrt turned
white, but the slivers between the mosaicked orthos were still present.<br>
<br>
Please can someone show me the correct way to address this problem.<br>
<br>
I have included gdalinfo results for both an individual ortho, and for
the vrt itself.<br>
<br>
Thanks & regards,<br>
Zoltan<br>
<br>
<br>
<br>
<br>
<br>
<br>
********************************** <b><font color="#cc0000">GDALINFO
on indicidual ORTHO</font></b> ****************************************<br>
geograph@gs0:~/vrt_177$ <font color="#cc0000"><b>gdalinfo --version</b></font><br>
GDAL 1.8.0, released 2011/01/12<br>
geograph@gs0:~/vrt_177$ <br>
geograph@gs0:~/vrt_177$ <br>
geograph@gs0:~/vrt_177$ <br>
geograph@gs0:~/vrt_177$ <b><font color="#cc0000">gdalinfo
/mnt/geo_lvm0/ngi_jobs/orthos_8bit/NGI_177_untiled_orthos/0003.tif</font></b><br>
Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription"
does not end in null byte<br>
Warning 1: TIFFFetchNormalTag:ASCII value for tag "Software" contains
null byte in value; value incorrectly truncated during reading due to
implementation limitations<br>
</div></blockquote><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">
Mask Flags: PER_DATASET ALPHA <br>
Band 4 Block=128x128 Type=Byte, ColorInterp=Alpha<br>
geograph@gs0:~/vrt_177$ <br>
*******************************************************************************************************<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On 2011-02-16 19:39, Chaitanya kumar CH wrote:
<blockquote type="cite">Zoltan,<br>
<br>
Have you tried the nearblack GDAL utility on the original 176 images?<br>
<a href="http://www.gdal.org/nearblack.html" target="_blank">http://www.gdal.org/nearblack.html</a><br>
<br>
<div class="gmail_quote">On Wed, Feb 16, 2011 at 5:25 PM, Zoltan
Szecsei <span dir="ltr"><<a href="mailto:zoltans@geograph.co.za" target="_blank">zoltans@geograph.co.za</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On 2011-02-16 12:20, Zoltan Szecsei wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br>
I've built a vrt with 176 images.<br>
<br>
I now need to mosaic this whole area into roughly 5 x 5 ortho images.<br>
<br>
How can I force the white edges into background of the overlapping
orthos?<br>
I'm a little cautious of simply (finding a way to) making "white"
transparent as it is only the white on the edges that need to be
backgrounded.<br>
</blockquote>
<br>
</div>
Hi again,<br>
Since the above post, I have tried different ways to set nodata, but to
no avail - I still get the white edges:<br>
(see jpeg sent with my original post)<br>
<br>
gdalbuildvrt -addalpha -hidenodata -input_file_list files
177_untiled_orthos_nodata.vrt<br>
gdalbuildvrt -srcnodata "0 0 0" -addalpha -hidenodata -input_file_list
files 177_untiled_orthos_blk.vrt<br>
gdalbuildvrt -srcnodata "255 255 255" -addalpha -hidenodata
-input_file_list files 177_untiled_orthos_white.vrt<br>
<br>
How should I be masking out the nodata (or even white pixels) so that
when I mosaic a bunch of tiffs together, I dont get the white stripes
in the resulting image?<br>
<br>
Using GDAL 1.7.3, released 2010/11/10 on Ubuntu 10.04<br>
Viewing with Quantum GIS - 1.6.0-Trunk on Ubuntu 10.04 (same box).<br>
...but running the whole lot in xterms with Xming & putty from my
WinVista box.<br>
<br>
<br>
Regards,
<div><br>
Zoltan<br>
<br>
</div></blockquote></div></blockquote></div></div></div></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">
<div><div class="h5"><br>
<br>
<pre cols="72">--
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.
65 Main Road, Muizenberg 7945
Western Cape, South Africa.
34° 6'16.35"S 18°28'5.62"E
Tel: +27-21-7884897 Mobile: +27-83-6004028
Fax: +27-86-6115323 <a href="http://www.geograph.co.za" target="_blank">www.geograph.co.za</a>
===========================================</pre>
</div></div></div>
<hr noshade size="1"><p color="#000000" align="left"></p><div><div></div><div class="h5"><br><br></div></div></blockquote></div><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>
17.2416N 80.1426E<br>