<div dir="ltr"><div><div><div><div><div><div>Hi Anna<br><br></div>I am not sure if it is related, but I had similar issues with Sentinel JP2 files.<br></div>The solution was to use the ECW library to read the JP2 files instead of JP2OpenJPEG/JPEG-2000 driver with OpenJPEG library.<br><br></div>I had to recompile gdal to add the ECW support.<br><br>## Add ECW support to GDAL<br>./configure --with-ecw=/usr/local <br>...<br>## To read a jp2 file using ecw plugin, switch off the other two drivers<br>export GDAL_SKIP=JP2OpenJPEG,JPEG2000<br><br><br></div>Ofcourse you have to install libecw before recompiling gdal.<br><br></div>Hope it helps.<br><br></div>Sajid<br><div><div><br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 18, 2016 at 10:08 PM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I was trying to import Mars DEM with r.in.gdal, and it takes forever<br>
to finish it (It showed 3% after 10 minutes). This is what gdalinfo<br>
says:<br>
<br>
> gdalinfo /tmp/ESP_<a href="tel:035583" value="+39035583">035583</a>_2060_RED.JP2<br>
Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library<br>
Files: /tmp/ESP_<a href="tel:035583" value="+39035583">035583</a>_2060_RED.JP2<br>
       /tmp/ESP_<a href="tel:035583" value="+39035583">035583</a>_2060_RED.JP2.aux.xml<br>
Size is 13094, 26340<br>
Coordinate System is:<br>
PROJCS["Equirectangular MARS",<br>
    GEOGCS["GCS_MARS",<br>
        DATUM["unknown",<br>
            SPHEROID["unnamed",3392593.<wbr>6110435,0]],<br>
        PRIMEM["Greenwich",0],<br>
        UNIT["degree",0.<wbr>0174532925199433]],<br>
    PROJECTION["Equirectangular"],<br>
    PARAMETER["latitude_of_origin"<wbr>,25],<br>
    PARAMETER["central_meridian",<wbr>180],<br>
    PARAMETER["standard_parallel_<wbr>1",0],<br>
    PARAMETER["false_easting",0],<br>
    PARAMETER["false_northing",0],<br>
    UNIT["metre",1,<br>
        AUTHORITY["EPSG","9001"]]]<br>
Origin = (3889293.250000000000000,<wbr>1519463.750000000000000)<br>
Pixel Size = (0.500000000000000,-0.<wbr>500000000000000)<br>
Corner Coordinates:<br>
Upper Left  ( 3889293.250, 1519463.750) (114d18'56.57"W, 50d39'41.21"N)<br>
Lower Left  ( 3889293.250, 1506293.750) (114d18'56.57"W, 50d26'20.49"N)<br>
Upper Right ( 3895840.250, 1519463.750) (114d12'18.52"W, 50d39'41.21"N)<br>
Lower Right ( 3895840.250, 1506293.750) (114d12'18.52"W, 50d26'20.49"N)<br>
Center      ( 3892566.750, 1512878.750) (114d15'37.55"W, 50d33' 0.85"N)<br>
Band 1 Block=1024x1024 Type=UInt16, ColorInterp=Undefined<br>
  Overviews: 6547x13170, 3273x6585, 1636x3292, 818x1646, 409x823,<br>
204x411, 102x205<br>
  Overviews: arbitrary<br>
  Image Structure Metadata:<br>
    NBITS=10<br>
<br>
GRASS location was created from this file:<br>
<br>
projection: 99 (Equirectangular MARS)<br>
zone:       0<br>
datum:      ** unknown (default: WGS84) **<br>
ellipsoid:  a=3392593.6110435 es=0<br>
north:      1519463.75<br>
south:      1506293.75<br>
west:       3889293.25<br>
east:       3895840.25<br>
nsres:      0.5<br>
ewres:      0.5<br>
rows:       26340<br>
cols:       13094<br>
cells:      344895960<br>
<br>
I tried to open it in QGIS and it appeared instantly. Then, I tried to<br>
export it from QGIS as Geotiff, but that took again very long (I<br>
didn't wait for it to finish). Running gdal_translate in command line<br>
can't finish either. I tried to debug r.in.gdal and it seems to be<br>
stuck on line 1103 in  GDALRasterIO call. Any advice? I can send the<br>
data privately.<br>
<br>
Thank you,<br>
<br>
Anna<br>
______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a></blockquote></div><br></div>