<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks for your reply,<br><div><br></div><div>My bad, probably copy-pasting mistake. I've re-run the commands:</div><div><br></div><div>Just to be sure I exported the GDAL_SKIP env var as well:</div><div><b><br></b></div><font face="monospace, monospace">export GDAL_SKIP=JP2OpenJPEG</font><div><font face="monospace, monospace">gdalinfo --formats<br></font></div><div><font face="monospace, monospace">...</font></div><div><div><font face="monospace, monospace">  ERS -raster- (rw+v): ERMapper .ers Labelled</font></div><div><font face="monospace, monospace">  JP2KAK -raster,vector- (rwv): JPEG-2000 (based on Kakadu <b>v7.10.4</b></font>)</div><div><font face="monospace, monospace">  JPIPKAK -raster- (ro): JPIP (based on Kakadu)</font></div><div><font face="monospace, monospace">  L1B -raster- (rovs): NOAA Polar Orbiter Level 1b Data Set</font></div></div><div><font face="monospace, monospace">...</font></div><font face="monospace, monospace">(No JP2OpenJPEG, by the way, I am using Kakadu 7.10.4)</font></div><div dir="ltr"><br></div><div>Looks like gdal_translate is producing a 0-filled raster:</div><div dir="ltr"><span style="font-family:monospace,monospace"><br></span></div><div dir="ltr"><span style="font-family:monospace,monospace">gdal_translate -outsize 50% 50% -co TILED=YES -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR  ./T34WEB_20181015T104021_TCI_10m.jp2 ./T34WEB_20181015T104021_TCI_10m.jp2.ovr </span><b style="font-family:monospace,monospace">--config GDAL_SKIP JP2OpenJPEG</b><br></div><div dir="ltr"><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">gdalinfo -stats ./T34WEB_20181015T104021_TCI_10m.jp2.ovr<br></font></div><div><div><div><font face="monospace, monospace">Driver: GTiff/GeoTIFF<br></font></div><div><font face="monospace, monospace">Files: ./T34WEB_20181015T104021_TCI_10m.jp2.ovr</font></div><div><font face="monospace, monospace">       ./T34WEB_20181015T104021_TCI_10m.jp2.ovr.aux.xml</font></div><div><font face="monospace, monospace">Size is 5490, 5490</font></div><div><font face="monospace, monospace">Coordinate System is:</font></div><div><font face="monospace, monospace">PROJCS["WGS 84 / UTM zone 34N",</font></div><div><font face="monospace, monospace">    GEOGCS["WGS 84",</font></div><div><font face="monospace, monospace">        DATUM["WGS_1984",</font></div><div><font face="monospace, monospace">            SPHEROID["WGS 84",6378137,298.257223563,</font></div><div><font face="monospace, monospace">                AUTHORITY["EPSG","7030"]],</font></div><div><font face="monospace, monospace">            AUTHORITY["EPSG","6326"]],</font></div><div><font face="monospace, monospace">        PRIMEM["Greenwich",0,</font></div><div><font face="monospace, monospace">            AUTHORITY["EPSG","8901"]],</font></div><div><font face="monospace, monospace">        UNIT["degree",0.0174532925199433,</font></div><div><font face="monospace, monospace">            AUTHORITY["EPSG","9122"]],</font></div><div><font face="monospace, monospace">        AUTHORITY["EPSG","4326"]],</font></div><div><font face="monospace, monospace">    PROJECTION["Transverse_Mercator"],</font></div><div><font face="monospace, monospace">    PARAMETER["latitude_of_origin",0],</font></div><div><font face="monospace, monospace">    PARAMETER["central_meridian",21],</font></div><div><font face="monospace, monospace">    PARAMETER["scale_factor",0.9996],</font></div><div><font face="monospace, monospace">    PARAMETER["false_easting",500000],</font></div><div><font face="monospace, monospace">    PARAMETER["false_northing",0],</font></div><div><font face="monospace, monospace">    UNIT["metre",1,</font></div><div><font face="monospace, monospace">        AUTHORITY["EPSG","9001"]],</font></div><div><font face="monospace, monospace">    AXIS["Easting",EAST],</font></div><div><font face="monospace, monospace">    AXIS["Northing",NORTH],</font></div><div><font face="monospace, monospace">    AUTHORITY["EPSG","32634"]]</font></div><div><font face="monospace, monospace">Origin = (499980.000000000000000,7700040.000000000000000)</font></div><div><font face="monospace, monospace">Pixel Size = (20.000000000000000,-20.000000000000000)</font></div><div><font face="monospace, monospace">Metadata:</font></div><div><font face="monospace, monospace">  AREA_OR_POINT=Area</font></div><div><font face="monospace, monospace">  Corder=LRCP</font></div><div><font face="monospace, monospace">Image Structure Metadata:</font></div><div><font face="monospace, monospace">  COMPRESSION=YCbCr JPEG</font></div><div><font face="monospace, monospace">  INTERLEAVE=PIXEL</font></div><div><font face="monospace, monospace">  SOURCE_COLOR_SPACE=YCbCr</font></div><div><font face="monospace, monospace">Corner Coordinates:</font></div><div><font face="monospace, monospace">Upper Left  (  499980.000, 7700040.000) ( 20d59'58.17"E, 69d24'34.71"N)</font></div><div><font face="monospace, monospace">Lower Left  (  499980.000, 7590240.000) ( 20d59'58.25"E, 68d25'29.70"N)</font></div><div><font face="monospace, monospace">Upper Right (  609780.000, 7700040.000) ( 23d47'41.77"E, 69d23'13.78"N)</font></div><div><font face="monospace, monospace">Lower Right (  609780.000, 7590240.000) ( 23d40'24.01"E, 68d24'12.80"N)</font></div><div><font face="monospace, monospace">Center      (  554880.000, 7645140.000) ( 22d22' 0.55"E, 68d54'42.54"N)</font></div><div><font face="monospace, monospace">Band 1 Block=256x256 Type=Byte, ColorInterp=Red</font></div><div><font face="monospace, monospace">  Min=0.000 Max=0.000 </font></div><div><font face="monospace, monospace"><b>  Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000</b></font></div><div><font face="monospace, monospace">  Metadata:</font></div><div><font face="monospace, monospace">    STATISTICS_MAXIMUM=0</font></div><div><font face="monospace, monospace">    STATISTICS_MEAN=0</font></div><div><font face="monospace, monospace">    STATISTICS_MINIMUM=0</font></div><div><font face="monospace, monospace">    STATISTICS_STDDEV=0</font></div><div><font face="monospace, monospace">Band 2 Block=256x256 Type=Byte, ColorInterp=Green</font></div><div><font face="monospace, monospace">  Min=0.000 Max=0.000 </font></div><div><font face="monospace, monospace"><b>  Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000</b></font></div><div><font face="monospace, monospace">  Metadata:</font></div><div><font face="monospace, monospace">    STATISTICS_MAXIMUM=0</font></div><div><font face="monospace, monospace">    STATISTICS_MEAN=0</font></div><div><font face="monospace, monospace">    STATISTICS_MINIMUM=0</font></div><div><font face="monospace, monospace">    STATISTICS_STDDEV=0</font></div><div><font face="monospace, monospace">Band 3 Block=256x256 Type=Byte, ColorInterp=Blue</font></div><div><font face="monospace, monospace">  Min=0.000 Max=0.000 </font></div><div><font face="monospace, monospace"><b>  Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000</b></font></div><div><font face="monospace, monospace">  Metadata:</font></div><div><font face="monospace, monospace">    STATISTICS_MAXIMUM=0</font></div><div><font face="monospace, monospace">    STATISTICS_MEAN=0</font></div><div><font face="monospace, monospace">    STATISTICS_MINIMUM=0</font></div><div><font face="monospace, monospace">    STATISTICS_STDDEV=0</font></div></div><div><br></div><div>rm -f ./T34WEB_20181015T104021_TCI_10m.jp2.ovr ./T34WEB_20181015T104021_TCI_10m.jp2.ovr.aux.xml<br></div><div><br></div><div>while gdaladdo is producing a good raster:</div><div><br></div><div>gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL  ./T34WEB_20181015T104021_TCI_10m.jp2 <b>--config GDAL_SKIP JP2OpenJPEG</b> 2 4 8 16 32 64 128<br></div><div><br></div><div><div>gdalinfo -stats ./T34WEB_20181015T104021_TCI_10m.jp2.ovr</div><div>Driver: GTiff/GeoTIFF</div><div>Files: ./T34WEB_20181015T104021_TCI_10m.jp2.ovr</div><div>Size is 5490, 5490</div><div>Coordinate System is `'</div><div>Image Structure Metadata:</div><div>  COMPRESSION=YCbCr JPEG</div><div>  INTERLEAVE=PIXEL</div><div>  SOURCE_COLOR_SPACE=YCbCr</div><div>Corner Coordinates:</div><div>Upper Left  (    0.0,    0.0)</div><div>Lower Left  (    0.0, 5490.0)</div><div>Upper Right ( 5490.0,    0.0)</div><div>Lower Right ( 5490.0, 5490.0)</div><div>Center      ( 2745.0, 2745.0)</div><div>Band 1 Block=128x128 Type=Byte, ColorInterp=Red</div><div><b>  Minimum=0.000, Maximum=255.000, Mean=71.229, StdDev=62.445</b></div><div>  Overviews: 2745x2745, 1373x1373, 687x687, 344x344, 172x172, 86x86</div><div>  Metadata:</div><div>    STATISTICS_MAXIMUM=255</div><div>    STATISTICS_MEAN=71.229008132023</div><div>    STATISTICS_MINIMUM=0</div><div>    STATISTICS_STDDEV=62.445099566295</div><div>Band 2 Block=128x128 Type=Byte, ColorInterp=Green</div><div><b>  Minimum=0.000, Maximum=255.000, Mean=66.111, StdDev=62.790</b></div><div>  Overviews: 2745x2745, 1373x1373, 687x687, 344x344, 172x172, 86x86</div><div>  Metadata:</div><div>    STATISTICS_MAXIMUM=255</div><div>    STATISTICS_MEAN=66.110971363731</div><div>    STATISTICS_MINIMUM=0</div><div>    STATISTICS_STDDEV=62.790298201369</div><div>Band 3 Block=128x128 Type=Byte, ColorInterp=Blue</div><div><b>  Minimum=0.000, Maximum=255.000, Mean=67.561, StdDev=63.721</b></div><div>  Overviews: 2745x2745, 1373x1373, 687x687, 344x344, 172x172, 86x86</div><div>  Metadata:</div><div>    STATISTICS_MAXIMUM=255</div><div>    STATISTICS_MEAN=67.560742897336</div><div>    STATISTICS_MINIMUM=0</div><div>    STATISTICS_STDDEV=63.721118995755</div></div><div><br></div><div>Thank you</div><div><br></div><div>On Wed, Oct 17, 2018 at 11:16 PM jratike80 <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">alpa wrote<br>
> Hi All,<br>
> <br>
> ....<br>
> <br>
> I run gdal_translate first as follows:<br>
> <br>
> gdal_translate -outsize 50% 50% -co TILED=YES -co COMPRESS=JPEG -co<br>
> PHOTOMETRIC=YCBCR /tmp/T34WEB_20181015T104021_TCI_10m.jp2<br>
> ~/T34WEB_20181015T104021_TCI_10m.jp2.ovr_geosolutions_jkak --config<br>
> GDAL_SKIP JP2OpenJPEG<br>
> .......<br>
> <br>
> If I produce the overview file "on the fly" with gdaladdo I get a good<br>
> overview file instead:<br>
> <br>
> gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW<br>
> YCBCR --config<br>
> INTERLEAVE_OVERVIEW PIXEL  T34WEB_20181015T104021_TCI_10m.jp2 2 4 8 16 32<br>
> 64 128<br>
<br>
Hi,<br>
<br>
Did you skip the OpenJPEG driver by setting the environment variable for<br>
your gdaladdo test? If you didn't you are probably comparing gdal_translate<br>
with Kakadu driver vs. gdaladdo with OpenJPEG driver.<br>
<br>
-Jukka Rahkonen- <br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-7334648813175860873gmail-m_837231950644684188gmail-m_7335551261752480653gmail_signature"><div dir="ltr"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Regards,</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Alessandro Parma</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Alessandro Parma</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">DevOps Engineer</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Via di Montramito 3/A</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">55054  Massarosa (LU)</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">phone: +39 0584 962313</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">fax:      +39 0584 1660272</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><br></span></p></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>