how to assign the same centroid to polygons grouped by ID , R

المشرف العام

Administrator
طاقم الإدارة
I have a SpatialPolygonDataFrame object from a shapefile of different zip codes in New York state, many zip codes are represented by several polygons( for different reasons) so I want to assign the same centroid (the centroid of the biggets polygon) to all the polygons withing the same zip code. I used the gCentroid {rgeos} function to get the centroids of polygons and gArea {rgeos} to get the area of each polygon.



أكثر...
 
أعلى