Crop (mask) TimeSpatData
new TimeSpatData
.
Every time can only one Polygon as the mask_Area
.
for
TimeVectData
the polygons, lines oder points will mitmask_Area
first intersect terra::intersect then only the polygons, lines oder points which in themask_Area
will be exported.for
TimeRastData
orTimeRastLayerData
the spatial dimension will first crop terra::crop than terra::mask the raster-cells will be in NA setted, when they are not in themask_Area
.
Crop (mask) TimeSpatData
to create a new TimeSpatData
.
Every time the function is used, only one polygon can be used as the mask_Area.
For
TimeVectData
, the polygons, lines, or points will be intersected with the mask_Area using terra::intersect, and only the polygons, lines, or points within themask_Area
will be exported.For
TimeRastData
, the spatial dimension will be cropped using terra::crop and then masked using terra::mask. Raster cells that are not within themask_Area
will be set to NA.
Usage
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeVectVariable
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeVectArray
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeVectLayerVariable
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeVectLayerArray
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeRastVariable
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeRastArray
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeRastLayerVariable
crop_tsd(tsd_Data, mask_Area)
# S3 method for TimeRastLayerArray
crop_tsd(tsd_Data, mask_Area)
Arguments
- tsd_Data
TimeSpatData
dataTimeVectVariable
TimeVectArray
TimeRastVariable
TimeRastArray
TimeRastLayerVariable
TimeRastLayerArray
- mask_Area
(SpatVector) one Polygon, from
terra::vect()