Zoltan, The creation of 0394w.tif failed. Does the process have write permission on directory? 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.
On Sun, Feb 20, 2011 at 10:50 PM, Zoltan Szecsei <zolt...@geograph.co.za>wrote: > Hi Chaitanya (& all), > I tried your nearblack comment, and got: > > nearblack -white -o 0394w.tif 0394.tif > Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription" does > not end in null byte > > Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription" does > not end in null byte > Warning 1: TIFFFetchNormalTag:ASCII value for tag "Software" contains null > byte in value; value incorrectly truncated during reading due to > implementation limitati > ERROR 4: Creation of file 0394w.tif failed. > > > I think I am having trouble understanding the setting/using of nodata > values. > 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. > > 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?) > > I use the following to create a vrt: > gdalbuildvrt -addalpha -hidenodata -srcnodata "255 255 255" -vrtnodata "0 0 > 0" -input_file_list files 177_untiled_orthos_nodata_180.vrt > > 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. > Well, as you've guessed, it didn't happen this way, and I still have the > white bits after mosaicking my VRT thus: > gdal_translate -projwin -16000 -3520650 -13000 -3525650 > 177_untiled_orthos_nodata.vrt try1.tif > > 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. > > Please can someone show me the correct way to address this problem. > > I have included gdalinfo results for both an individual ortho, and for the > vrt itself. > > Thanks & regards, > Zoltan > > > > > > > ********************************** *GDALINFO on indicidual > ORTHO***************************************** > geograph@gs0:~/vrt_177$ *gdalinfo --version* > GDAL 1.8.0, released 2011/01/12 > geograph@gs0:~/vrt_177$ > geograph@gs0:~/vrt_177$ > geograph@gs0:~/vrt_177$ > geograph@gs0:~/vrt_177$ *gdalinfo > /mnt/geo_lvm0/ngi_jobs/orthos_8bit/NGI_177_untiled_orthos/0003.tif* > Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription" does > not end in null byte > Warning 1: TIFFFetchNormalTag:ASCII value for tag "Software" contains null > byte in value; value incorrectly truncated during reading due to > implementation limitations > > Mask Flags: PER_DATASET ALPHA > Band 4 Block=128x128 Type=Byte, ColorInterp=Alpha > geograph@gs0:~/vrt_177$ > > ******************************************************************************************************* > > > > > On 2011-02-16 19:39, Chaitanya kumar CH wrote: > > Zoltan, > > Have you tried the nearblack GDAL utility on the original 176 images? > http://www.gdal.org/nearblack.html > > On Wed, Feb 16, 2011 at 5:25 PM, Zoltan Szecsei <zolt...@geograph.co.za>wrote: > >> On 2011-02-16 12:20, Zoltan Szecsei wrote: >> >>> Hi All, >>> I've built a vrt with 176 images. >>> >>> I now need to mosaic this whole area into roughly 5 x 5 ortho images. >>> >>> How can I force the white edges into background of the overlapping >>> orthos? >>> 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. >>> >> >> Hi again, >> Since the above post, I have tried different ways to set nodata, but to no >> avail - I still get the white edges: >> (see jpeg sent with my original post) >> >> gdalbuildvrt -addalpha -hidenodata -input_file_list files >> 177_untiled_orthos_nodata.vrt >> gdalbuildvrt -srcnodata "0 0 0" -addalpha -hidenodata -input_file_list >> files 177_untiled_orthos_blk.vrt >> gdalbuildvrt -srcnodata "255 255 255" -addalpha -hidenodata >> -input_file_list files 177_untiled_orthos_white.vrt >> >> 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? >> >> Using GDAL 1.7.3, released 2010/11/10 on Ubuntu 10.04 >> Viewing with Quantum GIS - 1.6.0-Trunk on Ubuntu 10.04 (same box). >> ...but running the whole lot in xterms with Xming & putty from my WinVista >> box. >> >> >> Regards, >> >> Zoltan >> >> > > -- > > =========================================== > 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 www.geograph.co.za > =========================================== > > ------------------------------ > > > > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev