General Purpose Operations#

The general module contains general purpose functions for manipulating rasters.

Operations#

ModelPredictAdaptor(model[, method])

An adaptor class that allows models without a predict method to be used with model_predict_raster() and model_predict_vector().

aggregate(raster, expand_cells, stype)

Creates a Raster of aggregated cell values for a new resolution.

band_concat(rasters)

Join a sequence of rasters along the band dimension.

dilate(raster, size)

Perform dilation on a raster

erode(raster, size)

Perform erosion on a raster

local_stats(raster, stype)

Creates a Raster of summarized values across bands.

model_predict_raster(raster, model[, n_outputs])

Generate a new raster using the provided model to predict new values.

model_predict_vector(features, model, fields)

Predict new columns using a model.

reclassify(raster, remapping[, unmapped_to_null])

Reclassify the input raster values based on a mapping.

regions(raster[, neighbors, unique_values])

Calculates the unique regions (patches) within a raster band.

remap_range(raster, mapping[, inclusivity])

Remaps values based on a mapping or list of mappings.

where(condition, true_rast, false_rast)

Return elements chosen from true_rast or false_rast depending on condition.