Modularizing GRASS

charnotw charnotw at helios.aston.ac.uk
Fri Dec 8 07:00:00 EST 1995


> 
> How are you, GRASS users?
> 
> Does anyone know GRASS applications, complete or incomplete, in which all
> or most of the commands are modularized?
> 
> For non-expert users of GRASS, it is difficult to do all the programming by
> themselves.  For this reason, they are usually dependent on someone elses
> programming to write the whole program.  In order for these non-experts to
> freely write their own analytical programs, modularize complete command
> sets should be a key procedure that we must start building.
> 
> Do you have any ideas?
> Please e-mail me directly and share any thoughts or information you may have.
> Thank you in advance for any help.
> 
> May GRASS help the grass-root attempts to spread GIS.
> Have a great Christmas.
> 
> Akihiko Machida,
> Senior Researcher
> Regional Science Institute Corp.
> machida at vtt.co.jp
>    
> 


To a certain extent modulariztion in grass is acheived using unix
scripts.  For example I wrote a script visually to compare several 
raster cross-sections. This basically linked r.transect, g.gnuplot 
and d.mapgraph.

If you look through the grass manual you will find a few programs with
no obvious use until you realise they are meant to be embedded within
scripts

eg g.tempfile
   g.ask
   d.ask
   g.filename
   g.findfile

which I guess are what you mean by modularization.  There are 
advantages and disadvantages to using unix shell scripts as a 
macro language.  The advantages are you have easy access to the
whole  power of the unix environment eg awk, sed, grep etc. plus
anything else that might be on your system eg xv, xgobi, gnuplot
etc. plus any program you may have written yourself inside and
outside of grass, plus grass programs of course esp' r.mapcalc

The disadvantages are that to do anything sophisticated you have 
to be reasonably familiar with unix and scripting.  It is not 
graphical in the way I believe ERmapper and Small World allow 
complex operations to be built up by linking together symbols.

cheers  Tom

Tom Charnock                       O--O
Dept Civil Engineering            (~~~~)
Aston University                 (  __  )
Birmingham B4 7ET UK             /|\  /|\
charnotw at sun.aston.ac.uk





More information about the grass-dev mailing list