Forestry and Grass + scripts for models

Bernhard Reiter bernhard at uwm.edu
Tue Oct 26 13:55:00 EDT 1999


Just let me comment on the programming technology part of your post.

On Tue, Oct 26, 1999 at 06:49:50PM +0100, Agustin Lobo wrote:
> Actually, writing (i.e. population or metapopulation) models
> in C (or C++) is far from ideal, as writing the code tends to
> imply too much time devoted to "low level" 

This is pretty much a question of style. Good C programs a very readble.
(C++ is more difficult.)

> A closer-to-ideal situation would be having an script language, from
> which you can call grass programs. 

Any scripting language will do that. The shell does it.
I would recomment python. (www.python.org)
But you also mean GRASS functions.

> Now there are other script languages than could be better, i.e.,
> like perl, does anybody have experience at integrating grass
> commands within a perl script?

Perl generally is a greater mess than "C". It is much harder to write
good structured programs in perl.


> In any case, I think that the (near) future of Grass should contemplate
> the use of an scripting language for modeling. Is anybody at Baylor
> working in this direction?

Well the GRASS programs are pretty modular already.
If you talk GRASS c-functions, any modern "glue" language can integrate
and access c-functions. Look at http://www.swig.org/ for the 
general wrapping technology.

python 
	http://www.python.org
scheme (in the guile variant)
	http://www.gnu.org/software/guile/guile.html

are the most interesting ones. (And also used by very sucessful
software, like the gimp.(Perl is used too, by gimp but perl was
more popular for other reasons.))

(If somebody comes up with the money, my company would be happy to 
do major work on GRASS in this area.)
	Bernhard

-- 
Research Assistant, Geog Dept UM-Milwaukee, USA.    (www.uwm.edu/~bernhard)
Free Software Projects and Consulting 			(www.intevation.de)  
Association for a Free Informational Infrastructure              (ffii.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 288 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/19991026/07d9e2f7/attachment.bin


More information about the grass-user mailing list