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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 27 14:30:21 PST 2015


Author: mmetz
Date: 2015-01-27 14:30:21 -0800 (Tue, 27 Jan 2015)
New Revision: 64342

Modified:
   grass/trunk/lib/vector/Vlib/line.c
Log:
Vlib: fix Vect_line_geodesic_distance() documentation

Modified: grass/trunk/lib/vector/Vlib/line.c
===================================================================
--- grass/trunk/lib/vector/Vlib/line.c	2015-01-27 22:24:24 UTC (rev 64341)
+++ grass/trunk/lib/vector/Vlib/line.c	2015-01-27 22:30:21 UTC (rev 64342)
@@ -636,15 +636,15 @@
    - px, py - point on line,
    - dist   - distance to line,
    - spdist - distance to point on line from segment beginning,
-   - sldist - distance to point on line form line beginning along line
+   - lpdist - distance to point on line from line beginning along line
 
   \param points pointer to line_pnts structure
   \param ux,uy,uz point coordinates
   \param with_z flag if to use z coordinate (3D calculation)
   \param[out] px,py,pz point on line
-  \param[out] dist distance to line,
-  \param[out] spdist distance of point from segment beginning
-  \param[out] lpdist distance of point from line
+  \param[out] dist distance to line
+  \param[out] spdist distance to point on line from segment beginning
+  \param[out] lpdist distance to point on line from line beginning along line
 
   \return nearest segment (first is 1)
  */
@@ -757,15 +757,15 @@
    - px, py - point on line,
    - dist   - distance to line,
    - spdist - distance to point on line from segment beginning,
-   - sldist - distance to point on line form line beginning along line
+   - lpdist - distance to point on line from line beginning along line
 
   \param points pointer to line_pnts structure
   \param ux,uy,uz point coordinates
   \param with_z flag if to use z coordinate (3D calculation)
   \param[out] px,py,pz point on line
-  \param[out] dist distance to line,
-  \param[out] spdist distance of point from segment beginning
-  \param[out] lpdist distance of point from line
+  \param[out] dist distance to line
+  \param[out] spdist distance to point on line from segment beginning
+  \param[out] lpdist distance to point on line from line beginning along line
 
   \return nearest segment (first is 1)
  */
@@ -801,10 +801,8 @@
 	tspdist = 0;
 	tlpdist = 0;
 	segment = 0;
-
     }
     else {
-
 	distance =
 	    dig_distance2_point_to_line(ux, uy, uz, points->x[0],
 					points->y[0], points->z[0],
@@ -828,6 +826,7 @@
 						   points->z[i + 1], with_z,
 						   &ttpx, &ttpy, &ttpz,
 						   NULL, NULL);
+
 	    new_dist = G_distance(ux, uy, ttpx, ttpy);
 	    if (with_z)
 		new_dist = hypot(new_dist, uz - ttpz);



More information about the grass-commit mailing list