R/extract.spat.poly.coords.R

Defines functions extract.spat.poly.coords

extract.spat.poly.coords <- function(spatial.polygon){
  # Extracts the coordinated from a spatial polygon object and returns as a list of data.frames.
  polygon.list <- list()
  polygons <- spatial.polygon@polygons[[1]]@Polygons
  for(i in seq(along = polygons)){
    polygon.list[[i]] <-polygons[[i]]@coords
  }
  return(polygon.list)
}

Try the DSsim package in your browser

Any scripts or data that you put into this service are public.

DSsim documentation built on March 26, 2020, 7:39 p.m.