SCM

[#6166] Improved centroid function for SpatialPolygons

Date:
2015-07-29 16:26
Priority:
3
State:
Open
Submitted by:
Joan Maspons (jmaspons)
Assigned to:
Nobody (None)
Component:
None
Version:
None
Resolution:
None
Summary:
Improved centroid function for SpatialPolygons

Detailed description
Hello,

I have a patch to improve centroid() for SaptialPolygons objects. Instead of returning the centroid of the larger polygon, it calculates the centroids for each polygon and then it calculated the mean weigthed by the area of each polygon.

Would you like to add this to the package?

If you want to keep the current option I can add a parameter to select one of the two methods.

Comments:

Message  ↓
Date: 2015-08-24 11:59
Sender: Joan Maspons

You can find the patch at
https://github.com/rforge/geosphere/pull/1

Attached Files:

Attachments:
Size Name Date By Download
3 KiBcentroid.R2015-07-29 16:26jmasponscentroid.R

Changes

Field Old Value Date By
File Added4793: centroid.R2015-07-29 16:26jmaspons
Thanks to:
Vienna University of Economics and Business Powered By FusionForge