ExtractByLine: Add a Line shapefile and raster image.

View source: R/code3.R

ExtractByLineR Documentation

Add a Line shapefile and raster image.

Description

Add a Line shapefile and raster image.

Usage

ExtractByLine(img, line.shp, In.colName, Out.colName)

Arguments

img

Raster image

line.shp

Line shapefile with class info

In.colName

Name of the column contain line id's

Out.colName

Name of the output column contain line id's

Author(s)

Subhadip Datta

Examples

library(raster)
library(ExtractTrainData)
img<-brick(system.file("extdata","ras.tif",package = "ExtractTrainData"))
line.shp<-shapefile(system.file("extdata","lines.shp",package = "ExtractTrainData"))
Out.colName<-In.colName<-"Id"
ExtractByLine(img,line.shp,In.colName,Out.colName)

ExtractTrainData documentation built on May 31, 2023, 7:56 p.m.