[GRASS-user] r.cost: exact meaning of percent_memory ?
Markus Metz
markus.metz.giswork at gmail.com
Thu Jan 22 12:12:53 PST 2015
On Thu, Jan 22, 2015 at 2:30 PM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> I am trying to understand the 'percent_memory' option in r.cost. In the man
> page it says: "The amount of map to hold in memory at one time can be
> controlled with the percent_memory option. For large maps this value will
> have to be set to a lower value.".
The man page is wrong, it is not the amount of the map, but the amount
of the current region.
>
> IIUC, this would mean that if I have a region of X DCELL cells, I would
> need: X*8 bytes of memory, or ?
No, it would need X * 3 * 8 bytes (if direction output is requested,
another X * 4 bytes). Considering that you are a power user and
developer, and that you do not understand the 'percent_memory' option,
it is high time to change that option to the standard memory option
where the user specifies the amount of memory in MB that should be
used.
>
> So if memory available is > X*8 I should be able to use percent_memory=100
> (or at least 75). Is that correct ?
No, see also above, the input cost surface, the output accumulated
cost surface, and the cell value of the nearest starting point are
held in memory. If a direction output map is requested, this one is
also held in memory.
>
> Is there a special reason why r.cost doesn't use a "memory" parameter
> instead of percent_memory ? IMHO, the former is a bit easier to handle for
> the average user.
Historical reasons. I wanted to change the 'percent_memory' option to
a 'memory' option, but did not find the time yet. Same for r.walk.
Markus M
>
> Moritz
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
More information about the grass-user
mailing list