I tried out the new code in GRASS 6.5 and 6.4. It does work much better with the GUI and has no trouble with integer maps. It seems to run faster, though maybe that's my imagination.
I tried it with a very small radius (3m) to see what happens and posted the result.
http://www.public.asu.edu/~cmbarton/files/temp/pks_rprominence3.jpg
http://www.public.asu.edu/~cmbarton/files/temp/pks_rprominence3_nviz.jpg
One thing I forgot to mention is that at small sizes, r.prominence creates an interesting red -> black -> white color table. But with larger maps (e.g., the Spearfish DEM), it does not produce a viable color table and the map appears blank. Running r.colors and picking a color table fixes this, but it is probably something simple to fix in the code too.
Best regards
Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: www.public.asu.edu/~cmbarton, http://csdc.asu.edu
On Nov 27, 2009, at 4:37 AM, Benjamin Ducke wrote:
Try attached version. It should behave nicely with the GUI
and also work with integer type input maps.Btw. the module is missing a man page. Wouldn't you like to
write a small one, maybe including one of the beautiful images
you created for illustration? We could then put r.prominence
on the GRASS Add-ons page.Re. the GRASS 7 version, there seem to have been some major
changes (finally) in the raster API. I would need to understand
these first before I can update the source code for r.prominence,
but there is no time for me to do that right now.Best,
Ben
----- Original Message -----
From: "Michael Barton" <michael.barton@asu.edu>
To: "Benjamin Ducke" <benjamin.ducke@oxfordarch.co.uk>
Cc: "list GRASS developers" <grass-dev@lists.osgeo.org>
Sent: Thursday, November 26, 2009 1:25:20 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: r.prominence fails to compile under grass 7Benjamin,
I've been testing r.prominence and it is pretty nice. I forgot to copy
you on a recent post to the user list with screenshots, but I assume
that you received it via the list.I've had no trouble compiling it on grass 6.4 and 6.5, but it failed
with grass 7. The error is below.cmb-MBP-2:r.prominence cmbarton$ make
test -d OBJ.i386-apple-darwin9.8.0 || mkdir -p OBJ.i386-apple-
darwin9.8.0
gcc -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.8.0/
include -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple-
darwin9.8.0/include -g -O2 -I../dst/include -DPACKAGE=
\""grassmods"\" -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-
apple-darwin9.8.0/include -I/Users/cmbarton/grass_dev/grass7_src/
dist.i386-apple-darwin9.8.0/include -o OBJ.i386-apple-darwin9.8.0/
main.o -c main.c
main.c: In function ‘main’:
main.c:72: error: storage size of ‘colors’ isn’t known
main.c:74: error: ‘DCELL’ undeclared (first use in this function)
main.c:74: error: (Each undeclared identifier is reported only once
main.c:74: error: for each function it appears in.)
main.c:74: error: ‘diskrow’ undeclared (first use in this function)
main.c:76: error: ‘outrow’ undeclared (first use in this function)
main.c:146: warning: assignment makes pointer from integer without a
cast
main.c:162: error: ‘DCELL_TYPE’ undeclared (first use in this function)
make: *** [OBJ.i386-apple-darwin9.8.0/main.o] Error 1Also, the GUI doesn't work because it tries to reference something
called fpmap, instead of something like old,cell,raster, and I don't
think that is a valid item.BTW, I'll be at UCL and the IOA to give a talk on March 1. Maybe you
can come down and say hi.Best
Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State UniversityPhone: 480-965-6262
Fax: 480-965-7671
www: www.public.asu.edu/~cmbarton, http://csdc.asu.edu------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.<r.prominence.tar.gz>