[GRASS-SVN] r49223 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 14 03:09:09 EST 2011


Author: martinl
Date: 2011-11-14 00:09:09 -0800 (Mon, 14 Nov 2011)
New Revision: 49223

Modified:
   grass/trunk/lib/vector/Vlib/read.c
Log:
vlib: introduce Vect_get_next_line_id()


Modified: grass/trunk/lib/vector/Vlib/read.c
===================================================================
--- grass/trunk/lib/vector/Vlib/read.c	2011-11-14 08:06:05 UTC (rev 49222)
+++ grass/trunk/lib/vector/Vlib/read.c	2011-11-14 08:09:09 UTC (rev 49223)
@@ -58,7 +58,28 @@
 #endif
 };
 
+
 /*!
+  \brief Get line id for sequential reading.
+
+  This function returns id of feature which has been read by calling
+  Vect_read_next_line().
+
+  \param Map pointer to Map_info struct
+
+  \return feature id
+*/
+int Vect_get_next_line_id(const struct Map_info *Map)
+{
+    G_debug(3, "Vect_get_next_line()");
+
+    if (!VECT_OPEN(Map))
+	return -1;
+    
+    return Map->next_line - 1;
+}
+
+/*!
    \brief Read next vector feature (level 1 and 2)
 
    This function implements sequential access.



More information about the grass-commit mailing list