The museotoolbox.processing module gathers raster and vector tools.


convert_dt(dt[, to_otb_dt])

Return the datatype from gdal to numpy or from numpy to gdal.

extract_ROI(in_image, in_vector, *fields, …)

Extract raster values from Regions Of Interest in a vector file.

get_distance_matrix(in_image, in_vector[, …])

Return for each pixel, the distance one-to-one to the other pixels listed in the vector.

get_gdt_from_minmax_values(max_value[, …])

Return the Gdal DataType according the minimum or the maximum value.


Return driver name used in OGR accoriding to the extension of the vector.

image_mask_from_vector(in_vector, in_image, …)

Create a image mask where polygons/points are the pixels to keep.

rasterize(in_image, in_vector[, in_field, …])

Rasterize vector to the size of data (raster)

read_vector_values(vector, *args, **kwargs)

Read values from vector.

sample_extraction(in_image, in_vector, …)

Extract centroid from shapefile according to the raster, and extract band value if band_prefix is given.


RasterMath(in_image[, in_image_mask, …])

Read one or multiple rasters per block, and perform one or many functions to one or many geotiff raster outputs.