[GRASS-dev] Re: comparing r.cost and r.terracost [was: Re:
[GRASS-user] affecting cat of closest feature as pixel value]
Laura Toma
ltoma at bowdoin.edu
Thu Jul 16 11:58:07 EDT 2009
This may be because you don't have rights to /var/tmp, or maybe the
directory /var/tmp/mlenert does not exist.
To change this location, you do not need to change main.cc. Instead
use option
VTMPDIR Location of intermediate STREAMs
default: /var/tmp/username
I tried r.terracost .......VTMPDIR=.
and it put the intermediate streams in the current folder.
The other potential problem is the location of the temporary streams.
The default is /var/tmp/, but the user can set it with option
STREAM_DIR Location of temporary STREAMs
default: /var/tmp
Even though main.cc explicitly executes a setenv, it did not work
for me. I had to explicitly run from the shell:
export STREAM_DIR=/var/tmp/
-Laura
On Jul 15, 2009, at 12:49 PM, Moritz Lennert wrote:
> On 15/07/09 15:40, Laura Toma wrote:
>> Hi Moritz,
>> Terracost runs in two modes: in memory (when numtiles=1), and in
>> external memory, using streams (when numtiles>1). When run
>> without a value for numtiles, it sets numtiles to the optimal
>> value. In all your tests numtiles was set to 1. The algorithms in
>> the 2 cases are different, so you also need to test with numtiles>1.
>
> Trying to run with numtiles>1, I get:
>
> TileFactory: Sorting internalstr...
> file=/var/tmp/mlennert/terracost.tileStr:cannot read!: Bad address
> r.terracost: /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-
> linux-gnu/include/grass/iostream/ami_sort_impl.h:91: size_t
> makeRun_Block(AMI_STREAM<T>*, T*, unsigned int, Compare*) [with T =
> ijCostType<costSourceType>, Compare = ijTileCostCompareType]:
> Assertion `err == AMI_ERROR_NO_ERROR || err ==
> AMI_ERROR_END_OF_STREAM' failed.
> Aborted
>
> And the same, if I change all occurrences of /var/tmp in main.cc to /
> tmp
>
> Moritz
>
>
>
More information about the grass-dev
mailing list