{"id":28952730,"url":"https://github.com/stac-utils/xstac","last_synced_at":"2025-10-10T20:33:03.136Z","repository":{"id":42415415,"uuid":"372801708","full_name":"stac-utils/xstac","owner":"stac-utils","description":"STAC from xarray","archived":false,"fork":false,"pushed_at":"2025-02-25T16:30:41.000Z","size":2109,"stargazers_count":66,"open_issues_count":3,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-23T17:15:30.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stac-utils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-01T11:14:35.000Z","updated_at":"2025-06-11T04:33:58.000Z","dependencies_parsed_at":"2023-09-22T15:37:37.306Z","dependency_job_id":"f2bf05e3-535a-42a8-b4dd-20424e3b2627","html_url":"https://github.com/stac-utils/xstac","commit_stats":{"total_commits":108,"total_committers":5,"mean_commits":21.6,"dds":"0.12037037037037035","last_synced_commit":"f078c9b5aca0cc2d9516e630cf743d6ccefde9d8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stac-utils/xstac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fxstac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fxstac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fxstac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fxstac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stac-utils","download_url":"https://codeload.github.com/stac-utils/xstac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fxstac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005272,"owners_count":26083863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-23T17:12:23.224Z","updated_at":"2025-10-10T20:33:03.129Z","avatar_url":"https://github.com/stac-utils.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xstac\n\nGenerate STAC Collections from xarray datasets.\n\n## Example - CLI\n\n```console\n$ xstac --help\nusage:\nGenerate STAC Collections for Daymet from the Zarr Groups.\n\nxstac template.json asset-key output.json\n\npositional arguments:\n  template              Template STAC Collection to merge with the result.\n  asset                 Asset key to use to load the data. Must be present in\n                        the template file's 'assets'.\n  outfile               Output file to write to. Defaults to stdout.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --reference-system REFERENCE_SYSTEM\n  --temporal_dimension TEMPORAL_DIMENSION\n                        Coordinate name for the 'time' dimension\n  --x-dimension X_DIMENSION\n                        Coordinate name for the 'x' dimension\n  --y-dimension Y_DIMENSION\n                        Coordinate name for the 'y' dimension\n  --no-validate         Whether to skip validation of the collection.\n\n$ xstac examples/terraclimate/terraclimate-template.json \\\n  zarr-https examples/terraclimate/terraclimate.json \\\n  --x-dimension=lon --y-dimension=lat --reference-system=4326\n```\n\nThis generates the [TerraClimate STAC Collection](examples/terraclimate/terraclimate.json)\n\nAlternatively, you can generate STAC items:\n\n```\n$ xstac examples/terraclimate/item-template.json \\\n    zarr-https examples/terraclimate/item.json \\\n    --x-dimension=lon --y-dimension=lat --reference-system=4326\n```\n\nThis generates the [TerraClimate STAC item](examples/terraclimate/item.json).\n\n## Example - Python API\n\nSee [examples/daymet/generate.py](examples/daymet/generate.py) for an example using the Python API.\n\n\n## Kerchunk support\n\n[Kerchunk](https://fsspec.github.io/kerchunk/) is a project and specification\nfor representing chunked, compressed data where only the metadata and\n*references* to chunks of remote data are stored. You might want to include the\nKerchunk metadata in a STAC item.\n\nTo do this, generate the Kerchunk indices and provide them as the\n`kerchunk_indices` argument to `xarray_to_stac`.\n\n```python\n\u003e\u003e\u003e from stactools.noaa_nwm import stac\n\u003e\u003e\u003e import kerchunk.hdf\n\n\u003e\u003e\u003e href = \"https://noaanwm.blob.core.windows.net/nwm/nwm.20231010/short_range/nwm.t00z.short_range.channel_rt.f001.conus.nc\"\n\u003e\u003e\u003e indices = kerchunk.hdf.SingleHdf5ToZarr(href).translate()\n\u003e\u003e\u003e item = stac.create_item(href, kerchunk_indices=indices)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-utils%2Fxstac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstac-utils%2Fxstac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-utils%2Fxstac/lists"}