[GRASS-user] Checking if a point (X, Y) is inside the, polygons of a shape file using command line. Solution using R

Hamish hamish_b at yahoo.com
Mon Mar 3 19:38:26 EST 2008


Rick Reeves wrote:
> This is a good task for the R programming environment, which has
> strong geospatial tools and integrates with GRASS:

FYI, in GRASS's vector library (available outside of C with e.g.
SWIG-Python) there a number of x-in-polygon functions found in
lib/vector/Vlib/poly.c. v.buffer uses such a test to check that its
centroid is inside the new area, you could trace that back if you
wanted to see the method in use.

from GRASS modules there is v.select and 'v.distance dmax=0' (?) and
probably other ways too.


many roads,
Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-user mailing list