[GRASS-SVN] r52384 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 16 14:05:23 PDT 2012
Author: martinl
Date: 2012-07-16 14:05:23 -0700 (Mon, 16 Jul 2012)
New Revision: 52384
Modified:
grass/trunk/lib/vector/Vlib/write.c
grass/trunk/lib/vector/Vlib/write_ogr.c
grass/trunk/lib/vector/Vlib/write_sfa.c
Log:
vlib: doxygen cosmetics
Modified: grass/trunk/lib/vector/Vlib/write.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write.c 2012-07-16 21:03:47 UTC (rev 52383)
+++ grass/trunk/lib/vector/Vlib/write.c 2012-07-16 21:05:23 UTC (rev 52384)
@@ -6,10 +6,10 @@
Higher level functions for reading/writing/manipulating vectors.
Operations:
- - Add feature
+ - Write new feature
- Rewrite feature
- Delete feature
- - Restore feature
+ - Restore deleted feature
(C) 2001-2010, 2012 by the GRASS Development Team
@@ -158,19 +158,20 @@
};
/*!
- \brief Writes new feature to the end of file
+ \brief Writes new feature
- Vector map topology is not required.
+ New feature is written to the end of file (in the case of native
+ format). Vector map topology is not required.
- The function calls G_fatal_error() on error.
-
+ Calls G_fatal_error() when vector map is not opened.
+
\param Map pointer to Map_info structure
- \param type feature type (GV_POINT, GV_LINE, ...)
- \param points feature geometry
- \param cats feature categories
+ \param type feature type (see dig_defines.h for supported types)
+ \param points ointer to line_pnts structure (feature geometry)
+ \param cats pointer to line_cats structure (feature categories)
- \return new feature id (level 2)
- \return offset into file where the feature starts (level 1)
+ \return new feature id (on level 2)
+ \return offset into file where the feature starts (on level 1)
\return -1 on error
*/
off_t Vect_write_line(struct Map_info *Map, int type,
@@ -196,7 +197,9 @@
if (offset == -1)
G_fatal_error(_("Unable to write feature (negative offset)"));
*/
- /* NOTE: returns new line id on level 2 and file offset on level 1 */
+
+ /* note: returns new feature id on level 2 and file offset on
+ level 1 */
return offset;
}
@@ -232,7 +235,7 @@
}
offset = Map->plus.Line[line]->offset;
- G_debug(3, "Vect_rewrite_line(): name = %s, line = %d offset = %llu",
+ G_debug(3, "Vect_rewrite_line(): name = %s, line = %d offset = %lu",
Map->name, line, offset);
ret = (*Vect_rewrite_line_array[Map->format][Map->level]) (Map, line, type,
offset,
Modified: grass/trunk/lib/vector/Vlib/write_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write_ogr.c 2012-07-16 21:03:47 UTC (rev 52383)
+++ grass/trunk/lib/vector/Vlib/write_ogr.c 2012-07-16 21:05:23 UTC (rev 52384)
@@ -220,8 +220,8 @@
\param Map pointer to Map_info structure
\param offset feature offset
\param type feature type (see V1_write_line_ogr() for supported types)
- \param points feature geometry
- \param cats feature categories
+ \param points pointer to line_pnts structure (feature geometry)
+ \param cats pointer to line_cats structure (feature categories)
\return feature offset (rewriten feature)
\return -1 on error
Modified: grass/trunk/lib/vector/Vlib/write_sfa.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write_sfa.c 2012-07-16 21:03:47 UTC (rev 52383)
+++ grass/trunk/lib/vector/Vlib/write_sfa.c 2012-07-16 21:05:23 UTC (rev 52384)
@@ -1,7 +1,7 @@
/*!
\file lib/vector/Vlib/write_sfa.c
- \brief Vector library - write vector feature - simple feature access
+ \brief Vector library - write vector feature - simple feature access (level 2)
Higher level functions for reading/writing/manipulating vectors.
@@ -30,14 +30,14 @@
#endif
/*!
- \brief Writes feature on level 2 (OGR/PostGIS interface)
+ \brief Writes feature on level 2 (OGR/PostGIS interface, pseudo-topological level)
\param Map pointer to Map_info structure
- \param type feature type (GV_POINT, GV_LINE, ...)
+ \param type feature type (see V1_write_line_ogr() for list of supported types)
\param points pointer to line_pnts structure (feature geometry)
\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
*/
off_t V2_write_line_sfa(struct Map_info *Map, int type,
@@ -124,14 +124,15 @@
}
/*!
- \brief Rewrites feature to 'coor' file (topology level) - internal use only
+ \brief Rewrites feature at the given offset on level 2 (OGR/PostGIS
+ interface, pseudo-topological level)
\param Map pointer to Map_info structure
- \param line feature id
- \param type feature type (GV_POINT, GV_LINE, ...)
- \param offset unused
- \param points feature geometry
- \param cats feature categories
+ \param line feature id to be rewritten
+ \param type feature type (see V1_write_line_ogr() for supported types)
+ \param offset unused (kept for consistency)
+ \param points pointer to line_pnts structure (feature geometry)
+ \param cats pointer to line_cats structure feature categories
\return offset where line was rewritten
\return -1 on error
@@ -139,7 +140,7 @@
off_t V2_rewrite_line_sfa(struct Map_info *Map, int line, int type, off_t offset,
const struct line_pnts *points, const struct line_cats *cats)
{
- G_debug(3, "V2_rewrite_line_sfa(): line=%d type=%d offset=%llu",
+ G_debug(3, "V2_rewrite_line_sfa(): line=%d type=%d offset=%lu",
line, type, offset);
#if defined HAVE_OGR || defined HAVE_POSTGRES
@@ -158,12 +159,12 @@
}
/*!
- \brief Deletes feature (topology level) -- internal use only
+ \brief Deletes feature on level 2 (OGR/PostGIS interface)
\todo Update fidx
\param pointer to Map_info structure
- \param line feature id
+ \param line feature id to be deleted
\return 0 on success
\return -1 on error
@@ -250,8 +251,8 @@
\param Map pointer to Map_info structure
\param line feature id
- \param points pointer to line_pnts structure (feature's geometry)
- \param cats pointer to line_cats structure (feature's categories)
+ \param points pointer to line_pnts structure (feature geometry)
+ \param cats pointer to line_cats structure (feature categories)
*/
void V2__add_line_to_topo_sfa(struct Map_info *Map, int line,
const struct line_pnts *points,
More information about the grass-commit
mailing list