浏览代码

better doxygen documentation of Cell_head structure

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52466 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
0c65c548af
共有 3 个文件被更改,包括 78 次插入62 次删除
  1. 55 15
      include/gis.h
  2. 18 42
      lib/gis/gislib.dox
  3. 5 5
      lib/raster/rasterlib.dox

+ 55 - 15
include/gis.h

@@ -82,10 +82,15 @@ static const char *GRASS_copyright __attribute__ ((unused))
 #define U_MINUTES       DATETIME_MINUTE 
 #define U_MINUTES       DATETIME_MINUTE 
 #define U_SECONDS       DATETIME_SECOND 
 #define U_SECONDS       DATETIME_SECOND 
 
 
+/*! \brief Projection code - XY coordinate system */
 #define PROJECTION_XY  0
 #define PROJECTION_XY  0
+/*! \brief Projection code - UTM */
 #define PROJECTION_UTM 1
 #define PROJECTION_UTM 1
+/*! \brief Projection code - plane */
 #define PROJECTION_SP  2
 #define PROJECTION_SP  2
+/*! \brief Projection code - LatLong */
 #define PROJECTION_LL  3
 #define PROJECTION_LL  3
+/*! \brief Projection code - other coordinate system (other then noted above) */
 #define PROJECTION_OTHER  99
 #define PROJECTION_OTHER  99
 
 
 #define PROJECTION_FILE "PROJ_INFO"
 #define PROJECTION_FILE "PROJ_INFO"
@@ -311,27 +316,62 @@ enum
 
 
 /*=========================== Typedefs/Structures ==========================*/
 /*=========================== Typedefs/Structures ==========================*/
 
 
+/*!
+  \brief 2D/3D raster map header (used also for region)
+*/
 struct Cell_head
 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;
     double south;
+    /*! \brief Extent coordinates (east) */
     double east;
     double east;
+    /*! \brief Extent coordinates (west) */
     double west;
     double west;
+    /*! \brief Extent coordinates (top) - 3D data*/
     double top;
     double top;
+    /*! \brief Extent coordinates (bottom) - 3D data */
     double bottom;
     double bottom;
 };
 };
 
 

+ 18 - 42
lib/gis/gislib.dox

@@ -2117,48 +2117,24 @@ by routines in this library, are described in the sections below.
 
 
 
 
 The raster header data structure is used for two purposes. It is used
 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:
-
-\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
-
-
-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.
+for raster header information for raster map. It also used to hold
+region values.
+
+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 routines described in \ref Raster_Header_File use this structure.
 The routines described in \ref Raster_Header_File use this structure.
 
 

+ 5 - 5
lib/raster/rasterlib.dox

@@ -284,11 +284,11 @@ associated routines.
 
 
 \section Raster_Header_File Raster Header File
 \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.
 GIS_Library_Data_Structures.
 
 
  - Rast_get_cellhd()
  - Rast_get_cellhd()