[GRASS-user] Lack of memory importing .shp file

Markus Metz markus.metz.giswork at gmail.com
Thu Sep 28 14:58:20 PDT 2017


On Thu, Sep 28, 2017 at 11:14 PM, Rich Shepard <rshepard at appl-ecosys.com>
wrote:
>
>   Haven't before experienced this one. There are 4G of memory on this
> desktop and v.import choked on a large .shp file (all files consume ~1G on
> disk):
>
> ERROR: G_realloc: unable to allocate 264880028 bytes of memory at
lib/vector/Vlib/snap.c:252
> ERROR: Unable to import OGR datasource
</home/rshepard/data/grassdata/wash-state-data/land-use/landuse10.shp>
>
>   With no other major user application processes running top shows 2G+
free
> memory so I'm puzzled why 265M could not be allocated.

The update interval of top might be too long to show the amount of memory
consumed in the last split seconds.

I suggest to use v.in.ogr instead of v.import because v.import snaps by
default which consumes a lot of memory and takes a long time.

If v.in.ogr suggests snapping, you can set the environment variable
GRASS_VECTOR_LOWMEM=1
to reduce memory consumption. This will slow down the import because
temporary data will be kept on disk instead of in memory.

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170928/d4086267/attachment.html>


More information about the grass-user mailing list