# NOT RUN {
## SpatialPolygonsDataFrame, one polygon example ## -----
# load necessary data ----
data("city_boundary_spdf")
# obtain boundaries for the City of Chicago ----
boundaries <-
GetPolygonBoundaries(my.polygon = city_boundary_spdf)
## SpatialPolygonsDataFrame, multipolygon polygon example ## -----
# load necessary data ----
data("community_areas_spdf")
# obtain boundaries for each of the 77 Chicago community areas ----
boundaries <-
GetPolygonBoundaries(my.polygon = community_areas_spdf
, labels = community_areas_spdf$community)
# }
# NOT RUN {
## sf, one polygon example ## -----
# load necessary package ----
library(sf)
# load necessary data ----
data("city_boundary_sf")
# obtain boundaries for the City of Chicago ----
boundaries <- GetPolygonBoundaries(my.polygon = city_boundary_sf)
# }
# NOT RUN {
# }
# NOT RUN {
## sf, multipolygon example ## -----
# load necessary package ----
library(sf)
# load necessary data ----
data("community_areas_sf")
# obtain boundaries for each of the 77 Chicago community areas ----
boundaries <-
GetPolygonBoundaries(my.polygon = community_areas_sf
, labels = community_areas_sf$community)
# }
Run the code above in your browser using DataLab