[GRASS-SVN] r59950 - in grass/branches/releasebranch_7_0/lib/python: . pygrass script

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 27 02:10:33 PDT 2014


Author: martinl
Date: 2014-04-27 02:10:33 -0700 (Sun, 27 Apr 2014)
New Revision: 59950

Added:
   grass/branches/releasebranch_7_0/lib/python/pygrass/pygrasslib.dox
   grass/branches/releasebranch_7_0/lib/python/script/pythonlib.dox
Removed:
   grass/branches/releasebranch_7_0/lib/python/pythonlib.dox
Modified:
   grass/branches/releasebranch_7_0/lib/python/Makefile
   grass/branches/releasebranch_7_0/lib/python/pygrass/Makefile
   grass/branches/releasebranch_7_0/lib/python/script/Makefile
Log:
pygrass dox file added
python dox file updated
       (merge r59949 from trunk)


Modified: grass/branches/releasebranch_7_0/lib/python/Makefile
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/Makefile	2014-04-27 09:02:26 UTC (rev 59949)
+++ grass/branches/releasebranch_7_0/lib/python/Makefile	2014-04-27 09:10:33 UTC (rev 59950)
@@ -3,7 +3,6 @@
 #include $(MODULE_TOPDIR)/include/Make/Other.make
 include $(MODULE_TOPDIR)/include/Make/Dir.make
 include $(MODULE_TOPDIR)/include/Make/Python.make
-include $(MODULE_TOPDIR)/include/Make/Doxygen.make
 
 PYDIR = $(ETC)/python/grass
 
@@ -21,6 +20,3 @@
 
 $(PYDIR)/__init__.py: __init__.py | $(PYDIR)
 	$(INSTALL_DATA) $< $@
-
-# doxygen
-DOXNAME = python

Modified: grass/branches/releasebranch_7_0/lib/python/pygrass/Makefile
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pygrass/Makefile	2014-04-27 09:02:26 UTC (rev 59949)
+++ grass/branches/releasebranch_7_0/lib/python/pygrass/Makefile	2014-04-27 09:10:33 UTC (rev 59950)
@@ -37,4 +37,4 @@
 	$(INSTALL_DATA) $< $@
 
 #doxygen:
-DOXNAME = pythonpygrass
+DOXNAME = pygrass

