[GRASS-SVN] r37695 - grass/branches/releasebranch_6_4/swig/python/examples

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 1 05:55:11 EDT 2009


Author: neteler
Date: 2009-06-01 05:55:11 -0400 (Mon, 01 Jun 2009)
New Revision: 37695

Modified:
   grass/branches/releasebranch_6_4/swig/python/examples/vectoraccess.py
Log:
vector box fun added

Modified: grass/branches/releasebranch_6_4/swig/python/examples/vectoraccess.py
===================================================================
--- grass/branches/releasebranch_6_4/swig/python/examples/vectoraccess.py	2009-06-01 09:54:53 UTC (rev 37694)
+++ grass/branches/releasebranch_6_4/swig/python/examples/vectoraccess.py	2009-06-01 09:55:11 UTC (rev 37695)
@@ -41,6 +41,17 @@
 print 'Vect is 3D: ', grassvect.Vect_is_3d (map)
 print 'Vect DB links: ', grassvect.Vect_get_num_dblinks(map)
 print 'Map Scale:  1:', grassvect.Vect_get_scale(map)
+
+# vector box tests
+box = grassvect.bound_box()
+c_easting1  =  599505.0
+c_northing = 4921010.0
+c_easting2  =  4599505.0
+
+grassvect.Vect_get_map_box(map, box)
+print 'Position 1 in box? ', grassvect.Vect_point_in_box(c_easting1, c_northing, 0, box)
+print 'Position 2 in box? ', grassvect.Vect_point_in_box(c_easting2, c_northing, 0, box)
+print 'Vector line 2 in box? ', grassvect.Vect_get_line_box(map, 2, box)
 # misleading:
 # print 'Number of lines:', grassvect.Vect_get_num_lines(map)
 # how to access GV_POINT?



More information about the grass-commit mailing list