<div dir="ltr"><div><div><br><br>On Mon, May 21, 2018 at 12:01 AM, Helmut Kudrnovsky <<a href="mailto:hellik@web.de">hellik@web.de</a>> wrote:<br>><br>> Paul Shapley-2 wrote<br>> > Hi Users,<br>> ><br>> > Trying to import a jpeg2000 image (size 8.78 gb)  with both r.import and<br>> > r.in.gdal but get the error below for each module. I am using the 64 bit<br>> > version of Grass 7.4.0 on Windows Server 2008<br>> ><br>> > Current region rows: 111307, cols: 111307<br>> ><br>> > "ERROR: G_malloc: unable to allocate 1142385 bytes of memory at<br>> > lib/raster/put_row.c:343"<br>> ><br>> > Any ideas how i can import it?<br>> ><br>> > --<br>> > *Paul J. Shapley *MSc CGeog (GIS) FRGS<br>> ><br>> > _______________________________________________<br>> > grass-user mailing list<br>><br>> > grass-user@.osgeo<br>><br>> > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>><br>> it's a memory allocation issue.<br><br></div>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.<br><br></div>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.<br><div><div><br>><br>> is there a need to import the raster data? Have you tried r.external?<br><br></div><div>That should fail as well, as soon as the data are accessed.<br><br></div><div>Markus M<br><br></div><div>><br>><br>><br>> -----<br>> best regards<br>> Helmut<br>> --<br>> Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html">http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html</a><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div></div>