[GRASS-SVN] r45942 - in grass/branches/releasebranch_6_4: include
lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 13 09:10:38 EDT 2011
Author: martinl
Date: 2011-04-13 06:10:38 -0700 (Wed, 13 Apr 2011)
New Revision: 45942
Modified:
grass/branches/releasebranch_6_4/include/Vect.h
grass/branches/releasebranch_6_4/lib/vector/Vlib/level_two.c
Log:
vlib: backport Vect_get_num_volumes/kernels()
Modified: grass/branches/releasebranch_6_4/include/Vect.h
===================================================================
--- grass/branches/releasebranch_6_4/include/Vect.h 2011-04-13 12:54:52 UTC (rev 45941)
+++ grass/branches/releasebranch_6_4/include/Vect.h 2011-04-13 13:10:38 UTC (rev 45942)
@@ -192,7 +192,9 @@
int Vect_get_num_primitives(struct Map_info *, int);
int Vect_get_num_lines(struct Map_info *);
int Vect_get_num_areas(struct Map_info *);
+int Vect_get_num_kernels(struct Map_info *);
int Vect_get_num_faces(struct Map_info *);
+int Vect_get_num_volumes(struct Map_info *);
int Vect_get_num_islands(struct Map_info *);
int Vect_get_line_box(struct Map_info *, int, BOUND_BOX *);
int Vect_get_area_box(struct Map_info *, int, BOUND_BOX *);
Modified: grass/branches/releasebranch_6_4/lib/vector/Vlib/level_two.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/Vlib/level_two.c 2011-04-13 12:54:52 UTC (rev 45941)
+++ grass/branches/releasebranch_6_4/lib/vector/Vlib/level_two.c 2011-04-13 13:10:38 UTC (rev 45942)
@@ -84,6 +84,18 @@
}
/*!
+ \brief Fetch number of kernels in vector map
+
+ \param map vector map
+
+ \return number of kernels
+ */
+int Vect_get_num_kernels(struct Map_info *map)
+{
+ return (map->plus.n_klines);
+}
+
+/*!
\brief Get number of faces in vector map
\param map vector map
@@ -96,6 +108,18 @@
}
/*!
+ \brief Fetch number of volumes in vector map
+
+ \param map vector map
+
+ \return number of volumes
+ */
+int Vect_get_num_volumes(struct Map_info *map)
+{
+ return (map->plus.n_volumes);
+}
+
+/*!
\brief Get number of islands in vector map
\param map vector map
More information about the grass-commit
mailing list