centr {fastshp} | R Documentation |

`centr`

computes centroids and areas of shapes

centr(shp)

`shp` |
shapefile object as returned by |

Data frame with columns:

`cx` |
x coordinate of the centroid |

`cy` |
y coordinate of the centroid |

`area` |
area of the shape |

If a shape has more than one part, only the centroid and area of the first part is computed, subsequent parts are discarded with a warning.

[Package *fastshp* version 0.1-2 Index]