sp_line: create an spatiallineobject from 2 points

View source: R/karim.R

sp_lineR Documentation

create an spatiallineobject from 2 points

Description

create an spatiallineobject from 2 points, optional export as shapefile

Usage

sp_line(
  Y_coords,
  X_coords,
  ID = "ID",
  proj4 = "+proj=longlat +datum=WGS84 +no_defs",
  export = FALSE,
  runDir
)

Arguments

Y_coords

Y/lat coordinates

X_coords

X/lon coordinates

ID

id of line

proj4

projection

export

write shafefile default = F

runDir

character runtime folder

Examples

## Not run: 
## creating sp spatial point object
line <- sp_line(c(8.770367,8.771161,8.771536),
                c(50.815172,50.814743,50.814875),
                runDir=tempdir())

## plot it
raster::plot(line)

## End(Not run)

uavRmp documentation built on Feb. 16, 2023, 7:03 p.m.