Pārlūkot izejas kodu

vlib: introduce Vect_get_next_line_id()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49223 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 gadi atpakaļ
vecāks
revīzija
f60979898c
1 mainītis faili ar 21 papildinājumiem un 0 dzēšanām
  1. 21 0
      lib/vector/Vlib/read.c

+ 21 - 0
lib/vector/Vlib/read.c

@@ -58,6 +58,27 @@ static int (*V2_read_line_array[]) () = {
 #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)