makeVGALatticeMap: Create a LatticeMap grid, fill it and make the graph

View source: R/prepareVGA.R

makeVGALatticeMapR Documentation

Create a LatticeMap grid, fill it and make the graph

Description

This is intended to be a single command to get from the lines to a LatticeMap ready for analysis

Usage

makeVGALatticeMap(
  lineStringMap,
  gridSize,
  fillX,
  fillY,
  maxVisibility = NA,
  boundaryGraph = FALSE,
  verbose = FALSE
)

Arguments

lineStringMap

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

gridSize

Size of the cells

fillX

X coordinate of the fill points

fillY

Y coordinate of the fill points

maxVisibility

Limit how far two cells can be to be connected

boundaryGraph

Only create a graph on the boundary cells

verbose

Optional. Show more information of the process.

Value

A new LatticeMap

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")
makeVGALatticeMap(
  sfMap,
  gridSize = 0.5,
  fillX = 3.01,
  fillY = 6.7,
  maxVisibility = NA,
  boundaryGraph = FALSE,
  verbose = FALSE
)

alcyon documentation built on Aug. 30, 2026, 1:07 a.m.