[GRASS-SVN] r43615 -
grass/branches/releasebranch_6_4/vector/v.distance
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 22 09:58:23 EDT 2010
Author: neteler
Date: 2010-09-22 13:58:23 +0000 (Wed, 22 Sep 2010)
New Revision: 43615
Modified:
grass/branches/releasebranch_6_4/vector/v.distance/description.html
grass/branches/releasebranch_6_4/vector/v.distance/main.c
Log:
backport: added missing test for min distance; docs cosmetics
Modified: grass/branches/releasebranch_6_4/vector/v.distance/description.html
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.distance/description.html 2010-09-22 13:56:24 UTC (rev 43614)
+++ grass/branches/releasebranch_6_4/vector/v.distance/description.html 2010-09-22 13:58:23 UTC (rev 43615)
@@ -36,7 +36,7 @@
<H3>Find nearest area</H3>
-For each point from vector map <B>pnt</B>, find <EM>nearest area</EM>
+For each point from vector map <B>pnt</B>, find the <EM>nearest area</EM>
from map <B>ar</B> within the given threshold and write the related
area categories to column <B>areacat</B> in an attribute table attached
to vector map <B>pnt</B> (in the case that a point falls into a polygon area,
@@ -78,8 +78,12 @@
<H3>Point-in-polygon</H3>
-Find <EM>area</EM> from vector map <B>ar</B> for each point from
-vector map <B>pnt</B> in which the individual point falls, and
+The option <em>dmax=0</em> is here important because otherwise for
+points not falling into any area, the category of the nearest area is
+recorded.
+<br>
+For each point from vector map <B>pnt</B>, find the <EM>area</EM> from
+vector map <B>ar</B> in which the individual point falls, and
write the related area categories to column <B>areacat</B> into
the attribute table attached to vector map <B>pnt</B>:
Modified: grass/branches/releasebranch_6_4/vector/v.distance/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.distance/main.c 2010-09-22 13:56:24 UTC (rev 43614)
+++ grass/branches/releasebranch_6_4/vector/v.distance/main.c 2010-09-22 13:58:23 UTC (rev 43615)
@@ -703,7 +703,7 @@
&tmp_ty, NULL, &tmp_dist, NULL, NULL);
}
- if (tmp_dist > max)
+ if (tmp_dist > max || tmp_dist < min)
continue; /* not in threshold */
Vect_get_area_cats(&To, area, TCats);
tmp_tcat = -1;
More information about the grass-commit
mailing list