[GRASS5] GRASS Add-ons

Helena Mitasova hmitaso at unity.ncsu.edu
Sun Mar 12 00:49:40 EST 2006


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>




More information about the grass-dev mailing list