blockLines {alcyon}R Documentation

Block lines on a PointMap

Description

Takes a PointMap and a ShapeMap with lines and blocks the cells on the PointMap where the lines pass.

Usage

blockLines(pointMap, lineStringMap, copyMap = TRUE, verbose = FALSE)

Arguments

pointMap

The input PointMap

lineStringMap

Map of lines, either a ShapeMap, or an sf lineString map

copyMap

Optional. Copy the internal sala map

verbose

Optional. Show more information of the process.

Value

A new PointMap with points as they have been blocked by the lines

Examples

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")
lineStringMap <- as(sfMap, "sf")
mapRegion <- sf::st_bbox(lineStringMap)
pointMap <- createGrid(
  minX = mapRegion[["xmin"]],
  minY = mapRegion[["ymin"]],
  maxX = mapRegion[["xmax"]],
  maxY = mapRegion[["ymax"]],
  gridSize = 0.04
)
blockLines(
  pointMap = pointMap,
  lineStringMap = lineStringMap[vector()]
)

[Package alcyon version 0.4.0 Index]