GRASS GIS APIs
Introduction to this document
GRASS GIS is in continues development and this development is what keeps GRASS GIS alive and at the forefront of GIS evolution. From users stringing together a series of modules to build a novel processing chain to developers implementing new cutting-edge algorithms in the core of the GRASS GIS C source code there are many different ways to develop with and for GRASS GIS. This document aims at clarifying the role of the different application programming interfaces (APIs) available. For each of the different APIs, it presents typical use cases and introduces the basic logic of the API. For more detailed information, please look at more detailed introduction on GRASS GIS and Development and GRASS GIS and Python as well as the programming manuals for the C and Python APIs.
GRASS GIS Modules as "functions"
- GRASS GIS has modular structure: each module is a separate program
- Easy to integrate into any language that allows system calls
The Python scripting library
- Some specific python functions to facilitate calling grass modules and capturing their output
Easy GUI creation in scripts
- Automatic GUI creation based on basic configuration of options
The PyGRASS API using ctypes
- Direct access to low-level C-functions (via ctypes).
- Direct access to data
- Allows writing of more complex Python programs than the scripting library
- Core library is being developed for more than 30 years
- Different additional libraries added through time