Copied: grass/branches/releasebranch_7_0/lib/python/pygrass/pygrasslib.dox (from rev 59949, grass/trunk/lib/python/pygrass/pygrasslib.dox)
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pygrass/pygrasslib.dox	                        (rev 0)
+++ grass/branches/releasebranch_7_0/lib/python/pygrass/pygrasslib.dox	2014-04-27 09:10:33 UTC (rev 59950)
@@ -0,0 +1,146 @@
+/*! \page pygrasslib PyGRASS Library
+
+by GRASS Development Team (http://grass.osgeo.org)
+
+\section pygrassIntro Introduction
+
+PyGRASS improves integration between GRASS and Python (see also \ref
+pythonlib), make the use of Python under GRASS more consistent with
+the language itself and make the GRASS scripting and programming
+activity easier and more natural to the final users.
+
+\section pygrassPackages PyGRASS packages 
+
+ - \subpage pygrassGis
+ - \subpage pygrassRaster
+ - \subpage pygrassVector
+ - \subpage pygrassModule
+ - \subpage pygrassFunctions
+ - \subpage pygrassMessages
+ - \subpage pygrassErrors
+
+\subsection pygrassGis GIS Package
+
+ - python::pygrass::gis
+
+Basic elements of GRASS data-base:
+
+  - python::pygrass::gis::Gisdbase
+  - python::pygrass::gis::Location
+  - python::pygrass::gis::Mapset
+  - python::pygrass::gis::VisibleMapset
+
+Computation region:
+
+  - python::pygrass::gis::region::Region
+
+Mapset handling:
+     
+  - python::pygrass::gis::set_current_mapset
+  - python::pygrass::gis::make_mapset
+
+\subsection pygrassRaster Raster Package
+
+ - python::pygrass::raster
+
+Reading/writing raster maps:
+
+  - python::pygrass::raster::RasterRow
+  - python::pygrass::raster::RasterRowIO
+  - python::pygrass::raster::RasterSegment
+  - python::pygrass::raster::RasterNumpy
+
+Random raster data:
+     
+  - python::pygrass::raster::random_map_only_columns
+  - python::pygrass::raster::random_map
+
+Raster categories:
+
+  - python::pygrass::raster::category::Category
+
+Raster metadata:
+
+  - python::pygrass::raster::history::History
+
+\subsection pygrassVector Vector Package
+
+ - python::pygrass::vector
+
+List of high-level classes:
+
+  - python::pygrass::vector::Vector
+  - python::pygrass::vector::VectorTopo
+
+Basic data structures and functions:
+
+ - python::pygrass::vector::basic
+  - python::pygrass::vector::basic::Bbox
+  - python::pygrass::vector::basic::BoxList
+  - python::pygrass::vector::basic::Cats
+  - python::pygrass::vector::basic::CatsList
+
+Search for features:
+
+ - python::pygrass::vector::find
+  - python::pygrass::vector::find::PointFinder
+  - python::pygrass::vector::find::BboxFinder
+  - python::pygrass::vector::find::PolygonFinder
+
+Geometry and topology elements handling:
+
+ - python::pygrass::vector::geometry
+  - python::pygrass::vector::geometry::Attrs
+  - python::pygrass::vector::geometry::Geo
+  - python::pygrass::vector::geometry::Point
+  - python::pygrass::vector::geometry::Line
+  - python::pygrass::vector::geometry::Node
+  - python::pygrass::vector::geometry::Boundary
+  - python::pygrass::vector::geometry::Centroid
+  - python::pygrass::vector::geometry::Isle
+  - python::pygrass::vector::geometry::Isles
+  - python::pygrass::vector::geometry::Area
+
+\subsection pygrassModule Interface to GRASS modules
+
+ - python::pygrass::modules
+
+List of high-level classes:
+
+ - python::pygrass::modules::interface::module::Module
+ - python::pygrass::modules::interface::module::ParallelModuleQueue 
+
+List of namespaces:
+
+ - python::pygrass::modules::grid
+ - python::pygrass::modules::interface
+ - python::pygrass::modules::shortcuts
+
+\subsection pygrassFunctions Functions Package
+
+List of pyGRASS functions:
+
+ - python::pygrass::functions
+
+\subsection pygrassMessages Messages Package
+
+Messages handling in PyGRASS:
+
+ - python::pygrass::messages::FatalError
+ - python::pygrass::messages::Messenger
+
+\subsection pygrassErrors Errors Package
+
+Defined errors classes:
+
+ - python::pygrass::errors::ParameterError
+ - python::pygrass::errors::FlagError
+ - python::pygrass::errors::DBError
+ - python::pygrass::errors::GrassError
+ - python::pygrass::errors::OpenError
+
+\section pygrassAuthors Authors
+
+Pietro Zambelli (Google Summer of Code 2012)
+
+*/

