<div dir="ltr">Bom dia,<div><br></div><div>No resultado da conversão ainda ficaram alguns pixeis que deveriam ser também transparentes. Provavelmente são alguns pixeis que não são exatamente o RBG 255 255 255.</div><div><br></div><div>Será que há alguma coisa que se pode fazer em relação a estes pixeis?</div></div><div class="gmail_extra"><br><div class="gmail_quote">No dia 19 de outubro de 2016 às 16:20, Marco Afonso <span dir="ltr"><<a href="mailto:mafonso333@gmail.com" target="_blank">mafonso333@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Muito obrigado Pedro Monteiro :)<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">No dia 19 de outubro de 2016 às 15:33, Pedro Monteiro <span dir="ltr"><<a href="mailto:monteiro.s.pedro@gmail.com" target="_blank">monteiro.s.pedro@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Boa tarde,<br><br>Penso que o mais simples será criar um raster virtual com transparência, e posteriormente fazer a conversão deste para tif<div><br></div><div>Exemplo:</div><div><br></div><div>1. gdalbuildvrt -srcnodata "<a href="tel:255%20255%20255" value="+351255255255" target="_blank">255 255 255</a>" destino.vrt entrada.jpg </div><div>2. gdal_translate -of Gtiff destino.vrt destino.tif<br><br>Cumprimentos,</div><div>Pedro Monteiro</div></div><br><div class="gmail_quote"><div><div class="m_4204914107503034043h5"><div dir="ltr">On Wed, Oct 19, 2016 at 2:13 PM Marco Afonso <<a href="mailto:mafonso333@gmail.com" target="_blank">mafonso333@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_4204914107503034043h5"><div dir="ltr" class="m_4204914107503034043m_-6269376419018935826gmail_msg">Boa tarde,<div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Julgo que a questão será direccionada para os GDAL masters :)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Gostaria de saber se é possível converter um ficheiro no formato JP2000 para TIF com transparência. Se possível definir a côr branco (RGB <a href="tel:255%20255%20255" value="+351255255255" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">255 255 255</a>) para transparência.</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Compressão para o ficheiro de saída TIF não é requisito para já.</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Segue a informação obtida pelo GDALINFO do ficheiro de origem.</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Obrigado! :)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Driver: JP2MrSID/MrSID JPEG2000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Files: pu_luz_zonamento.jp2</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">       pu_luz_zonamento.jp2.ovr</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">       pu_luz_zonamento.jp2.aux.xml</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Size is 6636, 6122</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Coordinate System is:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">PROJCS["ETRS_1989_TM06-Portuga<wbr>l",</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    GEOGCS["GCS_ETRS_1989",</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">        DATUM["European_Terrestrial_Re<wbr>ference_System_1989",</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">            SPHEROID["GRS_1980",6378137,29<wbr>8.257222101,</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">                AUTHORITY["EPSG","7019"]],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">            AUTHORITY["EPSG","6258"]],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">        PRIMEM["Greenwich",0],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">        UNIT["degree",0.01745329251994<wbr>33]],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    PROJECTION["Transverse_Mercato<wbr>r"],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    PARAMETER["latitude_of_origin"<wbr>,39.66825833333333],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    PARAMETER["central_meridian",-<wbr>8.133108333333333],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    PARAMETER["scale_factor",1],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    PARAMETER["false_easting",0],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    PARAMETER["false_northing",0],</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    UNIT["metre",1,</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">        AUTHORITY["EPSG","9001"]]]</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Origin = (37881.833519887965000,-285245<wbr>.409715688320000)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Pixel Size = (0.169333333333329,-0.16933333<wbr>3333331)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Corder=PCRL</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__GeogAngularUnits<wbr>GeoKey=Angular_Degree</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__GeogGeodeticDatu<wbr>mGeoKey=Datum_European_<wbr>Reference_System_1989</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__GeographicTypeGe<wbr>oKey=User-Defined</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__GTModelTypeGeoKe<wbr>y=ModelTypeProjected</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__GTRasterTypeGeoK<wbr>ey=RasterPixelIsArea</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__ProjCoordTransGe<wbr>oKey=CT_TransverseMercator</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__ProjectedCSTypeG<wbr>eoKey=User-Defined</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__ProjectionGeoKey<wbr>=User-Defined</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_CHAR__ProjLinearUnitsG<wbr>eoKey=Linear_Meter</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__1024__GTModelType<wbr>GeoKey=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__1025__GTRasterTyp<wbr>eGeoKey=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__1026__GTCitationG<wbr>eoKey=PCS Name = ETRS_1989_TM06-Portugal</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2048__GeographicT<wbr>ypeGeoKey=32767</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2049__GeogCitatio<wbr>nGeoKey=GCS Name = GCS_ETRS_1989|Ellipsoid = GRS_1980|Primem = Greenwich|</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2050__GeogGeodeti<wbr>cDatumGeoKey=6258</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2054__GeogAngular<wbr>UnitsGeoKey=9102</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2057__GeogSemiMaj<wbr>orAxisGeoKey=6378137.000000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2059__GeogInvFlat<wbr>teningGeoKey=298.257222</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__2061__GeogPrimeMe<wbr>ridianLongGeoKey=0.000000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3072__ProjectedCS<wbr>TypeGeoKey=32767</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3074__ProjectionG<wbr>eoKey=32767</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3075__ProjCoordTr<wbr>ansGeoKey=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3076__ProjLinearU<wbr>nitsGeoKey=9001</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3080__ProjNatOrig<wbr>inLongGeoKey=-8.133108</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3081__ProjNatOrig<wbr>inLatGeoKey=39.668258</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3082__ProjFalseEa<wbr>stingGeoKey=0.000000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3083__ProjFalseNo<wbr>rthingGeoKey=0.000000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  GEOTIFF_NUM__3092__ProjScaleAt<wbr>NatOriginGeoKey=1.000000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Image Structure Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  INTERLEAVE=PIXEL</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Corner Coordinates:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Upper Left  (   37881.834, -<a href="tel:285%20245%20410" value="+351285245410" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">285245.410</a>) (  7d42'25.13"W, 37d 5'52.09"N)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Lower Left  (   37881.834, -<a href="tel:286%20282%20068" value="+351286282068" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">286282.068</a>) (  7d42'25.32"W, 37d 5'18.46"N)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Upper Right (   39005.530, -<a href="tel:285%20245%20410" value="+351285245410" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">285245.410</a>) (  7d41'39.62"W, 37d 5'51.92"N)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Lower Right (   39005.530, -<a href="tel:286%20282%20068" value="+351286282068" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">286282.068</a>) (  7d41'39.82"W, 37d 5'18.29"N)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Center      (   38443.682, -<a href="tel:285%20763%20739" value="+351285763739" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">285763.739</a>) (  7d42' 2.47"W, 37d 5'35.19"N)</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Band 1 Block=1024x128 Type=Byte, ColorInterp=Red</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Min=0.000 Max=255.000 </div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Minimum=0.000, Maximum=255.000, Mean=236.038, StdDev=66.045</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  NoData Value=256</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Overviews: 3318x3061, 1659x1531, 830x766, 415x383, 208x192</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_COVARIANCES=4361.99<wbr>5430900208,2244.864802420663,<wbr>3368.225850604773</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MAXIMUM=255</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MEAN=236,0379316072<wbr>5</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MINIMUM=0</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_SKIPFACTORX=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_SKIPFACTORY=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_STDDEV=66,045404313<wbr>247</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Image Structure Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    COMPRESSION=JP2000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Band 2 Block=1024x128 Type=Byte, ColorInterp=Green</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Min=0.000 Max=255.000 </div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Minimum=0.000, Maximum=255.000, Mean=218.476, StdDev=87.277</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  NoData Value=256</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Overviews: 3318x3061, 1659x1531, 830x766, 415x383, 208x192</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_COVARIANCES=2244.86<wbr>4802420663,7617.276745283226,<wbr>7051.036243014802</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MAXIMUM=255</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MEAN=218,4757459780<wbr>5</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MINIMUM=0</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_SKIPFACTORX=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_SKIPFACTORY=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_STDDEV=87,277011551<wbr>056</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Image Structure Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    COMPRESSION=JP2000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Band 3 Block=1024x128 Type=Byte, ColorInterp=Blue</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Min=0.000 Max=255.000 </div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Minimum=0.000, Maximum=255.000, Mean=215.145, StdDev=92.105</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  NoData Value=256</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Overviews: 3318x3061, 1659x1531, 830x766, 415x383, 208x192</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_COVARIANCES=3368.22<wbr>5850604773,7051.036243014802,<wbr>8483.403263628108</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MAXIMUM=255</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MEAN=215,1453110640<wbr>2</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_MINIMUM=0</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_SKIPFACTORX=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_SKIPFACTORY=1</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    STATISTICS_STDDEV=92,105392152<wbr>838</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">  Image Structure Metadata:</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg">    COMPRESSION=JP2000</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div>-- <br class="m_4204914107503034043m_-6269376419018935826gmail_msg"><div class="m_4204914107503034043m_-6269376419018935826m_-9195676200023972830gmail_signature m_4204914107503034043m_-6269376419018935826gmail_msg"><div dir="ltr" class="m_4204914107503034043m_-6269376419018935826gmail_msg">Regards, <div class="m_4204914107503034043m_-6269376419018935826gmail_msg">Marco Afonso</div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><a href="http://goo.gl/ZDtQjm" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">http://goo.gl/ZDtQjm</a><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div><div class="m_4204914107503034043m_-6269376419018935826gmail_msg"><span class="m_4204914107503034043m_-6269376419018935826gmail_msg"></span><img src="https://dl.dropboxusercontent.com/u/17607469/qr.png" class="m_4204914107503034043m_-6269376419018935826gmail_msg"><br class="m_4204914107503034043m_-6269376419018935826gmail_msg"></div></div></div>
</div></div></div></div>
______________________________<wbr>_________________<br class="m_4204914107503034043m_-6269376419018935826gmail_msg">
Portugal mailing list<br class="m_4204914107503034043m_-6269376419018935826gmail_msg">
<a href="mailto:Portugal@lists.osgeo.org" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">Portugal@lists.osgeo.org</a><br class="m_4204914107503034043m_-6269376419018935826gmail_msg">
<a href="http://lists.osgeo.org/mailman/listinfo/portugal" rel="noreferrer" class="m_4204914107503034043m_-6269376419018935826gmail_msg" target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/portugal</a></blockquote></div>
<br>______________________________<wbr>_________________<br>
Portugal mailing list<br>
<a href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/portugal" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/portugal</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4204914107503034043gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards, <div>Marco Afonso</div><div><a href="http://goo.gl/ZDtQjm" target="_blank">http://goo.gl/ZDtQjm</a><br></div><div><span></span><img src="https://dl.dropboxusercontent.com/u/17607469/qr.png"><br></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards, <div>Marco Afonso</div><div><a href="http://goo.gl/ZDtQjm" target="_blank">http://goo.gl/ZDtQjm</a><br></div><div><span></span><img src="https://dl.dropboxusercontent.com/u/17607469/qr.png"><br></div></div></div>
</div>