[GRASS-SVN] r66427 - in grass/branches/releasebranch_7_0: scripts/v.what.vect vector/v.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 7 01:15:43 PDT 2015


Author: neteler
Date: 2015-10-07 01:15:43 -0700 (Wed, 07 Oct 2015)
New Revision: 66427

Modified:
   grass/branches/releasebranch_7_0/scripts/v.what.vect/v.what.vect.html
   grass/branches/releasebranch_7_0/vector/v.distance/main.c
   grass/branches/releasebranch_7_0/vector/v.distance/v.distance.html
Log:
v.distance: tell user if input is 3D (esp. relevant for v.what.vect)

Modified: grass/branches/releasebranch_7_0/scripts/v.what.vect/v.what.vect.html
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.what.vect/v.what.vect.html	2015-10-07 08:15:15 UTC (rev 66426)
+++ grass/branches/releasebranch_7_0/scripts/v.what.vect/v.what.vect.html	2015-10-07 08:15:43 UTC (rev 66427)
@@ -17,6 +17,8 @@
 <p>When transferring attributes from a point map to a polygon map, usually <b>dmax</b>
 has to be larger than zero (determined by distance between query points and
 polygon centroids).
+<p>In case that one or both input vector maps are 3D, features need to touch also
+in the 3rd dimension (z coordinate) in order to transfer attributes.
 
 <h2>EXAMPLES</h2>
 

Modified: grass/branches/releasebranch_7_0/vector/v.distance/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.distance/main.c	2015-10-07 08:15:15 UTC (rev 66426)
+++ grass/branches/releasebranch_7_0/vector/v.distance/main.c	2015-10-07 08:15:43 UTC (rev 66427)
@@ -310,6 +310,9 @@
 	G_fatal_error(_("Unable to open vector map <%s>"), opt.from->answer);
 
     from_field = Vect_get_field_number(&From, opt.from_field->answer);
+    /* in 3D features may not be found */
+    if (Vect_is_3d(&From))
+        G_warning(_("Input vector map <%s> is 3D"), opt.from->answer);
 
     nfromlines = Vect_get_num_primitives(&From, from_type);
     nfromareas = 0;
@@ -327,6 +330,9 @@
     Vect_set_open_level(2);
     if (Vect_open_old2(&To, opt.to->answer, "", opt.to_field->answer) < 0)
 	G_fatal_error(_("Unable to open vector map <%s>"), opt.to->answer);
+    /* in 3D features may not be found */
+    if (Vect_is_3d(&To))
+        G_warning(_("Input vector map <%s> is 3D"), opt.to->answer);
 
     ntolines = Vect_get_num_primitives(&To, to_type);
     ntoareas = 0;

Modified: grass/branches/releasebranch_7_0/vector/v.distance/v.distance.html
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.distance/v.distance.html	2015-10-07 08:15:15 UTC (rev 66426)
+++ grass/branches/releasebranch_7_0/vector/v.distance/v.distance.html	2015-10-07 08:15:43 UTC (rev 66427)
@@ -50,6 +50,7 @@
 
 If a nearest feature does not have a category, the attribute column is 
 updated to NULL.
+
 <p>The upload <b>column</b>(s) must already exist. Create one with 
 <em><a href="v.db.addcolumn.html">v.db.addcolumn</a></em>.
 
@@ -57,6 +58,10 @@
 (<em>dist</em>, <em>from_along</em>, and <em>to_along</em>) not in 
 degrees but in meters calculated as geodesic distances on a sphere.
 
+<p>
+If one or both of the input vector maps are 3D, the user is notified
+accordingly.
+
 <h2>EXAMPLES</h2>
 
 <h3>Find nearest lines</h3>



More information about the grass-commit mailing list