|
@@ -8,47 +8,57 @@ some GRASS library functions directly from the PYTHON programming language.
|
|
|
<h3>Status of GRASS SWIG/PYTHON implementation</h3>
|
|
|
|
|
|
At the moment a prototype is implemented. There is a
|
|
|
-"swig" module with a series of separate sub-modules available:
|
|
|
+"grass" module with a series of separate sub-modules available.
|
|
|
+Python swig and script modules are organized as follows:
|
|
|
|
|
|
<ul>
|
|
|
-<li> arraystats.i
|
|
|
-<li> cluster.i
|
|
|
-<li> common.i
|
|
|
-<li> date.i
|
|
|
-<li> dbmi.i
|
|
|
-<li> display.i
|
|
|
-<li> g3d.i
|
|
|
-<li> grass.i
|
|
|
-<li> imagery.i
|
|
|
-<li> math.i
|
|
|
-<li> my_typemaps.i
|
|
|
-<li> proj.i
|
|
|
-<li> raster.i
|
|
|
-<li> stats.i
|
|
|
-<li> trans.i
|
|
|
-<li> utils.i
|
|
|
-<li> vector.i
|
|
|
-<li> vedit.i
|
|
|
+<li> grass
|
|
|
+<li> grass.lib
|
|
|
+<li> grass.lib.*
|
|
|
+<li> grass.script
|
|
|
+<li> grass.script.core
|
|
|
+<li> grass.script.db
|
|
|
+<li> grass.script.raster
|
|
|
+<li> grass.script.vector
|
|
|
</ul>
|
|
|
|
|
|
-<h3>Usage</h3>
|
|
|
+In detail:
|
|
|
+<ul>
|
|
|
+<li> arraystats.py
|
|
|
+<li> cluster.py
|
|
|
+<li> date.py
|
|
|
+<li> dbmi.py
|
|
|
+<li> display.py
|
|
|
+<li> g3d.py
|
|
|
+<li> grass.py
|
|
|
+<li> imagery.py
|
|
|
+<li> __init__.py
|
|
|
+<li> math.py
|
|
|
+<li> proj.py
|
|
|
+<li> raster.py
|
|
|
+<li> stats.py
|
|
|
+<li> trans.py
|
|
|
+<li> utils.py
|
|
|
+<li> vector.py
|
|
|
+<li> vedit.py
|
|
|
+</ul>
|
|
|
|
|
|
-These can be imported individually with e.g. "import swig.grass", or the
|
|
|
-user can import all of them with "import swig" (then use e.g.
|
|
|
-swig.grass.G_gisinit etc), or it can be used e.g. "from swig.grass import *"
|
|
|
-to import all names from a module. The latter can be done for multiple
|
|
|
-modules, but currently, there's no way to import names from all sub-modules
|
|
|
-of a module with a single command.
|
|
|
+<h3>Usage</h3>
|
|
|
|
|
|
+Scripts:
|
|
|
+\code
|
|
|
+from grass.script import core[,db[,raster,[vector]]] as grass
|
|
|
+\endcode
|
|
|
|
|
|
<h3>Examples</h3>
|
|
|
|
|
|
<ul>
|
|
|
+<li> test.py
|
|
|
<li> examples/m.distance.py
|
|
|
<li> examples/rasteraccess.py
|
|
|
<li> examples/vectoraccess.py
|
|
|
-<li> test.py
|
|
|
</ul>
|
|
|
|
|
|
+<hr>
|
|
|
+<i>Last changed: $Date$</i>
|
|
|
*/
|
|
|
-
|