Ver código fonte

pygrass docs: minor improvements

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60650 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 11 anos atrás
pai
commit
b403a36e63

+ 1 - 0
lib/python/pygrass/docs/index.rst

@@ -17,6 +17,7 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
+   intro
    gis
    raster
    raster_elements

+ 3 - 3
lib/python/pygrass/docs/intro.rst

@@ -4,11 +4,11 @@ Introduction
 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.

+ 3 - 3
lib/python/pygrass/docs/messages.rst

@@ -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:

+ 15 - 11
lib/python/pygrass/docs/modules.rst

@@ -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 @@ on the XML module description that is used for GUI generation already. ::
     ...                        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 @@ Create the module object input step by step and run later: ::
 
 
 
-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 @@ and get the module documentation with: ::
 
 
 
-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 @@ Or get a small documentation for each parameter with:
         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. ::
 

+ 6 - 5
lib/python/pygrass/docs/modules_grid.rst

@@ -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:

+ 4 - 2
lib/python/pygrass/docs/raster.rst

@@ -1,7 +1,9 @@
 .. _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.

+ 6 - 2
lib/python/pygrass/docs/vector.rst

@@ -1,6 +1,10 @@
+.. _vector-label:
+
+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>`_
 
-Introduction on Vector
-=========================
 
 Instantiation and basic interaction. ::
 

+ 1 - 1
lib/python/pygrass/modules/grid/grid.py

@@ -374,7 +374,7 @@ def cmd_exe(args):
 
 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