[GRASS-user] importing Mars DEM takes too long

Sajid Pareeth spareeth at gmail.com
Sat Nov 19 03:06:13 PST 2016


Hi Anna

I am not sure if it is related, but I had similar issues with Sentinel JP2
files.
The solution was to use the ECW library to read the JP2 files instead of
JP2OpenJPEG/JPEG-2000 driver with OpenJPEG library.

I had to recompile gdal to add the ECW support.

## Add ECW support to GDAL
./configure --with-ecw=/usr/local
...
## To read a jp2 file using ecw plugin, switch off the other two drivers
export GDAL_SKIP=JP2OpenJPEG,JPEG2000


Ofcourse you have to install libecw before recompiling gdal.

Hope it helps.

Sajid



On Fri, Nov 18, 2016 at 10:08 PM, Anna Petrášová <kratochanna at gmail.com>
wrote:

> Hi,
>
> I was trying to import Mars DEM with r.in.gdal, and it takes forever
> to finish it (It showed 3% after 10 minutes). This is what gdalinfo
> says:
>
> > gdalinfo /tmp/ESP_035583_2060_RED.JP2
> Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
> Files: /tmp/ESP_035583_2060_RED.JP2
>        /tmp/ESP_035583_2060_RED.JP2.aux.xml
> Size is 13094, 26340
> Coordinate System is:
> PROJCS["Equirectangular MARS",
>     GEOGCS["GCS_MARS",
>         DATUM["unknown",
>             SPHEROID["unnamed",3392593.6110435,0]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433]],
>     PROJECTION["Equirectangular"],
>     PARAMETER["latitude_of_origin",25],
>     PARAMETER["central_meridian",180],
>     PARAMETER["standard_parallel_1",0],
>     PARAMETER["false_easting",0],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]]]
> Origin = (3889293.250000000000000,1519463.750000000000000)
> Pixel Size = (0.500000000000000,-0.500000000000000)
> Corner Coordinates:
> Upper Left  ( 3889293.250, 1519463.750) (114d18'56.57"W, 50d39'41.21"N)
> Lower Left  ( 3889293.250, 1506293.750) (114d18'56.57"W, 50d26'20.49"N)
> Upper Right ( 3895840.250, 1519463.750) (114d12'18.52"W, 50d39'41.21"N)
> Lower Right ( 3895840.250, 1506293.750) (114d12'18.52"W, 50d26'20.49"N)
> Center      ( 3892566.750, 1512878.750) (114d15'37.55"W, 50d33' 0.85"N)
> Band 1 Block=1024x1024 Type=UInt16, ColorInterp=Undefined
>   Overviews: 6547x13170, 3273x6585, 1636x3292, 818x1646, 409x823,
> 204x411, 102x205
>   Overviews: arbitrary
>   Image Structure Metadata:
>     NBITS=10
>
> GRASS location was created from this file:
>
> projection: 99 (Equirectangular MARS)
> zone:       0
> datum:      ** unknown (default: WGS84) **
> ellipsoid:  a=3392593.6110435 es=0
> north:      1519463.75
> south:      1506293.75
> west:       3889293.25
> east:       3895840.25
> nsres:      0.5
> ewres:      0.5
> rows:       26340
> cols:       13094
> cells:      344895960
>
> I tried to open it in QGIS and it appeared instantly. Then, I tried to
> export it from QGIS as Geotiff, but that took again very long (I
> didn't wait for it to finish). Running gdal_translate in command line
> can't finish either. I tried to debug r.in.gdal and it seems to be
> stuck on line 1103 in  GDALRasterIO call. Any advice? I can send the
> data privately.
>
> Thank you,
>
> Anna
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161119/eac93a66/attachment.html>


More information about the grass-user mailing list