Learn R Programming

alcyon (version 0.7.0)

linkCoords,AxialShapeGraph-method: Link two Axial Lines (coordinates)

Description

Link two locations on an Axial ShapeGraph using the point coordinates

Usage

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

Value

A new Axial ShapeGraph with linked lines

Arguments

map

An Axial ShapeGraph

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", "barnsbury",
    "barnsbury_small_axial_original.mif",
    package = "alcyon"
  )
  sfMap <- st_read(mifFile,
    geometry_column = 1L, quiet = TRUE
  )
  shapeGraph <- as(sfMap, "AxialShapeGraph")
linkCoords(shapeGraph, 982.8, -1620.3, 1217.1, -1977.3)

Run the code above in your browser using DataLab