Raster normalization
- remote_sensing_processor.replace_nodata(input_file, output_file, new, old=None)[source]
Replaces a nodata value in a raster.
- Parameters:
input_file (string) – Path to input file.
output_file (string) – Path to output file.
new (int or float) – A new nodata value to insert.
old (int or float (optional)) – An old nodata value to replace. If not stated then is read from input file.
Examples
>>> rsp.replace_nodata( ... '/home/rsp_test/mosaics/landcover/landcover.tif', ... '/home/rsp_test/mosaics/landcover/landcover_new.tif', ... 0, ... )
- remote_sensing_processor.replace_value(input_file, output_file, old, new)[source]
Replaces a specific value in a raster.
- Parameters:
input_file (string) – Path to input file.
output_file (string) – Path to output file.
old (int or float) – An old value to replace.
new (int or float) – A new value to insert.
Examples
>>> rsp.replace_value( ... '/home/rsp_test/mosaics/sentinel/B1.tif', ... '/home/rsp_test/mosaics/sentinel/B1_new.tif', ... 0, ... -9999, ... )