View source: R/gdal_raster_functions.R
gdalClipWithShape | R Documentation |
Clip raster with a shape file
gdalClipWithShape( inrast, inshp, outrast = NULL, field = NULL, cropToShape = FALSE, return.raster = TRUE )
inrast |
file path or raster object |
inshp |
file path or shape object |
outrast |
NULL or file path. Default NULL and produces a tmp raster file. |
field |
name of specific field in shapefile to clip raster with. Default is NULL |
cropToShape |
logical Should the raster be cropped to the extent of the shapefile. Default is FALSE |
return.raster |
logical Should the raster be returned to R environment? Default is TRUE |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.