R/polygon.to.point.R

Defines functions polygon.to.point

Documented in polygon.to.point

polygon.to.point <-
function(osm_data){
  centroids <- centroid(osm_data$osm_polygons)
  osm_data_new <- SpatialPointsDataFrame(coords = centroids, 
                                           data = osm_data$osm_polygons@data)
  return(osm_data_new)
}
MagicBusApp/magicwrap documentation built on March 21, 2020, 12:15 a.m.