{"id":24135,"library":"odc-stac","title":"odc-stac","description":"Tooling for converting STAC metadata to ODC (Open Data Cube) data model. Current version: 0.5.2. Release cadence: irregular, patches as needed.","status":"active","version":"0.5.2","language":"python","source_language":"en","source_url":"https://github.com/opendatacube/odc-stac","tags":["stac","open-data-cube","geospatial","raster","satellite-imagery"],"install":[{"cmd":"pip install odc-stac","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core geometry and CRS utilities","package":"odc-geo","optional":false},{"reason":"STAC metadata reading","package":"pystac","optional":false},{"reason":"Fetching STAC items from APIs","package":"pystac-client","optional":true},{"reason":"Data array loading","package":"xarray","optional":false},{"reason":"Raster data access","package":"rasterio","optional":false},{"reason":"Loading raster data (since 0.5.0)","package":"odc-loader","optional":false}],"imports":[{"note":"Module uses dot notation (odc.stac), not underscore.","wrong":"from odc_stac import stac_load","symbol":"stac_load","correct":"from odc.stac import stac_load"},{"note":"","wrong":"","symbol":"configure_s3_access","correct":"from odc.stac import configure_s3_access"},{"note":"load is a module, not the function directly.","wrong":"from odc.stac import load","symbol":"load","correct":"from odc.stac.load import stac_load"}],"quickstart":{"code":"import pystac_client\nimport planetary_computer\nfrom odc.stac import stac_load, configure_s3_access\n\ncatalog = pystac_client.Client.open(\n    \"https://planetarycomputer.microsoft.com/api/stac/v1\",\n    modifier=planetary_computer.sign_inplace,\n)\n\nquery = catalog.search(\n    collections=[\"sentinel-2-l2a\"],\n    bbox=[142, -37, 143, -36],\n    datetime=\"2022-01-01/2022-01-31\",\n    max_items=10,\n)\nitems = list(query.items())\n\nconfigure_s3_access(aws_unsigned=True)\n\nds = stac_load(\n    items,\n    bands=[\"red\", \"green\", \"blue\"],\n    resolution=10,\n    chunks={},\n    groupby=\"solar_day\",\n)\nprint(ds)\n","lang":"python","description":"Load Sentinel-2 L2A data from Planetary Computer STAC API."},"warnings":[{"fix":"Ensure both `odc-stac` and `odc-loader` are installed and compatible. Use `pip install odc-stac odc-loader`.","message":"odc-loader extraction: Since 0.5.0, the loader code has been extracted into a separate `odc-loader` package. You must have odc-loader>=0.6.0 installed. Existing code using `odc.stac.load` should still work, but function signatures may have changed.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Replace deprecated method calls with the current pystac API. For example, use `catalog.get_items()` instead of `catalog.get_all_items()`.","message":"Deprecated pystac methods: Some pystac client methods (e.g., `get_all_items`) have been renamed. Use `get_items()` or `get_all_items()` depending on your pystac version. Check pystac documentation.","severity":"gotcha","affected_versions":"all"},{"fix":"Always specify `crs` and `resolution` in `stac_load` when using `bbox` to ensure consistent output geobox.","message":"Geometry handling: When using `bbox` with `stac_load`, the output geobox may not align with items if CRS is not specified. Use `crs=` and `resolution=` explicitly to avoid misalignment.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `from odc.stac.eo3 import ...` with `from odc.stac import stac2ds`.","message":"The `odc.stac.eo3` module has been removed (since ~0.4.x). Migrate to `odc.stac.stac2ds` or direct item conversion.","severity":"deprecated","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with `pip install odc-stac`. Ensure you are using `from odc.stac import ...` (dot notation, not underscore).","cause":"Python cannot find the odc-stac package; either not installed or import path is wrong.","error":"ModuleNotFoundError: No module named 'odc.stac'"},{"fix":"Install odc-loader: `pip install odc-loader`.","cause":"odc-loader package not installed. Required since odc-stac 0.5.0.","error":"ModuleNotFoundError: No module named 'odc.loader'"},{"fix":"Check item collection, bands, and ensure `configure_s3_access` is called for cloud data access. Verify items have the requested bands.","cause":"stac_load returned None or empty dataset due to no matching data or incorrect parameters.","error":"AttributeError: 'NoneType' object has no attribute 'shape'"},{"fix":"Use `chunks={}` (dict) for automatic chunking. For odc-loader <0.6.0, use `dask_chunks=True/False`. Upgrade odc-loader: `pip install odc-loader>=0.6.0`.","cause":"chunks parameter changed between odc-loader versions; older version expects `dask_chunks` or different dict format.","error":"TypeError: stac_load() got an unexpected keyword argument 'chunks'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}