API reference#

Core#

This is what it’s all about:

stack

Create an xarray.DataArray of all the STAC items, reprojected to the same grid and stacked by time.

Visualization#

Easily render your data on an ipyleaflet map. Requires installing 'stackstac[viz]', and running with a dask distributed cluster.

As you pan around the map, the part of the array that’s in view is computed on the fly by dask.

Warning: zooming in and out will not load underlying data at different resolutions. Assets will be loaded at whatever resolution you initially got from stack. If your array is large and high-resolution, zooming out could trigger very slow (and expensive) computations.

show

Quickly create an ipyleaflet.Map displaying a DataArray.

add_to_map

Add the DataArray to an ipyleaflet.Map as a new layer or replacing an existing one.

Operations#

Utilities to work with geospatial DataArrays produced by stackstac.

Warning: these functions may be reorganized in the near future.

mosaic

Flatten a dimension of a DataArray by picking the first valid pixel.

reproject_array

Reproject and clip a DataArray to a new RasterSpec (CRS, resolution, bounds).

xyztile_of_array

Slice an XYZ tile out of a DataArray.

array_bounds

Get the bounds of a DataArray.

array_epsg

Get the coordinate reference system of a DataArray as an EPSG code.