[GRASS5] GRASS Add-ons

Michael Barton michael.barton at asu.edu
Sun Mar 12 15:09:42 EST 2006


Helena,

IMHO, the best solution to this is Benjamin Ducke's new GRASS Extensions
Manager (GEM). This is nearing final release. It allows users to add new
modules (i.e., extensions) in a special extension directory. These will
automatically be added to a special xtn menu in the GIS Manager or (of
course) be accessible via the command line. These can be added to a binary
installation of GRASS.

This way we *CAN* have some kind of control over what goes into a base GRASS
installation AND users can install all the really neat add-ins you're
seeing. Most importantly, they can add these without compiling GRASS.

Michael


On 3/11/06 10:49 PM, "Helena Mitasova" <hmitaso at unity.ncsu.edu> wrote:

> I have a question about Add-ons - Do we have any restrictions /
> official rules for what can go into GRASS add ons?
> 
> http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassAddOns
> 
> I noticed that quite a few useful modules are being developed (such
> as the below r.lake)
> and it would be great to have them submitted into add-ons so that
> people can see what
> is available, test it and if it is great and important it could be
> included into next release.
> Also - do we have any rules on when an add-on module can be submitted
> to CVS?
> 
> thanks, Helena
> 
> 
> 
> On Jan 9, 2006, at 9:18 AM, M?ris Nartišs wrote:
> 
>> As my first attempt to contact dev list failed (my mail was eaten by
>> mail daemons ;), I resend my first mail.
>> 
>> 
>> Hi,
>> 
>> I send to You my first peace of C code (after hello world ;). As a
>> newbie I would like to hear any feedback about this code:
>> 1) Is idea worth to be included in GRASS some day?
>> 2) Any comments about programming in GRASS and C in general.
>> 
>> NAME: r.lake (original ;)
>> 
>> PURPOSE: This module fills lake at given level from start point
>> (seed) on DEM.
>> 
>> HOW it works: it assigns depth value to all cells which are connected
>> to start point and are below water level. Filling is done by moving
>> window multiple times (as necessary) across map. Output map depth
>> values are positive, but it is possible to output negative values
>> (units below water surface) for visualisation purposes.
>> 
>> TODOs:
>> - 3d output. Current output is 2d + depth value;
>> - nice blue gradient for output map;
>> - documentation with examples - in progress.
>> - other ideas?
>> 
>> BUGs:
>> - seed map cannot be negative - cannot use negative lake output
>> maps as input.
>> 
>> HOW to use:
>> input = DEM
>> seed = raster with at least one cell below water level with value > 0
>> lake = new output raster file
>> wl = water level in DEM units
>> -n = output map will have negative values
>> -o = overwrite seedmap instead of using "lake"
>> 
>> HISTORY:
>> Last spring I was working on my master thesis and needed way how to
>> find lake shape, depth if only single bank point is known. As I could
>> not find existing method in GRASS, someone on GRASS user list
>> suggested to use r.mapcalc. I wrote script that calls r.mapcalc and
>> fills lake cell by cell. On 3 GHz P4 it took about 24 - 48 h to finish
>> single lake map. This autumn I read "teachyourself C in 24h" and
>> rewrote it in C. Now - after some testing and improving - here it is
>> :) Now I can get my lake in less than minute even on my 800 MHz
>> Celeron :)
>> There has been request from users for such functionality on GRASS user
>> list, so, IMHO after this module will be checked, tested etc, it could
>> be useful for other ppl too.
>> 
>> CHANGES: Added gettext support by Markus Neteler;
>> -o flag = in/out separated.
>> 
>> WBR,
>> Maris Nartiss
>> <r_lake.zip>
> 
> 
> 

___________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Arizona State University
Tempe, AZ  85287

WWW - http://www.public.asu.edu/~cmbarton
Phone: 480-965-6262
Fax: 480-965-7671




More information about the grass-dev mailing list