Top Level Functions#

Opening Rasters#

Raster(raster[, _fast_path])

Abstraction of georeferenced raster data with lazy function evaluation.

open_dataset(path[, crs, ...])

Open a netCDF or GRIB dataset.

Combining Rasters#

band_concat(rasters)

Join a sequence of rasters along the band dimension.

mosaic(rasters[, mosaic_method, dst_crs, ...])

Mosaic multiple rasters into a new, single raster.

split_bands(raster)

Split a multi-band raster into a list of single-band rasters.

stack_bands(rasters[, dst_crs, dst_grid, ...])

Stack input rasters into a multi-band raster.

Creating Rasters from a Template#

constant_raster([template, value, bands, ...])

Create a Raster filled with a constant value like a template.

empty_like([template, bands, dtype, ...])

Create a Raster filled with uninitialized data like a template.

full_like([template, value, bands, dtype, ...])

Create a Raster filled with a constant value like a template.

ones_like([template, bands, dtype, ...])

Create a Raster filled with ones like a template.

random_raster([template, distribution, ...])

Creates a Raster of random values based on the desired distribution.

zeros_like([template, bands, dtype, ...])

Create a Raster filled with zeros like a template.

Constructing Rasters from Data#

data_to_raster(data[, mask, x, y, affine, ...])

Create a Raster from a data array.

data_to_raster_like(data, like[, mask, nv, ...])

Create a Raster, based on a template Raster, from a data array.

data_to_xr_raster(data[, x, y, affine, crs, nv])

Create a standard raster DataArray from a data array.

data_to_xr_raster_ds(data[, mask, x, y, ...])

Create a standard raster Dataset from a data array.

data_to_xr_raster_ds_like(data, xlike[, ...])

Create a standard raster Dataset using a template raster DataArray.

data_to_xr_raster_like(data, xlike[, nv, ...])

Create a standard raster DataArray based on a template DataArray.

dataarray_to_raster(xdata[, xmask, crs])

Create a Raster from a DataArray object.

dataarray_to_xr_raster(xdata)

Transform a DataArray object into standard raster DataArray.

dataarray_to_xr_raster_ds(xdata[, xmask, crs])

Create a raster Dataset object from a DataArray object.

get_raster(src[, strict, null_to_nan])

Coerce the input to a Raster.

Remapping Rasters#

reclassify(raster, remapping[, unmapped_to_null])

Reclassify the input raster values based on a mapping.

remap_range(raster, mapping[, inclusivity])

Remaps values based on a mapping or list of mappings.

Mapping Functions Over Blocks#

geo_map_blocks(func, *rasters[, dtype, ...])

Apply func block-wise across one or more aligned rasters, handing it georeferenced xarray.DataArray blocks.

geo_map_overlap(func, *rasters, depth[, ...])

Apply func block-wise with overlap, handing it georeferenced xarray.DataArray blocks.

map_blocks(func, *rasters[, dtype, ...])

Apply func block-wise across one or more aligned rasters.

map_overlap(func, *rasters, depth[, ...])

Apply func block-wise with overlap across one or more rasters.

Padding Rasters#

pad(raster, target, *[, fill_values])

Pad a raster's grid out to cover the given extent.

Vectors#

Vector(geo[, size])

A class representing vector data.

count_layer_features(path, layer)

Count the number of features in a layer of a vector source file.

list_layers(path)

List the layers in a vector source file.

open_vectors(path[, layers])

Open a vector source.