RS_Clip, which extracts a subset of an existing raster while preserving its original values, RS_AsRaster generates a new Raster where the Geometry is rasterized onto a raster grid. The function supports all geometry types.
The function doesn’t support rasters that have any one of the following properties:If a raster is provided with any one of these properties then IllegalArgumentException is thrown.
Signatures
Parameters
The geometry to be rasterized.
The reference raster to be used for overlaying the geometry on.
Defines data type of the output raster. Accepts one of:
D (double), F (float), I (integer), S (short), US (unsigned short) or B (byte).Decides the pixel selection criteria. If set to
true, the function selects all pixels touched by the geometry. If false, selects only pixels whose centroids intersect the geometry.The value to be used for assigning pixels covered by the geometry.
Used for assigning the no data value of the resultant raster.
Defines the extent of the resultant raster. When set to
true, it corresponds to the extent of geom. When set to false, it corresponds to the extent of raster.Return type
The resulting raster.

