Learn R Programming

uavRmp (version 0.5)

sp_line: 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, proj4 = "+proj=longlat +datum=WGS84 +no_defs",
  export = FALSE)

Arguments

Y_coords

Y/lat coordinates

X_coords

X/lon coordinates

ID

id of line

proj4

projection

export

write shafefile default = F

Examples

Run this code
# NOT RUN {
## creating sp spatial point object
line <- sp_line(c(8.770367,8.771161,8.771536),c(50.815172,50.814743,50.814875),ID="go for it")

## plot it
raster::plot(line)

# }

Run the code above in your browser using DataLab