[GRASS-user] simple Grass.script python script, how to?
JRadinger at gmx.at
Fri Jan 28 06:48:09 EST 2011
Hello grass users!
I am quite new to use grass gis via a python script from outside.
I am runnning grass gis on windows and I can call grass.script in python.
After reading the grass-website about python scripts, I still don't know how to start. I just want to create a .py file which i than want to run.
This python script should do following simple grass command:
v.to.rast input=river output=river_raster use=val value=1 --o
but how does a pyhton script look like for this command?
I first need to define my location and my mapset and I have to import or define somehow the variable river. How do I set the region? In Grass I just do g.region vect=river res=10 save=region_river.
Can someone just give me an example for these two commands and how such a .py will look like...
Thank you very much
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser
More information about the grass-user