fillGrid: Fill a LatticeMap's grid starting from one or more points

View source: R/prepareVGA.R

fillGridR Documentation

Fill a LatticeMap's grid starting from one or more points

Description

Fill a LatticeMap's grid starting from one or more points

Usage

fillGrid(latticeMap, fillX, fillY, copyMap = TRUE, verbose = FALSE)

Arguments

latticeMap

The input LatticeMap

fillX

X coordinate of the fill points

fillY

Y coordinate of the fill points

copyMap

Optional. Copy the internal sala map

verbose

Optional. Show more information of the process.

Value

A new LatticeMap with filled points

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)
latticeMap <- createGrid(
  minX = mapRegion[["xmin"]],
  minY = mapRegion[["ymin"]],
  maxX = mapRegion[["xmax"]],
  maxY = mapRegion[["ymax"]],
  gridSize = 0.04
)
latticeMap <- blockLines(
  latticeMap = latticeMap,
  lineStringMap = lineStringMap[vector()]
)
fillGrid(
  latticeMap = latticeMap,
  fillX = 3.01,
  fillY = 6.7
)

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