[GRASS-SVN] r60650 - in grass/trunk/lib/python/pygrass: docs modules/grid
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 31 13:05:23 PDT 2014
Author: neteler
Date: 2014-05-31 13:05:23 -0700 (Sat, 31 May 2014)
New Revision: 60650
Modified:
grass/trunk/lib/python/pygrass/docs/index.rst
grass/trunk/lib/python/pygrass/docs/intro.rst
grass/trunk/lib/python/pygrass/docs/messages.rst
grass/trunk/lib/python/pygrass/docs/modules.rst
grass/trunk/lib/python/pygrass/docs/modules_grid.rst
grass/trunk/lib/python/pygrass/docs/raster.rst
grass/trunk/lib/python/pygrass/docs/vector.rst
grass/trunk/lib/python/pygrass/modules/grid/grid.py
Log:
pygrass docs: minor improvements
Modified: grass/trunk/lib/python/pygrass/docs/index.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/index.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/index.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -17,6 +17,7 @@
.. toctree::
:maxdepth: 2
+ intro
gis
raster
raster_elements
Modified: grass/trunk/lib/python/pygrass/docs/intro.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/intro.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/intro.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -4,11 +4,11 @@
To work with ``pygrass`` you need an up-to-date version of GRASS GIS 7.
You can obtain a recent version following the information provided on the
`main Web site <http://grass.osgeo.org/download/software/>`_
-of GRASS, and you can read more about compilation on the
+of GRASS, and you can read more about compilation in the
`GRASS GIS Wiki <http://grasswiki.osgeo.org/wiki/Compile_and_Install>`_
The only action before starting to work with ``pygrass`` is to launch
GRASS GIS 7 and from the console launch ``python`` or ``ipython``
-(the second one is the recommended way)
+(the second one is the recommended way).
-Read more about how to work with :doc:`gis`, :doc:`raster`, :doc:`vector`, :doc:`attributes`, :doc:`modules`.
+Read more about how to work with ``pygrass`` in this documentation.
Modified: grass/trunk/lib/python/pygrass/docs/messages.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/messages.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/messages.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -1,8 +1,8 @@
-Messages
-==========
+PyGRASS message interface
+=========================
The PyGRASS message interface is a fast and exit-safe
-interface to GRASS C-library message functions.
+interface to the `GRASS C-library message functions <http://grass.osgeo.org/programming7/gis_2error_8c.html>`_.
.. autoclass:: pygrass.messages.Messenger
:members:
Modified: grass/trunk/lib/python/pygrass/docs/modules.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/modules.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/modules.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -1,8 +1,9 @@
-Introduction on Modules
-=========================
+Interface to GRASS GIS modules
+==============================
-Grass modules are represented as objects. These objects are generated based
-on the XML module description that is used for GUI generation already. ::
+In "modules", GRASS GIS modules are represented as objects. These objects
+are generated based on the XML module description that is used also for
+the generation of the graphical user interface (GUI). ::
>>> from pygrass.modules import Module
>>> slope_aspect = Module("r.slope.aspect", elevation='elevation',
@@ -10,7 +11,9 @@
... format='percent', overwrite=True)
-It is possible to create a run-able module object and run later:
+It is possible to create a run-able module object and run it later (this
+is also needed for registering GRASS GIS commands with more than one dot
+in their name, e.g. r.slope.aspect):
>>> slope_aspect = Module("r.slope.aspect", elevation='elevation',
... slope='slp', aspect='asp',
@@ -61,7 +64,8 @@
-It is possible to access the module info with:
+It is possible to access the module descriptions (name, one line description,
+keywords, label) with:
>>> slope_aspect.name
'r.slope.aspect'
@@ -130,13 +134,13 @@
-For each inputs and outputs parameters it is possible to get info, to see all
-the module inputs, just type: ::
+For each input and output parameter it is possible to obtain specific
+information. To see all module inputs, just type: ::
>>> slope_aspect.inputs #doctest: +NORMALIZE_WHITESPACE
TypeDict([('elevation', Parameter <elevation> (required:yes, type:raster, multiple:no)), ('format', Parameter <format> (required:no, type:string, multiple:no)), ('prec', Parameter <prec> (required:no, type:string, multiple:no)), ('zfactor', Parameter <zfactor> (required:no, type:float, multiple:no)), ('min_slp_allowed', Parameter <min_slp_allowed> (required:no, type:float, multiple:no))])
-To get info for each parameter: ::
+To get information for each parameter: ::
>>> slope_aspect.inputs["elevation"].description
'Name of input elevation raster map'
@@ -156,13 +160,13 @@
Name of input elevation raster map
-User or developer can check which parameter are set, with: ::
+User or developer can check which parameters have been set, with: ::
if slope_aspect.outputs['aspect'].value == None:
print "Aspect is not computed"
-After we set the parameter and run the module, the execution of the module
+After we set the parameters and run the module, the execution of the module
instantiate a popen attribute to the class. The `Popen`_ class allow user
to kill/wait/ the process. ::
Modified: grass/trunk/lib/python/pygrass/docs/modules_grid.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/modules_grid.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/modules_grid.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -1,9 +1,10 @@
-GridModule
-============
+GridModule for raster multiprocessing
+=====================================
-GridModule class permit to work with raster data and all the processors
-of your computer. It divides the input data into the number of choosen rows and
-columns and after it patches the results together to obtain only one output map.
+The GridModule class permits to work with raster data and all the
+processor cores of your computer. It divides the input data into the
+number of choosen rows and columns and after it patches the results
+together to obtain only one output map.
.. automodule:: pygrass.modules.grid.grid
:members:
Modified: grass/trunk/lib/python/pygrass/docs/raster.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/raster.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/raster.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -1,8 +1,10 @@
.. _raster-label:
-Introduction on Raster
-===========================
+Introduction to Raster classes
+==============================
+Details about the architecture can be found in the `GRASS GIS 7 Programmer's Manual: GRASS Raster Library <http://grass.osgeo.org/programming7/rasterlib.html>`_
+
PyGRASS uses 4 different Raster classes, that respect the 4 different approaches
of GRASS-C API.
The read access is row wise for :ref:`RasterRow-label` and
Modified: grass/trunk/lib/python/pygrass/docs/vector.rst
===================================================================
--- grass/trunk/lib/python/pygrass/docs/vector.rst 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/docs/vector.rst 2014-05-31 20:05:23 UTC (rev 60650)
@@ -1,7 +1,11 @@
+.. _vector-label:
-Introduction on Vector
-=========================
+Introduction to Vector classes
+==============================
+Details about the architecture can be found in the `GRASS GIS 7 Programmer's Manual: GRASS Vector Library <http://grass.osgeo.org/programming7/vectorlib.html>`_
+
+
Instantiation and basic interaction. ::
>>> from pygrass.vector import VectTopo
Modified: grass/trunk/lib/python/pygrass/modules/grid/grid.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/grid/grid.py 2014-05-31 17:37:38 UTC (rev 60649)
+++ grass/trunk/lib/python/pygrass/modules/grid/grid.py 2014-05-31 20:05:23 UTC (rev 60650)
@@ -374,7 +374,7 @@
class GridModule(object):
# TODO maybe also i.* could be supported easily
- """Run GRASS raster commands in a multiproccessing mode.
+ """Run GRASS raster commands in a multiprocessing mode.
:param cmd: raster GRASS command, only command staring with r.* are valid.
:type cmd: str
More information about the grass-commit
mailing list