Bug #5374

GRASS r.to.vect memory error

Added by Giovanni Manghi about 1 year ago. Updated 5 months ago.

Status:Closed Start Date:04/16/2012
Priority:Normal Due date:
Assigned to:Victor Olaya % Done:

0%

Category:Backend/GRASS
Target version:-
Patch supplied:No

Description

This may happen also with other modules, not sure because I'm just starting testing.

When running r.to.vect using a quite small raster the program runs for a lot of time and then throws a not well specified error. In the sextante log I see

Traceback (most recent call last):
File "C:\Users\gio/.qgis/python/plugins\sextante\core\GeoAlgorithm.py", line 94, in execute
self.processAlgorithm(progress)
File "C:\Users\gio/.qgis/python/plugins\sextante\grass\GrassAlgorithm.py", line 214, in processAlgorithm
GrassUtils.executeGrass(commands, progress);
File "C:\Users\gio/.qgis/python/plugins\sextante\grass\GrassUtils.py", line 235, in executeGrass
loglines.append(line)
MemoryError

The same tool (with the same input) using the QGIS/GRASS plugins runs in a few seconds.

Test made on a Windows Seven virtual machine (linux host).

History

Updated by Paolo Cavallini about 1 year ago

  • Category set to Backend/GRASS

Updated by Giovanni Manghi about 1 year ago

  • Assigned to set to Victor Olaya

On Windows it still behave like in the description, regardless of the parameters. On Linux it works, but:

the -z flag should be available only for points (so better be "no" by default, see #5463. The error is not ignored by GRASS and make the module fail to run)

ERROR: z flag is supported only for points
ERROR: Vector map <output> not found

using the -b flag produces an error, because after building the vector with no topology it is needed to run "v.build" (so also here better to be "no" by default)

GRASS_INFO_ERROR(5269,1): Unable to open vector map <output@user> on level 2. Try to rebuild vector topology by v.build.

the -q flag also seems to be obsolete

WARNING: The '-q' flag is superseded and will be removed in future. Please use '--quiet' instead.

and the -v flag does not make sense if input is not a GRASS raster

WARNING: Raster is not CELL, '-v' flag ignored, raster values will be written to the table.

Updated by Markus Neteler - 12 months ago

MemoryError of raster commandsc likely indicates that the
computational region has too many cells for the available RAM.

Updated by Giovanni Manghi 12 months ago

Markus Neteler - wrote:

MemoryError of raster commandsc likely indicates that the computational region has too many cells for the available RAM.

I'm getting this "memory error" in many modules also when the input raster is very small and/or the region is small and the resolution is low.

Updated by Markus Metz 12 months ago

Giovanni Manghi wrote:

Markus Neteler - wrote:

MemoryError of raster commandsc likely indicates that the computational region has too many cells for the available RAM.

I'm getting this "memory error" in many modules also when the input raster is very small and/or the region is small and the resolution is low.

The size of the input raster is irrelevant, what matters is the region definition. The safest way would be to make sure that "Use min covering region" is checked in Analysis -> SEXTANTE options and configuration -> GRASS commands. If you do not want to use the min covering region, you will need to manually set the extents and cellsize.

The contents of "GRASS execution commands" and "GRASS execution console output" would be helpful to find the reason for the memory error.

Updated by Giovanni Manghi 5 months ago

  • Status changed from New to Closed

the option to allow choose the region resolution is now exposed in any grass module. Anyway the module now seems to work fine.

Also available in: Atom PDF