Deleted: grass/branches/releasebranch_7_0/lib/python/pythonlib.dox
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pythonlib.dox	2014-04-27 09:02:26 UTC (rev 59949)
+++ grass/branches/releasebranch_7_0/lib/python/pythonlib.dox	2014-04-27 09:10:33 UTC (rev 59950)
@@ -1,272 +0,0 @@
-/*! \page pythonlib GRASS Python Scripting Library
-
-by GRASS Development Team (http://grass.osgeo.org)
-
-\section pythonIntro Introduction
-
-The code in <a
-href="http://svn.osgeo.org/grass/grass/trunk/lib/python/">lib/python/</a>
-provides <b>grass.script</b> in order to support GRASS scripts written
-in Python. The <a
-href="http://svn.osgeo.org/grass/grass/trunk/scripts">scripts/</a>
-directory of GRASS contains a series of examples actually provided to
-the end users.
-
-See code in:
-
-- python::core
-- python::db
-- python::raster
-- python::vector
-- python::setup
-- python::array
-
-<b>Table of content</b>
-
-- \subpage pythonScripting
-- \subpage pythonModules
- - \subpage pythonCore
- - \subpage pythonDb
- - \subpage pythonRaster
- - \subpage pythonVector
- - \subpage pythonSetup
- - \subpage pythonArray
-
-\section pythonScripting GRASS scripting tasks for Python provided by "grass.script"
-
-The statement
-
-\code
-import grass.script as grass
-\endcode
-
-imports core.py, db.py, raster.py and vector.py modules.
-
-To import only selected module
-
-\code
-from grass.script import core as grass
-\endcode
-
-Sample script (See the GRASS Wiki at 
-<a href="http://grass.osgeo.org/wiki/GRASS_and_Python">http://grass.osgeo.org/wiki/GRASS_and_Python</a> for more examples)
-
-\code
-#!/usr/bin/env python
-
-#%module
-#% description: Checks if vector map is 3D
-#% keywords: vector
-#%end
-#%option
-#% key: map
-#% type: string
-#% gisprompt: old,vector,vector
-#% key_desc: name
-#% description: Name of vector map 
-#% required: yes
-#%end
-
-import sys
-import grass.script as grass
-
-def main():
-    info = grass.vector_info_topo(map = options['map'])
-    if info['map3d']:
-        print 'Vector map is 3D'
-    else:
-        print 'Vector map is 2D'
-
-    return 0
-
-if __name__ == "__main__":
-    options, flags = grass.parser()
-    sys.exit(main())
-\endcode
-
-\section pythonModules List of modules
-
-\subsection pythonCore Core
-
-<b>GRASS-oriented interface to subprocess module</b>
-
- - python::core::exec_command()
-
- - python::core::feed_command()
-
- - python::core::make_command()
-
- - python::core::parse_command()
-
- - python::core::pipe_command()
-
- - python::core::read_command()
-
- - python::core::run_command()
-
- - python::core::start_command()
-
- - python::core::write_command()
-
-<b>Interface to \gmod{g.message}</b>
-
-These all run \gmod{g.message}, differing only in which flag (if any) is
-used. fatal() is error(), but also calls sys.exit(1).
-
- - python::core::debug()
-
- - python::core::error()
-
- - python::core::fatal()
-
- - python::core::info()
-
- - python::core::message()
-
- - python::core::verbose()
-
- - python::core::warning()
-
-<b>Interface to \gmod{g.parser}</b>
-
-Interface to \gmod{g.parser}, intended to be run from the top-level, e.g.
-
-\code
-	if __name__ == "__main__":
-	    options, flags = grass.parser()
-	    main()
-\endcode
-
- - python::core::parser()
-
-<b>Interface to \gmod{g.tempfile}</b>
-
-Returns the name of a temporary file, created with \gmod{g.tempfile}.
-
- - python::core::tempfile()
-
-<b>Key-value parsers</b>
-
- - python::core::parse_key_val()
-
-<b>Interface to \gmod{g.gisenv}</b>
-
- - python::core::gisenv()
-
-<b>Interface to \gmod{g.region}</b>
-
- - python::core::del_temp_region()
-
- - python::core::region()
-
- - python::core::region_env()
-
- - python::core::use_temp_region()
-
-<b>Interface to \gmod{g.findfile}</b>
-
- - python::core::find_file()
-
-<b>Interface to \gmod{g.list}</b>
-
- - python::core::list_grouped()
-
- - python::core::list_pairs()
-
- - python::core::list_strings()
-
- - python::core::mlist_grouped()
-
-<b>Interface to \gmod{g.mapsets}</b>
-
- - python::core::mapsets()
-
-<b>Interface to \gmod{g.version}</b>
-
- - python::core::version()
-
-<b>Color parsing</b>
-
- - python::core::parse_color()
-
-<b>Check GRASS environment variables</b>
-
- - python::core::overwrite()
-
- - python::core::verbosity()
-
-<b>Create new GRASS location</b>
-
- - python::core::create_location()
-
-<b>Various utilities, not specific to GRASS</b>
- 
- - python::core::basename()
-
- - python::core::find_program()
-
- - python::core::try_remove()
-
- - python::core::try_rmdir()
-
- - python::core::float_or_dms()
-
-\section pythonDb Database
-
-Interface for <tt>db.*</tt> modules.
-
- - python::db::db_connection()
-
- - python::db::db_describe()
-
- - python::db::db_select()
-
-\section pythonRaster Raster
-
-Interface for <tt>r.*</tt> modules.
-
- - python::raster::raster_history()
-
- - python::raster::raster_info()
-
- - python::raster::mapcalc()
-
-\section pythonVector Vector
-
-Interface for <tt>v.*</tt> modules.
-
- - python::vector::vector_columns()
-
- - python::vector::vector_db()
-
- - python::vector::vector_db_select()
-
- - python::vector::vector_history()
-
- - python::vector::vector_info_topo()
-
- - python::vector::vector_layer_db()
-
-\section pythonSetup Setup
-
-\code
-from grass.script import setup as gsetup
-\endcode
-
- - python::setup::init()
-
-\section pythonArray Array
-
-\code
-from grass.script import array as garray
-\endcode
-
- - python::array::array
-
-\section pythonAuthors Authors
-
- Glynn Clements
-
- Martin Landa <landa.martin gmail.com>
-
-*/

