Opened 8 years ago
Last modified 7 years ago
#3173 new defect
slow raster processing on r.external connected jpeg2000 layers
Reported by: | dnewcomb | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.4 |
Component: | Raster | Version: | svn-releasebranch72 |
Keywords: | r.external, GDAL | Cc: | |
CPU: | x86-64 | Platform: | MSWindows 7 |
Description
Just did a quick NVDI with Sentienl-2 bands downloaded from the Amazon cloud. If I link to the B04.jp2 and B08.jp2 images via r.external it takes i.vi about 60 minutes to create an ndvi layer.
If I import the layers ( 13 seconds each) and then run i.vi to create an ndvi layer, it takes 1 minute 24 sec.
This is with Wingrass 64 bit r69539
Images used were downloaded from http://sentinel-s2-l1c.s3-website.eu-central-1.amazonaws.com/#tiles/18/S/UE/2015/7/26/0/
Change History (10)
comment:1 by , 8 years ago
Component: | Imagery → Raster |
---|---|
Keywords: | r.external GDAL added |
comment:2 by , 8 years ago
gdalinfo --version gives: GDAL 2.1.1, released 2016/07/07
gdalinfo --formats gives:
JP2OpenJPEG for JP2 driver
Not sure which version of the JP2OpenJPEG driver was used.
comment:3 by , 8 years ago
There is some dicussion on the right JPEG2000 driver to choose:
- http://gis.stackexchange.com/questions/169395/converting-large-jp2-files-using-gdal
- http://gis.stackexchange.com/questions/176717/gdal-sentinel-2-driver
IMHO it is a GDAL related issue, not GRASS GIS related.
comment:4 by , 8 years ago
Looks like the best option for an open source stack is the JP2OpenJPEG driver, which is what is installed with the gdal version that in the Wingrass standalone binary.
What confuses me is that a straight r.in.gdal to read , uncompress, and import the data takes seconds, while read, uncompress, and analyze takes substantially longer.
Will try to confirm that it happens on Linux as well before digging deeper.
comment:5 by , 8 years ago
Ok, had a few moment minutes to test on 10/20/16 with a fresh nightly build for 64 bit windows and a fresh SVN pull for GRASS 7.2.
The Linux version of GRASS did a simple NDVI in 3 minutes 5 seconds on a 4 year old i5 laptop with spinning drive. Gdal version is 2.1.0 Libopenjpeg version is 2.1.0-2
The Windows nightly build took 60 minutes on a 1 year old i7 running on an SSD drive. Will try again next week.
Current version of Gdal in OSGeo4W is gdal, 2.1.2-1. Current version of openjpeg, openjpeg is 2.0.0-2.
https://github.com/uclouvain/openjpeg/blob/version.2.1/CHANGES does not list any changes related to speed.
QGIS windows version for windows has closer to GRASS Linux speeds when manually calculating NDVI using the raster calculator and appears to be using the 2.0.0-2 version of openjpeg ( as well as I can tell at this time of the night).
Not sure if it is strictly a Linux vs Windows issue or library version issue, or something else.
comment:7 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:10 by , 7 years ago
Milestone: | → 7.2.4 |
---|
Please also post the GDAL version and the JPEG2000 being used. The performance can quite differ and is rather unrelated to GRASS since r.external relies on GDAL.