Browse Source

vlib: minor update of doxygen strings in write_ogr.c

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52359 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 years ago
parent
commit
302e932add
1 changed files with 22 additions and 13 deletions
  1. 22 13
      lib/vector/Vlib/write_ogr.c

+ 22 - 13
lib/vector/Vlib/write_ogr.c

@@ -5,8 +5,10 @@
 
 
    Higher level functions for reading/writing/manipulating vectors.
    Higher level functions for reading/writing/manipulating vectors.
 
 
-   Inspired by v.out.ogr's code.
+   Partly inspired by v.out.ogr's code.
 
 
+   \todo How to deal with OGRNullFID
+   
    (C) 2009-2011, 2012 by Martin Landa, and the GRASS Development Team
    (C) 2009-2011, 2012 by Martin Landa, and the GRASS Development Team
 
 
    This program is free software under the GNU General Public License
    This program is free software under the GNU General Public License
@@ -32,18 +34,23 @@ static int write_attributes(dbDriver *, int, const struct field_info *,
 
 
   Note:
   Note:
    - centroids are not supported in OGR, pseudotopo holds virtual
    - centroids are not supported in OGR, pseudotopo holds virtual
-     centroids
-   - boundaries are not supported in OGR, pseudotopo treats polygons
-     as boundaries
+     centroids (it's coordinates determined from spatial index)
+   - unclosed boundaries are not supported in OGR, pseudotopo treats
+     polygons as boundaries
      
      
-  \todo How to deal with OGRNullFID ?
-  
+  Supported feature types:
+   - GV_POINT (written as wkbPoint)
+   - GV_LINE (wkbLineString)
+   - GV_BOUNDARY (wkbPolygon)
+   - GV_FACE (wkbPolygon25D)
+   - GV_KERNEL (wkbPoint25D)
+
   \param Map pointer to Map_info structure
   \param Map pointer to Map_info structure
-  \param type feature type (GV_POINT, GV_LINE, ...)
+  \param type feature type
   \param points pointer to line_pnts structure (feature geometry) 
   \param points pointer to line_pnts structure (feature geometry) 
   \param cats pointer to line_cats structure (feature categories)
   \param cats pointer to line_cats structure (feature categories)
   
   
-  \return feature offset into file
+  \return feature index in offset array (related to pseudo-topology)
   \return -1 on error
   \return -1 on error
 */
 */
 off_t V1_write_line_ogr(struct Map_info *Map, int type,
 off_t V1_write_line_ogr(struct Map_info *Map, int type,
@@ -206,11 +213,13 @@ off_t V1_write_line_ogr(struct Map_info *Map, int type,
 }
 }
 
 
 /*!
 /*!
-  \brief Rewrites feature at the given offset (level 1) (OGR interface)
+  \brief Rewrites feature at the given offset on level 1 (OGR interface)
+  
+  This function simply calls V1_delete_line_ogr() and V1_write_line_ogr().
   
   
   \param Map pointer to Map_info structure
   \param Map pointer to Map_info structure
   \param offset feature offset
   \param offset feature offset
-  \param type feature type (GV_POINT, GV_LINE, ...)
+  \param type feature type (see V1_write_line_ogr() for supported types)
   \param points feature geometry
   \param points feature geometry
   \param cats feature categories
   \param cats feature categories
   
   
@@ -221,7 +230,7 @@ off_t V1_rewrite_line_ogr(struct Map_info *Map,
 			  int line, int type, off_t offset,
 			  int line, int type, off_t offset,
 			  const struct line_pnts *points, const struct line_cats *cats)
 			  const struct line_pnts *points, const struct line_cats *cats)
 {
 {
-    G_debug(3, "V1_rewrite_line_ogr(): line=%d type=%d offset=%llu",
+    G_debug(3, "V1_rewrite_line_ogr(): line=%d type=%d offset=%lu",
 	    line, type, offset);
 	    line, type, offset);
 #ifdef HAVE_OGR
 #ifdef HAVE_OGR
     if (type != V1_read_line_ogr(Map, NULL, NULL, offset)) {
     if (type != V1_read_line_ogr(Map, NULL, NULL, offset)) {
@@ -240,10 +249,10 @@ off_t V1_rewrite_line_ogr(struct Map_info *Map,
 }
 }
 
 
 /*!
 /*!
-  \brief Deletes feature at the given offset (level 1)
+  \brief Deletes feature at the given offset on level 1 (OGR interface)
   
   
   \param Map pointer Map_info structure
   \param Map pointer Map_info structure
-  \param offset feature offset
+  \param offset offset of feature to be deleted
   
   
   \return  0 on success
   \return  0 on success
   \return -1 on error
   \return -1 on error