Learn R Programming

alcyon (version 0.7.0)

linkCoords,PointMap-method: Link two PointMap Cells (coordinates)

Description

Link two cells on a PointMap using the point coordinates

Usage

# S4 method for PointMap
linkCoords(map, fromX, fromY, toX, toY, copyMap = TRUE)

Value

A new PointMap with linked points

Arguments

map

A PointMap

fromX

X coordinate of the first link point

fromY

Y coordinate of the first link point

toX

X coordinate of the second link point

toY

Y coordinate of the second link point

copyMap

Optional. Copy the internal sala map

Examples

Run this code
mifFile <- system.file(
    "extdata", "testdata", "gallery",
    "gallery_lines.mif",
    package = "alcyon"
  )
  sfMap <- st_read(mifFile,
    geometry_column = 1L, quiet = TRUE
  )
  pointMap <- makeVGAPointMap(
    sfMap,
    gridSize = 0.04,
    fillX = 3.01,
    fillY = 6.7,
    maxVisibility = NA,
    boundaryGraph = FALSE,
    verbose = FALSE
  )
linkCoords(pointMap, 1.74, 6.7, 5.05, 5.24)

Run the code above in your browser using DataLab