[STATSGRASS] Re: [GRASS-user] Simulation in grass 6

Rainer M. Krug Rainer at krugs.de
Tue Sep 25 05:20:48 EDT 2007


Hamish wrote:
> Rainer M. Krug wrote:
> 
>> I am planning to write a spatial simulation model, simulating the spread 
>> of alien species on a landscape scale by using grass.
>> My question how I should write the simulation model, i.e. in which 
>> scripting language. I am using Linux and have quite a bit of experience 
>> with R, so I thought that R (together with spgrass6) would be a nice 
>> scripting language to write the simulation and sending the grass 
>> commands through to grass, because it offers me quite a bit more 
>> concerning strtucturing on the modelling side then using a normal shell 
>> script
>> But the simulation should also run under Windows and I don't have any 
>> experience with grass and R under windows.
> 
> It sounds very well suited for Linux or MacOSX, but I've little idea about the
> GRASS+R Windows situation. Maybe someone on the statsgrass mailing list knows?
> (taking the liberty to cc)

Thanks a lot - I am subscribed to this list now - strange that I 
overlooked that lisat before...

> 
>> I have the following questions:
> ..
>> 3) Is any other scripting language more suitable for what I want to 
>> achieve (I have no experience with C / C++, but quite a bit with Delphi. 
>> I have never used the likes of perl et al. and bash scrips seem a bit 
>> awkward to me for bigger projects.)?
> 
> You could try python. The next version of GRASS will use python heavily for the
> GUI, so expect lots of example scripts, help on the mailing list from fellow
> travelers, and tight integration with the code.

Sounds very interesting - I'll take a look at it.

> 
> Learn python in 10 min:  http://www.poromenos.org/tutorials/python

Python doesn't look as difficult as I thought the first time I looked at 
it (a few years back...). Looks similar to what I am used to in Delphi.

> 
> Also there is a SWIG/Python interface to any needed GIS library functions,
> which is pretty cool, although the grass modules generally give you what you
> need without having to resort to using any low-level libgis functions.
> 
> see  http://grass.gdf-hannover.de/wiki/GRASS_and_Python

Looking at the document, I must say it seems to be a usefull approach to 
use Python - and it is crossplatform. One thing which I did not see that 
quickly is how I can execute grass commands from python - I guess it is 
easy, but I didn't find it when I looked at the document.

Thanks a lot for your usefull and very helpfull hints,

Rainer


>      http://freegis.org/cgi-bin/viewcvs.cgi/grass6/swig/python/
> 
> Hamish
> 
> 
> 
>       ____________________________________________________________________________________
> Luggage? GPS? Comic books? 
> Check out fitting gifts for grads at Yahoo! Search
> http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
> 
> _______________________________________________
> grassuser mailing list
> grassuser at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser


-- 
NEW EMAIL ADDRESS AND ADDRESS:

Rainer.Krug at uct.ac.za

RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH

Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa

Tel:		+27 - (0)21 650 5776 (w)
Fax:		+27 - (0)86 516 2782
Fax:		+27 - (0)21 650 2440 (w)
Cell:		+27 - (0)83 9479 042

Skype:		RMkrug

email:	Rainer.Krug at uct.ac.za
       	Rainer at krugs.de




More information about the grass-stats mailing list