<div dir="ltr"><div><div><div>Sorry, sorry... that was a different band... I realize now. So, for the record, no issues, <br>gdalinfo -mm T21KZP_20171212T134159_B02.jp2 <br>reports the same range as the one I see after importing in grass.<br><br>Computed Min/Max=15.000,17547.000<br><br></div>Again, sorry for the noise and thanks for the -mm hint, MM :)<br><br></div>best,<br></div>Vero<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-05 20:54 GMT+01:00 Veronica Andreo <span dir="ltr"><<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Forgot the list, sorry...<br><br><div><div class="gmail_quote">-------<br><br><div dir="ltr"><div><div><span class=""><div>Hi Markus,<br><br></div>here the output of gdalinfo -mm for the same band reported earlier:<br><br>gdalinfo -mm T21KZP_20171212T134159_B01.jp2<br></span><div><div class="h5">Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library<br>Files: T21KZP_20171212T134159_B01.jp2<br>[...]<br><br>Band 1 Block=192x192 Type=UInt16, ColorInterp=Gray<br>  Min=908.000 Max=1511.000   Computed Min/Max=934.000,6934.000<br>  Minimum=908.000, Maximum=1511.000, Mean=1138.806, StdDev=74.933<br>  Overviews: 915x915, 457x457, 228x228, 114x114<br>  Overviews: arbitrary<br>  Metadata:<br>    STATISTICS_MAXIMUM=1511<br>    STATISTICS_MEAN=1138.8064<br>    STATISTICS_MINIMUM=908<br>    STATISTICS_STDDEV=74.933459275<wbr>813<span><br>  Image Structure Metadata:<br>    COMPRESSION=JPEG2000<br>    NBITS=15<br><br></span></div></div></div><div><div class="h5">still differs a lot from what I get after importing into GRASS.<br><br>System Info                          <wbr>                              <wbr>             <br>GRASS version: 7.5.svn                       <wbr>                              <wbr>     <br>GRASS SVN revision: r72203                        <wbr>                              <br>Build date: 2018-01-01                    <wbr>                              <wbr>        <br>Build platform: x86_64-pc-linux-gnu           <wbr>                              <wbr>    <br>GDAL: 2.1.3                         <wbr>                              <wbr>              <br>PROJ.4: 4.9.3                         <wbr>                              <wbr>            <br>GEOS: 3.6.1                         <wbr>                              <wbr>              <br>SQLite: 3.20.1                        <wbr>                              <wbr>            <br>Python: 2.7.14                        <wbr>                              <wbr>            <br>wxPython: 3.0.2.0                       <wbr>                              <wbr>          <br>Platform: Linux-4.14.14-200.fc26.x86_64-<wbr>x86_64-with-fedora-26-Twenty_S<wbr>ix <br><br></div></div></div><div>best,<br></div>Vero<br><div><div><div><br></div></div></div></div><div><div class="h5"><div class="m_8137189963281696563HOEnZb"><div class="m_8137189963281696563h5"><div class="gmail_extra"><br><div class="gmail_quote">2018-02-05 19:49 GMT+01:00 Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a><wbr>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div class="m_8137189963281696563m_6201662462669858325h5"><div><br><br>On Mon, Feb 5, 2018 at 1:14 PM, Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>> wrote:<br>><br>> I tested also with 74 release branch... same result<br>><br>> 2018-02-05 13:05 GMT+01:00 Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>>:<br>>><br>>> Hi devs<br>>><br>>> I'm testing Martin's new add-on, r.sentinel.import. I created an UTM21S location for my data and imported them with:<br>>><br>>> r.sentinel.import input=Downloads/S2B_MSIL1C_201<wbr>71212T134159_N0206_R124_T21KZP<wbr>_20171212T201017.SAFE/GRANULE/<wbr>L1C_T21KZP_A004011_20171212T13<wbr>4158/IMG_DATA/<br>>><br>>> The problem arose when I tried to use i.color.enhance to display an RGB: I got blank screens, so I thought there must be something with the range of values.<br>>><br>>> r.univar map=T21KZP_20171212T134159_B02<wbr>@PERMANENT                              <br>>> total null and non-null cells: 120560400<br>>> total null cells: 0<br>>> Of the non-null cells:<br>>> ----------------------<br>>> n: 120560400<br>>> minimum: 15<br>>> maximum: 17547<br>>> range: 17532<br>>> mean: 913.778<br>>> mean of absolute values: 913.778<br>>> standard deviation: 134.322<br>>> variance: 18042.4<br>>> variation coefficient: 14.6996 %<br>>> sum: 110165471238<br>>><br>>> that already seemed odd...<br>>> I checked the original band2 jp2 file... Values are different...<br>>><br>>> gdalinfo T21KZP_20171212T134159_B02.jp2<br>>> Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library<br>>> Files: T21KZP_20171212T134159_B02.jp2<br>>> ...<br>>> Band 1 Block=1024x1024 Type=UInt16, ColorInterp=Gray<br>>>   Min=602.000 Max=1576.000<br>>>   Minimum=602.000, Maximum=1576.000, Mean=916.799, StdDev=123.509<br>>>   Overviews: 5490x5490, 2745x2745, 1372x1372, 686x686<br>>>   Overviews: arbitrary<br>>>   Metadata:<br>>>     STATISTICS_MAXIMUM=1576<br>>>     STATISTICS_MEAN=916.7992<br>>>     STATISTICS_MINIMUM=602<br>>>     STATISTICS_STDDEV=123.50943477<wbr>872<br>>>   Image Structure Metadata:<br>>>     COMPRESSION=JPEG2000<br>>>     NBITS=15<br><br></div></div></div>Can you try again with gdalinfo -mm? This forces computation of the actual min/max values, which can differ from what is stored in the metadata (an approximation).<br><br></div>There can also be something wrong with i.color.enhance<br><br></div>Markus M <br><div><div><div><span><br>>><br>>> Just to check, I imported with r.in.gdal and I'm getting exactly the same as with r.sentinel.import.<br>>><br>>> What am I doing wrong here? Why would r.in.gdal change values like that? What else needs to be set? I don't remember to have this problem before and it happens in all bands as far as I've checked.<br>>>  <br>>> Ah, I'm using trunk r72203<br>>><br>>> Thanks in advance for any help :)<br>>><br>>> Cheers,<br>>> Vero<br>>><br>>><br>>><br>><br>><br></span>> ______________________________<wbr>_________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/grass-dev</a><br><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></div></div></div><br></div></div>
</blockquote></div><br></div>