Modified: grass/branches/releasebranch_7_0/lib/python/script/Makefile
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/Makefile	2014-04-27 09:02:26 UTC (rev 59949)
+++ grass/branches/releasebranch_7_0/lib/python/script/Makefile	2014-04-27 09:10:33 UTC (rev 59950)
@@ -28,3 +28,6 @@
 	sed \
 	-e 's#@LD_LIBRARY_PATH_VAR@#$(LD_LIBRARY_PATH_VAR)#' \
 	$< > $@
+
+# doxygen
+DOXNAME = python

Copied: grass/branches/releasebranch_7_0/lib/python/script/pythonlib.dox (from rev 59949, grass/trunk/lib/python/script/pythonlib.dox)
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/pythonlib.dox	                        (rev 0)
+++ grass/branches/releasebranch_7_0/lib/python/script/pythonlib.dox	2014-04-27 09:10:33 UTC (rev 59950)
@@ -0,0 +1,253 @@
+/*! \page pythonlib GRASS Python Scripting Library
+
+by GRASS Development Team (http://grass.osgeo.org)
+
+\section pythonIntro Introduction
+
+The GRASS Python Scripting Library (<tt>grass.script</tt>) provides
+support for GRASS scripts written in Python programming language. The
+<a href="http://svn.osgeo.org/grass/grass/trunk/scripts">scripts/</a>
+directory of GRASS contains a series of examples actually provided to
+the end users.
+
+- \subpage pythonUsage
+- \subpage pythonModules
+ - \subpage pythonCore
+ - \subpage pythonDb
+ - \subpage pythonRaster
+ - \subpage pythonVector
+ - \subpage pythonSetup
+ - \subpage pythonArray
+
+\section pythonUsage Usage
+
+The statement
+
+\code
+import grass.script as grass
+\endcode
+
+imports \ref pythonCore, \ref pythonDb, \ref pythonRaster and \ref pythonVector modules.
+
+To import only selected module
+
+\code
+from grass.script import core as grass
+\endcode
+
+Sample script (see the GRASS Wiki at 
+<a href="http://grass.osgeo.org/wiki/GRASS_and_Python">http://grass.osgeo.org/wiki/GRASS_and_Python</a> for more examples)
+
+\code
+#!/usr/bin/env python
+
+#%module
+#% description: Checks if vector map is 3D
+#% keywords: vector
+#%end
+#%option G_OPT_V_MAP
+#%end
+
+import sys
+import grass.script as grass
+
+def main():
+    info = grass.vector_info_topo(map = options['map'])
+    if info['map3d']:
+        print 'Vector map is 3D'
+    else:
+        print 'Vector map is 2D'
+
+    return 0
+
+if __name__ == "__main__":
+    options, flags = grass.parser()
+    sys.exit(main())
+\endcode
+
+\section pythonModules List of functions
+
+\subsection pythonCore Core
+
+<b>GRASS-oriented interface to subprocess module</b>
+
+ - python::script::core::exec_command()
+
+ - python::script::core::feed_command()
+
+ - python::script::core::make_command()
+
+ - python::script::core::parse_command()
+
+ - python::script::core::pipe_command()
+
+ - python::script::core::read_command()
+
+ - python::script::core::run_command()
+
+ - python::script::core::start_command()
+
+ - python::script::core::write_command()
+
+<b>Interface to \gmod{g.message}</b>
+
+These all run \gmod{g.message}, differing only in which flag (if any) is
+used. fatal() is error(), but also calls sys.exit(1).
+
+ - python::script::core::debug()
+
+ - python::script::core::error()
+
+ - python::script::core::fatal()
+
+ - python::script::core::info()
+
+ - python::script::core::message()
+
+ - python::script::core::verbose()
+
+ - python::script::core::warning()
+
+<b>Interface to \gmod{g.parser}</b>
+
+Interface to \gmod{g.parser}, intended to be run from the top-level, e.g.
+
+\code
+	if __name__ == "__main__":
+	    options, flags = grass.parser()
+	    main()
+\endcode
+
+ - python::script::core::parser()
+
+<b>Interface to \gmod{g.tempfile}</b>
+
+Returns the name of a temporary file, created with \gmod{g.tempfile}.
+
+ - python::script::core::tempfile()
+
+<b>Key-value parsers</b>
+
+ - python::script::core::parse_key_val()
+
+<b>Interface to \gmod{g.gisenv}</b>
+
+ - python::script::core::gisenv()
+
+<b>Interface to \gmod{g.region}</b>
+
+ - python::script::core::del_temp_region()
+
+ - python::script::core::region()
+
+ - python::script::core::region_env()
+
+ - python::script::core::use_temp_region()
+
+<b>Interface to \gmod{g.findfile}</b>
+
+ - python::script::core::find_file()
+
+<b>Interface to \gmod{g.list}</b>
+
+ - python::script::core::list_grouped()
+
+ - python::script::core::list_pairs()
+
+ - python::script::core::list_strings()
+
+ - python::script::core::mlist_grouped()
+
+<b>Interface to \gmod{g.mapsets}</b>
+
+ - python::script::core::mapsets()
+
+<b>Interface to \gmod{g.version}</b>
+
+ - python::script::core::version()
+
+<b>Color parsing</b>
+
+ - python::script::core::parse_color()
+
+<b>Check GRASS environment variables</b>
+
+ - python::script::core::overwrite()
+
+ - python::script::core::verbosity()
+
+<b>Create new GRASS location</b>
+
+ - python::script::core::create_location()
+
+<b>Various utilities, not specific to GRASS</b>
+ 
+ - python::script::core::basename()
+
+ - python::script::core::find_program()
+
+ - python::script::core::try_remove()
+
+ - python::script::core::try_rmdir()
+
+ - python::script::core::float_or_dms()
+
+\subsection pythonDb Database
+
+Interface for <tt>db.*</tt> modules.
+
+ - python::script::db::db_connection()
+
+ - python::script::db::db_describe()
+
+ - python::script::db::db_select()
+
+\subsection pythonRaster Raster
+
+Interface for <tt>r.*</tt> modules.
+
+ - python::script::raster::raster_history()
+
+ - python::script::raster::raster_info()
+
+ - python::script::raster::mapcalc()
+
+\subsection pythonVector Vector
+
+Interface for <tt>v.*</tt> modules.
+
+ - python::script::vector::vector_columns()
+
+ - python::script::vector::vector_db()
+
+ - python::script::vector::vector_db_select()
+
+ - python::script::vector::vector_history()
+
+ - python::script::vector::vector_info_topo()
+
+ - python::script::vector::vector_layer_db()
+
+\subsection pythonSetup Setup
+
+\code
+from grass.script import setup as gsetup
+\endcode
+
+ - python::script::setup::init()
+
+\subsection pythonArray Array
+
+\code
+from grass.script import array as garray
+\endcode
+
+ - python::script::array::array
+
+\section pythonAuthors Authors
+
+ Glynn Clements
+
+ Martin Landa <landa.martin gmail.com>
+
+*/



More information about the grass-commit mailing list