Commit 549c2252 authored by benjaminpillot's avatar benjaminpillot
Browse files

Discriminate input and output data type in raster calculation method

parent 763b7be1
......@@ -319,7 +319,8 @@ class RasterBase:
def raster_calculation(cls, rasters, fhandle, window_size=100,
no_data=-999, nb_processes=mp.cpu_count(),
description="Calculate raster expression"):
......@@ -343,7 +344,9 @@ class RasterBase:
* tuple of 2D coordinates (width, height)
gdal_driver: osgeo.gdal.Driver
GDAL driver (output format)
data_type: int
input_type: int
GDAL data type for input raster (if multiple types, let "float32")
output_type: int
GDAL data type for output raster
no_data: int or float
no data value in resulting raster
......@@ -360,8 +363,8 @@ class RasterBase:
New temporary instance
return _raster_calculation(cls, rasters, fhandle, window_size,
gdal_driver, data_type, no_data,
nb_processes, chunksize, description)
gdal_driver, input_type, output_type,
no_data, nb_processes, chunksize, description)
def read_array(self, band=None, bounds=None):
""" Write raster to numpy array
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment