[GRASS-dev] uploaded r.terracost to GRASS Addons

Markus Neteler neteler at osgeo.org
Wed Apr 8 03:24:33 EDT 2009


On Thu, Apr 2, 2009 at 7:08 PM, Laura Toma <ltoma at bowdoin.edu> wrote:
>
> If you're looking for a fast version of r.cost, try r.terracost.    I think
> I put it at some point in the add-ons repository. Otherwise it's available
> from my website.  Depending on the amount  of memory you specify on the
> command line, it runs in memory (an optimized CPU algorithm)  or an I/O
> algorithm.

I have (upon request from Laura) now uploaded r.terracost to Addons:

svn checkout https://svn.osgeo.org/grass/grass-addons/raster/r.terracost
r.terracost

It is r.terracost-1.1 but with various include file fixes, a new
description.html,
a new Makefile. Also I didn't not include the IOSTREAM lib as it is already
present in GRASS 6 in the lib/ directory.

Compilation:
make MODULE_TOPDIR=/path/to/grass6svn/

Currently, I get these two errors:

iterator.cc: In member function ‘int Iterator::getNext(ijCostSource*)’:
iterator.cc:42: error: no match for ‘operator=’ in ‘* out =
((Iterator*)this)->Iterator::tile->Tile::<anonymous>.mappedTile<costSourceType>::<anonymous>.genericTile<T>::get
[with T = costSourceType](((int)((short
int)((Iterator*)this)->Iterator::iMarker)), ((int)((short
int)((Iterator*)this)->Iterator::jMarker)))’
input.h:160: note: candidates are: ijCostType<costSourceType>&
ijCostType<costSourceType>::operator=(const
ijCostType<costSourceType>&)
make: *** [OBJ.x86_64-unknown-linux-gnu/iterator.o] Error 1


Makefile:15: warning: overriding commands for target
`/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/bin/r.terracost'
/home/neteler/grass64//include/Make/Module.make:14: warning: ignoring
old commands for target
`/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/bin/r.terracost'
c++ -I/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/include  -g
-O2      -DPACKAGE=\""grassmods"\"
-I/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/include -o
OBJ.x86_64-unknown-linux-gnu/main.o -c main.cc
main.cc: In function ‘void printGrid(AMI_STREAM<ijCostType<float>
>*)’:
main.cc:432: warning: deprecated conversion from string constant to
‘char*’
main.cc: In function ‘int main(int, char**)’:
main.cc:976: error: no matching function for call to
‘AMI_sort(AMI_STREAM<distanceType>*&, AMI_STREAM<distanceType>**,
distanceIJCompareType*, int&, char*&)’
make: *** [OBJ.x86_64-unknown-linux-gnu/main.o] Error 1

Fixes appreciated.

Markus


More information about the grass-dev mailing list