[GRASSLIST:2503] calling GRASS functions from python

Christopher Fonnesbeck chris at fonnesbeck.org
Fri Feb 6 18:09:03 EST 2004


I am trying to determine the best way to integrate python and GRASS for 
some simulation modelling. I have a nice discrete event simulation 
model in python that uses spatially explicit data. Every so often 
during the simulation, I would like to call GRASS and determine the 
spatial extent of some disturbance, and either return affected polygon 
id's, or write them to a database. I was thinking of writing a GRASS 
module to do this using weave, which allows C code to be called from 
python. Would it work to run python within the GRASS environment (in 
much the same way as R does) and have it call GRASS functions. Just 
wondering if this seems like a plausible strategy to more experienced 
GRASS programmers.

Any feedback would be  most helpful.
Chris
--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia




More information about the grass-user mailing list