{"id":46516,"library":"stackstac","title":"stackstac","description":"Load SpatioTemporal Asset Catalog (STAC) items into xarray DataArrays with Dask support. Version 0.5.1. Active development; release cadence irregular.","status":"active","version":"0.5.1","language":"python","source_language":"en","source_url":"https://github.com/gjoseph92/stackstac","tags":["stac","raster","xarray","cloud-optimized-geotiff","satellite"],"install":[{"cmd":"pip install stackstac","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"GDAL-backed raster I/O","package":"rasterio","optional":false},{"reason":"Array data structures","package":"xarray","optional":false},{"reason":"Parallel computing","package":"dask","optional":true},{"reason":"STAC API client","package":"pystac-client","optional":true}],"imports":[{"note":"The main module is the package itself; no submodule named stackstac.","wrong":"from stackstac import stackstac","symbol":"stackstac","correct":"import stackstac"}],"quickstart":{"code":"import stackstac\nimport pystac_client\nimport planetary_computer as pc\n\ncatalog = pystac_client.Client.open(\n    \"https://planetarycomputer.microsoft.com/api/stac/v1\",\n    modifier=pc.sign_inplace\n)\nsearch = catalog.search(collections=[\"landsat-c2-l2\"], bbox=[-72, 42, -70, 44])\nitems = [item for item in search.items()]\nds = stackstac.stack(items, resolution=30, epsg=3857)\nda = ds[\"red\"]\nprint(da)","lang":"python","description":"Stack Landsat items from Planetary Computer into an xarray DataArray with 30m resolution in Web Mercator."},"warnings":[{"fix":"Explicitly set gdal_env=False in stackstac.stack() to restore old behavior.","message":"In version 0.5.0, the default for `gdal_env` changed from False to True. This may break workflows relying on no GDAL environment configuration.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Always specify the target resolution with the `resolution` parameter to avoid surprises.","message":"Stacked DataArrays have dimensions (time, y, x). If items have different resolutions, the coarsest resolution is used unless `resolution` is explicitly set.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `resolution=<desired_meters>` to control output pixel size.","message":"By default, `stackstac.stack()` references the raster asset's full-resolution image without downsampling; if you need lower spatial resolution set the `resolution` parameter explicitly.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `epsg=4326` with `crs=4326`.","message":"The `epsg` parameter was deprecated in 0.5.0 in favor of `crs`. Provide `crs` as an EPSG code or CRS object.","severity":"deprecated","affected_versions":">=0.5.0"}],"env_vars":null,"search_vec":"'0.5.1':15 'activ':16 'asset':4 'cadenc':19 'catalog':5 'cloud':25 'cloud-optimized-geotiff':24 'dask':12 'dataarray':10 'develop':17 'geotiff':27 'irregular':20 'item':7 'load':2 'optim':26 'raster':22 'releas':18 'satellit':28 'spatiotempor':3 'stac':6,21 'stackstac':1 'support':13 'version':14 'xarray':9,23","created_at":"2026-06-07T13:00:18.078372+00:00","updated_at":"2026-06-07T13:00:18.078372+00:00","problems":[{"fix":"Manually provide an EPSG code using the `crs` parameter: `ds = stackstac.stack(items, crs=4326)`","cause":"One or more items are missing the `proj:epsg` property in their STAC metadata.","error":"KeyError: 'proj:epsg'"},{"fix":"Ensure specified assets are COGs; use `assets=['B04', 'B03', 'B02']` correctly spelled and available in the item.","cause":"The asset's href is not a Cloud Optimized GeoTIFF (COG) and the `assets` parameter is misconfigured.","error":"UnboundLocalError: local variable 'cog' referenced before assignment"},{"fix":"Check the search query; verify the collection has the assets (e.g., 'red' not 'B04').","cause":"The STAC search returned no items or none of the items have the required asset bands.","error":"ValueError: No valid items found."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["analytics","maps"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}