[GRASS-SVN] r52466 - in grass/trunk: include lib/gis lib/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 27 13:06:50 PDT 2012


Author: martinl
Date: 2012-07-27 13:06:49 -0700 (Fri, 27 Jul 2012)
New Revision: 52466

Modified:
   grass/trunk/include/gis.h
   grass/trunk/lib/gis/gislib.dox
   grass/trunk/lib/raster/rasterlib.dox
Log:
better doxygen documentation of Cell_head structure


Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h	2012-07-27 20:05:47 UTC (rev 52465)
+++ grass/trunk/include/gis.h	2012-07-27 20:06:49 UTC (rev 52466)
@@ -82,10 +82,15 @@
 #define U_MINUTES       DATETIME_MINUTE 
 #define U_SECONDS       DATETIME_SECOND 
 
+/*! \brief Projection code - XY coordinate system */
 #define PROJECTION_XY  0
+/*! \brief Projection code - UTM */
 #define PROJECTION_UTM 1
+/*! \brief Projection code - plane */
 #define PROJECTION_SP  2
+/*! \brief Projection code - LatLong */
 #define PROJECTION_LL  3
+/*! \brief Projection code - other coordinate system (other then noted above) */
 #define PROJECTION_OTHER  99
 
 #define PROJECTION_FILE "PROJ_INFO"
@@ -311,27 +316,62 @@
 
 /*=========================== Typedefs/Structures ==========================*/
 
+/*!
+  \brief 2D/3D raster map header (used also for region)
+*/
 struct Cell_head
 {
-    int format;			/* max number of bytes per cell minus 1         */
-    int compressed;		/* 0 = uncompressed, 1 = compressed, -1 pre 3.0 */
-    int rows;			/* number of rows in the data 2D                */
-    int rows3;			/* number of rows in the data 3D                */
-    int cols;			/* number of columns in the data 2D             */
-    int cols3;			/* number of columns in the data 3D             */
-    int depths;			/* number of depths in data                     */
-    int proj;			/* projection (see #defines above)              */
-    int zone;			/* projection zone                              */
-    double ew_res;		/* east to west cell size 2D                    */
-    double ew_res3;		/* east to west cell size 3D                    */
-    double ns_res;		/* north to south cell size 2D                  */
-    double ns_res3;		/* north to south cell size 3D                  */
-    double tb_res;		/* top to bottom cell size                      */
-    double north;		/* coordinates of map layer                     */
+    /*! \brief Max number of bytes per raster data value minus 1 (raster header only) */
+    int format;
+    /*! \brief Compression mode (raster header only)
+
+      - 0: uncompressed
+      - 1: compressed
+      - -1: pre GRASS 3.0
+    */
+    int compressed;
+    /*! \brief Number of rows for 2D data */
+    int rows;
+    /*! \brief Number of rows for 3D data */
+    int rows3;
+    /*! \brief Number of columns for 2D data */
+    int cols;
+    /*! \brief Number of columns for 3D data */
+    int cols3;
+    /*! \brief number of depths for 3D data */
+    int depths;
+    /*! \brief Projection code
+
+      - PROJECTION_XY
+      - PROJECTION_UTM
+      - PROJECTION_SP
+      - PROJECTION_LL
+      - PROJECTION_OTHER
+     */
+    int proj;
+    /*! \brief Projection zone (UTM) */
+    int zone;
+    /*! \brief Resolution - east to west cell size for 2D data */
+    double ew_res;
+    /*! \brief Resolution - east to west cell size for 3D data */
+    double ew_res3;   
+    /*! \brief Resolution - north to south cell size for 2D data */
+    double ns_res;     
+    /*! \brief Resolution - north to south cell size for 3D data */
+    double ns_res3;   
+    /*! \brief Resolution - top to bottom cell size for 3D data */
+    double tb_res;    
+    /*! \brief Extent coordinates (north) */
+    double north;     
+    /*! \brief Extent coordinates (south) */
     double south;
+    /*! \brief Extent coordinates (east) */
     double east;
+    /*! \brief Extent coordinates (west) */
     double west;
+    /*! \brief Extent coordinates (top) - 3D data*/
     double top;
+    /*! \brief Extent coordinates (bottom) - 3D data */
     double bottom;
 };
 

