Version 7 (modified by 14 years ago) ( diff ) | ,
---|
How-To Code Your Own GRASS extension
Want to write your own GRASS code? Read on!
Code examples
For a beginner, the usual approach is to find a similar module and use that as a template.
- Template for raster module: source:grass/trunk/doc/raster/r.example/
- example for pixel oriented raster module: source:grass/trunk/raster/r.patch
- example for pixel oriented time series raster module with segmentation: source:grass/trunk/raster/r.series
- example for full map oriented raster module with segmentation: source:grass/trunk/raster/r.cost
- example for statistics oriented raster module: source:grass/trunk/raster/r.resamp.stats
- Template for vector module: source:grass/trunk/doc/vector/v.example/
- example for vector module with database support: source:grass/trunk/vector/v.extract/
- example for topology oriented vector module: source:grass/trunk/vector/v.edit/
- Shell script templates: please take a look at existing scripts at source:grass/branches/develbranch_6/scripts/
- Python script templates: please take a look at existing scripts at source:grass/trunk/scripts/
Of course all existing modules and libraries are examples to look at.
GRASS Programmer's Manual
Further notes
See http://grass.osgeo.org/wiki/Development (should be moved here)
Good programmer? Yes!
If so (or willing to become a good programmer), please check HowToContribute.
Note:
See TracWiki
for help on using the wiki.