Ok<div>I made a test VRT and I applied your gdal_translate command.</div><div>It work and the result is a tiff with a weight of about the sum of the two test mosaiced tiffs.</div><div>But as you can see in this image</div>
<div><br></div><div><a href="http://www.flickr.com/photos/90029615@N05/8184720800/" target="_top" rel="nofollow" link="external">http://www.flickr.com/photos/90029615@N05/8184720800/</a><br><br>the two tiffs have a white orizzontal stripe that separate them.</div><div>
This is because each tif to be mosaiced have a white frame and every frame overlap to "data" areas of adiacent images.</div><div><br></div><div>If I eliminate the 255 value from original tiffs the result is like this</div>
<div><a href="http://www.flickr.com/photos/90029615@N05/8184744636/" target="_top" rel="nofollow" link="external">http://www.flickr.com/photos/90029615@N05/8184744636/</a></div><div><br></div><div>I tried using -a_nodata 255 in gdal_translate command but the result is the same white separation..</div>
<div><br></div><div>How can I set 255 values to nodata before mosaic each tiff?</div><div><br></div><div>Thank you very much for your help!</div><div>Pietro</div><div><br></div><div><br><div class="gmail_quote">2012/11/13 MORREALE Jean Roc [via OSGeo.org] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=5016218&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span><br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi,
<br><br>You could start by merging all your tiff in a VRT then do
<br>gdal_translate -of Gtiff -co SPARSE_OK=TRUE -a_nodata 0 -co NBITS=1 -co
<br>"TILED=YES" -co "COMPRESS=CCITTFAX4" -co "INTERLEAVE=BAND" "example.vrt"
<br>"example.tif"
<br><br>Le 2012-11-13 17:14, Pietro Rossin a écrit :
</div><div><br><div class="im">> Hello all
<div class='shrinkable-quote'><br>> I have ~1000 tiff/tfw RGB but with only 0 or 255 color value in all
<br>> bands
<br>> (black/white).
<br>> I want to mosaic them in a single image to be used in qgis and other
<br>> gis
<br>> software.
<br>>
<br>> Which is the best way to do this? And to compress the resulting
<br>> image? May
<br>> be Tiff?? Single band??
<br>> Another problem is that I must apply a formula to input images to
<br>> transform
<br>> 255 value to null, because of some white portion of each image that
<br>> overlap
<br>> to black portion of the adiacent one..
<br>>
<br>> Thanks
<br>> Pietro
</div></div></div><div class="im">Le 2012-11-13 17:14, Pietro Rossin a écrit :
</div><div><br><div class="im">> Hello all
<div class='shrinkable-quote'><br>> I have ~1000 tiff/tfw RGB but with only 0 or 255 color value in all
<br>> bands
<br>> (black/white).
<br>> I want to mosaic them in a single image to be used in qgis and other
<br>> gis
<br>> software.
<br>>
<br>> Which is the best way to do this? And to compress the resulting
<br>> image? May
<br>> be Tiff?? Single band??
<br>> Another problem is that I must apply a formula to input images to
<br>> transform
<br>> 255 value to null, because of some white portion of each image that
<br>> overlap
<br>> to black portion of the adiacent one..
<br>>
<br>> Thanks
<br>> Pietro
</div></div>_______________________________________________
</div>gdal-dev mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=5016032&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br>
<br>
<hr noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://osgeo-org.1560.n6.nabble.com/Best-way-to-mosaic-and-compress-lots-of-tiff-Black-white-tp5016021p5016032.html" target="_blank" rel="nofollow" link="external">http://osgeo-org.1560.n6.nabble.com/Best-way-to-mosaic-and-compress-lots-of-tiff-Black-white-tp5016021p5016032.html</a>
</div>
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from Best way to mosaic and compress lots of tiff Black/white?, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a href="http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></blockquote></div><br></div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/Best-way-to-mosaic-and-compress-lots-of-tiff-Black-white-tp5016021p5016218.html">Re: Best way to mosaic and compress lots of tiff Black/white?</a><br/>
Sent from the <a href="http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br/>