Raster normalization
- remote_sensing_processor.rasterize(vector, reference_raster, value, output_file, nodata=0)[source]
Rasterizes a vector file.
- Parameters:
vector (string) – Path to vector file that needs to be rasterized.
reference_raster (path to reference raster as a string) – Path to a raster file to get shape, resolution and projection from.
value (string) – A field to use for a burn-in value. Field should be numeric.
output_file (string) – Path to output file.
nodata (int or float (default = 0)) – A value that will be used as nodata.
Examples
>>> rsp.rasterize( ... '/home/rsp_test/mosaics/treecover/treecover.shp', ... '/home/rsp_test/mosaics/sentinel/B1.tif', ... 'tree_species', ... '/home/rsp_test/mosaics/treecover/treecover.tif', ... nodata=0, ... )