Type: | Package |
Title: | Extract Values from Raster |
Version: | 9.1.6 |
Date: | 2023-05-13 |
Author: | Suhadip Datta |
Maintainer: | Subhadip Datta <subhadipdatta007@gmail.com> |
Description: | By using a multispectral image and ESRI shapefile (Point/ Line/ Polygon), a data table will be generated for classification, regression or other processing. The data table will be contained by band wise raster values and shapefile ids (User Defined). |
License: | GPL-3 |
Repository: | CRAN |
Depends: | raster |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-05-13 13:41:40 UTC; subha |
Date/Publication: | 2023-05-13 14:02:03 UTC |
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)
Add a Point shapefile and raster image.
Description
Add a Point shapefile and raster image.
Usage
ExtractByPoint(img, point.shp, In.colName, Out.colName)
Arguments
img |
Raster image |
point.shp |
Point shapefile with class info |
In.colName |
Name of the column contain point id's |
Out.colName |
Name of the output column contain point id's |
Author(s)
Subhadip Datta
Examples
library(raster)
library(ExtractTrainData)
img<-brick(system.file("extdata","ras.tif",package = "ExtractTrainData"))
point.shp<-shapefile(system.file("extdata","poin.shp",package = "ExtractTrainData"))
Out.colName<-In.colName<-"Id"
ExtractByPoint(img,point.shp,In.colName,Out.colName)
Add a Polygon shapefile and raster image.
Description
Add a Polygon shapefile and raster image.
Usage
ExtractByPoly(img, poly.shp, In.colName, Out.colName)
Arguments
img |
Raster image |
poly.shp |
Polygon shapefile with class info |
In.colName |
Name of the column contain polygon id's |
Out.colName |
Name of the output column contain polygon id's |
Author(s)
Subhadip Datta
Examples
library(raster)
library(ExtractTrainData)
img<-brick(system.file("extdata","ras.tif",package = "ExtractTrainData"))
poly.shp<-shapefile(system.file("extdata","poly_shp.shp",package = "ExtractTrainData"))
Out.colName<-In.colName<-"Id"
ExtractByPoly(img,poly.shp,In.colName,Out.colName)