Closed sckott closed 3 years ago
library(sf)
outer = matrix(c(0,0,10,0,10,10,0,10,0,0),ncol=2, byrow=TRUE)
hole1 = matrix(c(1,1,1,2,2,2,2,1,1,1),ncol=2, byrow=TRUE)
hole2 = matrix(c(5,5,5,6,6,6,6,5,5,5),ncol=2, byrow=TRUE)
pts = list(outer, hole1, hole2)
(pl1 = st_polygon(pts))
st_as_text(pl1)
# gives WKT needed, but this requires sf
# and internally st_as_text requires lwgeom, which will still require sf and the hard to install stack
not sure this is possible without requiring sf
only if we can do without depending on sf, even in suggests, - as we avoid sp by using wicket