Modified: grass/trunk/lib/gis/gislib.dox
===================================================================
--- grass/trunk/lib/gis/gislib.dox	2012-07-27 20:05:47 UTC (rev 52465)
+++ grass/trunk/lib/gis/gislib.dox	2012-07-27 20:06:49 UTC (rev 52466)
@@ -2117,49 +2117,25 @@
 
 
 The raster header data structure is used for two purposes. It is used
-for raster header information for map layers. It also used to hold
-region values. The structure is:
+for raster header information for raster map. It also used to hold
+region values.
 
-\code
-struct Cell_head
-{
-    int format;			/* max number of bytes per cell minus 1         */
-    int compressed;		/* 0 = uncompressed, 1 = compressed, -1 pre 3.0 */
-    int rows;			/* number of rows in the data 2D                */
-    int rows3;			/* number of rows in the data 3D                */
-    int cols;			/* number of columns in the data 2D             */
-    int cols3;			/* number of columns in the data 3D             */
-    int depths;			/* number of depths in data                     */
-    int proj;			/* projection (see #defines above)              */
-    int zone;			/* projection zone                              */
-    double ew_res;		/* east to west cell size 2D                    */
-    double ew_res3;		/* east to west cell size 3D                    */
-    double ns_res;		/* north to south cell size 2D                  */
-    double ns_res3;		/* north to south cell size 3D                  */
-    double tb_res;		/* top to bottom cell size                      */
-    double north;		/* coordinates of map layer                     */
-    double south;
-    double east;
-    double west;
-    double top;
-    double bottom;
-};
-\endcode
+See documentation of Cell_head structure for details.
 
+The <tt>format</tt> and <tt>compressed</tt> fields apply only to
+raster headers. The <tt>format</tt> field describes the number of
+bytes per raster data value and the <tt>compressed</tt> field
+indicates if the raster file is compressed or not. The other fields
+apply both to raster headers and regions. The geographic boundaries
+are described by <tt>north, south, east</tt> and <tt>west</tt>. The
+grid resolution is described by <tt>ew_res</tt> and
+<tt>ns_res</tt>. The cartographic projection is described by
+<tt>proj</tt> and the related zone for the projection by
+<tt>zone</tt>. The <tt>rows</tt> and <tt>cols</tt> indicate the number
+of rows and columns in the raster map, or in the region. See \ref
+Raster_Header_File for more information about raster headers, and \ref
+Region for more information about regions.
 
-The <i>format</i> and <i>compressed</i> fields apply only to raster
-headers. The <i>format</i> field describes the number of bytes per
-raster data value and the <i>compressed</i> field indicates if the
-raster file is compressed or not. The other fields apply both to
-raster headers and regions. The geographic boundaries are described by
-<i>north, south, east</i> and <i>west</i>. The grid resolution is
-described by <i>ew_res</i> and <i>ns_res</i>. The cartographic
-projection is described by <i>proj</i> and the related zone for the
-projection by <i>zone</i>. The <i>rows</i> and <i>cols</i> indicate
-the number of rows and columns in the raster file, or in the
-region. See \ref Raster_Header_File for more information about
-raster headers, and \ref Region for more information about regions.
-
 The routines described in \ref Raster_Header_File use this structure.
 
 \subsection struct_Categories struct Categories

Modified: grass/trunk/lib/raster/rasterlib.dox
===================================================================
--- grass/trunk/lib/raster/rasterlib.dox	2012-07-27 20:05:47 UTC (rev 52465)
+++ grass/trunk/lib/raster/rasterlib.dox	2012-07-27 20:06:49 UTC (rev 52466)
@@ -284,11 +284,11 @@
 
 \section Raster_Header_File Raster Header File
 
-The raster header file contains information describing the geographic
-extent of the map layer, the grid cell resolution, and the format used
-to store the data in the raster file. The format of this file is
-described in \ref Raster_Header_Format. The routines described below
-use the <i>Cell_head</i> structure which is shown in detail in \ref
+The raster header file (<tt>cellhd</tt>) contains information
+describing the geographic extent of the raster map, the grid cell
+resolution, the format used to store the data in the raster file, see
+Cell_head structure for details. The routines described below use the
+Cell_head structure which is shown in detail in \ref
 GIS_Library_Data_Structures.
 
  - Rast_get_cellhd()



More information about the grass-commit mailing list