iota2.tests.unittests.tests_utils.tests_utils_rasters

This module offers some tools for writing tests

Functions

CreateConcatenateImagesApplication(OtbParameters)

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

array_to_raster(input_array, output_raster_path)

usage : from an array of a list of array, create a raster

compute_brightness_from_vector(input_vector)

compute brightness from a vector of values

ensure_dir(dirname[, raise_exe])

Ensure that a named directory exists; if it does not, attempt to create it.

fun_array(fun[, oversized])

arrays use in unit tests

generate_data_tree(directory, mtd_s2st_date)

generate a fake Sen2Cor data TODO : replace this function by downloading a Sen2Cor data from PEPS.

generate_fake_classif(output_raster[, ...])

generate a fake classification raster

generate_fake_l5_old_data(root_directory, ...)

type root_directory

str

generate_fake_l8_data(root_directory, ...[, ...])

type root_directory

str

generate_fake_l8_old_data(root_directory, ...)

type root_directory

str

generate_fake_raster(output_file[, res, ...])

generate a mono-band raster

generate_fake_s2_data(root_directory, ...[, ...])

type root_directory

str

generate_fake_s2_l3a_data(root_directory, ...)

type root_directory

str

generate_fake_s2_s2c_data(output_directory, ...)

generate fake s2_s2c data

generate_fake_user_features_data(...)

type root_directory

str

generate_range_raster(output_raster[, ...])

generate a raster with borned values

prepare_annual_features(working_directory, ...)

double all rasters's pixels rename must be a tuple

raster_to_array(InRaster)

convert a raster to an array

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

Launch a system command and raise an execption if fail

test_raster_unique_value(raster_path, value)

test if a raster contains an unique value

Classes

service_compare_image_file()

The class serviceCompareImageFile provides methods to compare two images file with gdal Code inspired from gdalCompare.py