[GRASS-user] r.import/r.in.gdal jpeg2000 image

Hi Users,

Trying to import a jpeg2000 image (size 8.78 gb) with both r.import and r.in.gdal but get the error below for each module. I am using the 64 bit version of Grass 7.4.0 on Windows Server 2008

Current region rows: 111307, cols: 111307

“ERROR: G_malloc: unable to allocate 1142385 bytes of memory at lib/raster/put_row.c:343”

Any ideas how i can import it?

···

Paul J. Shapley MSc CGeog (GIS) FRGS

Paul Shapley-2 wrote

Hi Users,

Trying to import a jpeg2000 image (size 8.78 gb) with both r.import and
r.in.gdal but get the error below for each module. I am using the 64 bit
version of Grass 7.4.0 on Windows Server 2008

Current region rows: 111307, cols: 111307

"ERROR: G_malloc: unable to allocate 1142385 bytes of memory at
lib/raster/put_row.c:343"

Any ideas how i can import it?

--
*Paul J. Shapley *MSc CGeog (GIS) FRGS

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

it's a memory allocation issue.

is there a need to import the raster data? Have you tried r.external?

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

On Mon, May 21, 2018 at 12:01 AM, Helmut Kudrnovsky <hellik@web.de> wrote:

Paul Shapley-2 wrote

Hi Users,

Trying to import a jpeg2000 image (size 8.78 gb) with both r.import and
r.in.gdal but get the error below for each module. I am using the 64 bit
version of Grass 7.4.0 on Windows Server 2008

Current region rows: 111307, cols: 111307

“ERROR: G_malloc: unable to allocate 1142385 bytes of memory at
lib/raster/put_row.c:343”

Any ideas how i can import it?


*Paul J. Shapley *MSc CGeog (GIS) FRGS


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

it’s a memory allocation issue.

Yes, but allocating about 1MB of memory should not be a problem, unless there is no free memory left. That means there must be a memory leak somewhere. Regarding raster import with r.in.gdal, three components are involved: GRASS, GDAL, and the raster format driver. With regard to r.in.gdal, a memory leak in GRASS or GDAL is very unlikely and not reproducable. Therefore I guess the problem is the raster format driver for JPEG2000.

You can try to convert the jp2 file to GeoTIFF first with gdal_translate, then import with r.in.gdal or r.import. If gdal_translate fails with a similar error, it must be the jp2 driver. If in doubt, ask also on the gdal mailing list.

is there a need to import the raster data? Have you tried r.external?

That should fail as well, as soon as the data are accessed.

Markus M


best regards
Helmut

Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user