[GRASS-user] Single centroid/point for multiple polygons sharing the same category
Johannes Radinger
johannesradinger at gmail.com
Mon Jun 19 04:02:54 PDT 2017
Hi GRASS users,
I am working on a polygon map of France that shows the single areas
belonging to a specific postal code. I want to extract for each area the
centroid (using v.extract), transform it to a point map (using v.type) and
finally add the X and Y coordinates to the attribute table for each postal
code region.
However, now I have the problem that some "postal code areas" have more
than one centroid, i.e. two or more closeby but not connected polygons
belong the same postal region and share a common category and entry in the
attribute table. So for these cases I get two or more points (sharing the
same cat) and of course I cannot calculate a single XY pair for that postal
code region.
Consequently, I need to find a method to get centroids of all the areas
sharing a common cat or I need to calculate the mean position of points
afterwards (using v.centerpoint). As far as I understood v.centerpoint all
points are used to calculate a mean point but not stratified for points
sharing the same cat!? FYI: I have around 2000 postal code areas of which
200 consists of more than a single polygon.
Any suggestions?
/Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170619/60108e79/attachment.html>
More information about the grass-user
mailing list