[GRASS-user] polygons and centroids

Dave Roberts dvrbts at ecology.msu.montana.edu
Fri Jun 11 10:04:42 EDT 2010


Friends,

    If I understand correctly (based on experience with my own data), 
when GRASS calculates the topology for vector area data it doesn't 
actually ensure that the centroid lies within the area it represents. 
If the area is a torus, or at least hollow in a general way, then the 
centroid might actually lie in the void in the center of the polygon 
rather than within the interior of the polygon itself.  It seems like
it would be preferable to run a point-in-polygon check on the calculated 
centroid and move it of necessary to achieve correct point-in-polygon 
correspondence.

    This seems like it may also influence the results of v.what and 
d.what.vect as well, and not always identify the correct polygon if 
another centroid is nearer.  I assume this is a well-known situation, 
and that perhaps the solution for complex (sometimes hollow) polygons 
(following advice from Achim Kesseler)is to do a v.to.rast and sample 
the raster.   Is that considered best practice for complex area data, or 
are there better approaches?  Is v.what reliable in these situations, 
including in point-in-polygon mode?

Thanks, Dave
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts                                     office 406-994-4548
Department of Ecology                         email droberts at montana.edu
Montana State University
Bozeman, MT 59717-3460


More information about the grass-user mailing list