瀏覽代碼

Vlib: fix Vect_line_geodesic_distance() documentation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64342 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 10 年之前
父節點
當前提交
7579915d5d
共有 1 個文件被更改,包括 9 次插入10 次删除
  1. 9 10
      lib/vector/Vlib/line.c

+ 9 - 10
lib/vector/Vlib/line.c

@@ -636,15 +636,15 @@ double Vect_line_geodesic_length(const struct line_pnts *Points)
    - 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 @@ int Vect_line_distance(const struct line_pnts *points,
    - 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 @@ int Vect_line_geodesic_distance(const struct line_pnts *points,
 	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 @@ int Vect_line_geodesic_distance(const struct line_pnts *points,
 						   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);