I have problems to use the function v.what.vect
and I'm not sure what is the issue. I have a simple forest polygon and try to determine if a point is in the forest or not.
# check the output of the feature nature
v.db.select nature col=landuse where="cat<5"
# function returns
landuse
forest
forest
forest
forest
# add column to points
v.db.addcolumn map=points col="landuse varchar(50)"
# use function v.what.vect
v.what.vect map=points column=landuse query_map=nature query_column=landuse
# function returns
Finding nearest features ...
100%
100%
Update vector attribute...
100%
2696 categories - no nearest feature found
v.distance complete. 2696 records updated.
For me its looks like everything worked fine, just the that the result 0 is wired. Any idea what went wrong or how to check it?
EDIT
I checked again the notes of the grass
manual:
In case of a multipoint input map map, with several points having the same category number, it can happen, that the query result is NULL, if the same category number falls into different query_map polygons.
But that is also given:
v.db.select points col=cat where="cat<5"
# function output:
cat
1
2
3
4
5