Learn R Programming

alcyon (version 0.7.0)

shapeMapToPolygonSf: ShapeMap to sf Polygon map

Description

Convert a ShapeMap to an sf Polygon map

Usage

shapeMapToPolygonSf(shapeMap)

Value

A new sf Polygon map

Arguments

shapeMap

A ShapeMap

Examples

Run this code
mifFile <- system.file(
    "extdata", "testdata", "simple",
    "simple_interior.mif",
    package = "alcyon"
  )
  sfMap <- st_read(mifFile,
    geometry_column = 1L, quiet = TRUE
  )
  shapeMap <- as(sfMap[, vector()], "ShapeMap")
isovistMap <- isovist(
  shapeMap,
  x = c(3.01, 1.3),
  y = c(6.70, 5.2),
  angle = 0.01,
  viewAngle = 3.14,
  FALSE
)
shapeMapToPolygonSf(isovistMap)

Run the code above in your browser using DataLab