iota2.common.raster_utils

Functions

CreateBandMathApplication(OtbParameters)

IN: parameter consistency are not tested here (done in otb's applications) every value could be string

CreateBandMathXApplication(OtbParameters)

IN: parameter consistency are not tested here (done in otb's applications) every value could be string

compress_raster(raster_in, raster_out[, ...])

compress a raster thanks to gdal_translate

extract_raster_bands(in_raster, out_raster, ...)

use gdal_translate to extract bands of interest, band's index start at 1.

get_boundary_with_padding(boundary, padding)

get_chunks_boundaries(shape, chunk_config)

get_padding(chunk_config, boundary, size_x, ...)

get_raster_n_bands(raster)

usage get raster's number of bands

get_rasterio_datasets(array_proj[, ...])

transform numpy arrays (containing projection data) to rasterio datasets it works only with 3D arrays

insert_external_function_to_pipeline(...[, ...])

Apply a python function to an otb pipeline

memory_usage_psutil([unit])

Return the memory usage :param unit: the expect unit for return ram (MB or GB)

merge_rasters(rasters, output_path, epsg_code)

merge geo-referenced rasters thanks to rasterio.merge

process_function(function, padding[, ...])

apply python function to the output of an otbApplication

raster_to_array(InRaster)

convert a raster to an array

re_encode_raster(in_raster, out_raster, ...)

according to a conversion table, re_encode the monoband raster values

reorder_proba_map(proba_map_path_in, ...[, ...])

reorder the probability map

roi_raster(in_raster, out_raster, roi_coord)

use rasterio to extract raster region of interest

run(cmd[, desc, env, logger])

Launch a system command and raise an execption if fail

split_raster(otb_pipelines, chunk_config, ...)

extract regions of interest over the otbApplication

Classes

ChunkConfig(chunk_size_mode, ...[, ...])

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.