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

Markus Metz markus.metz.giswork at gmail.com
Mon May 21 14:05:57 PDT 2018


On Mon, May 21, 2018 at 12:01 AM, Helmut Kudrnovsky <hellik at 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 at .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 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180521/83962792/attachment.html>


More information about the grass-user mailing list