xrspatial.zonal.apply(zones, values, func[, ...])

Apply a function to the values agg within zones in zones agg.


xrspatial.zonal.crop(zones, values, zones_ids)

Crop scans from edges and eliminates rows / cols until one of the input values is found.


xrspatial.zonal.regions(raster[, ...])

Create unique regions of raster based on pixel value connectivity.


xrspatial.zonal.trim(raster[, values, name])

Trim scans from the edges and eliminates rows / cols which only contain the values supplied.

Zonal Statistics#


Returns the full extent of a map projection, available projections are 'Mercator' and 'Geographic'.

xrspatial.zonal.stats(zones, values[, ...])

Calculate summary statistics for each zone defined by a zones dataset, based on values aggregate.

xrspatial.zonal.suggest_zonal_canvas(...[, ...])

Given a coordinate reference system (crs), a set of polygons with corresponding x range and y range, calculate the height and width of canvas so that the smallest polygon (polygon with smallest area) is rasterized with at least min pixels.

Zonal Cross Tabulate#

xrspatial.zonal.crosstab(zones, values[, ...])

Calculate cross-tabulated (categorical stats) areas between two datasets: a zone dataset zones, a value dataset values (a value raster).