{"id":45754545,"url":"https://github.com/zarr-developers/geozarr-toolkit","last_synced_at":"2026-02-26T20:01:06.693Z","repository":{"id":339487267,"uuid":"1162129726","full_name":"zarr-developers/geozarr-toolkit","owner":"zarr-developers","description":"Tools for creating, exploring, and validating GeoZarr data","archived":false,"fork":false,"pushed_at":"2026-02-23T03:24:02.000Z","size":114,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-25T20:51:13.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://geozarr-toolkit.readthedocs.io/en/latest/","language":"JavaScript","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/zarr-developers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T22:42:31.000Z","updated_at":"2026-02-24T14:08:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zarr-developers/geozarr-toolkit","commit_stats":null,"previous_names":["zarr-developers/geozarr-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zarr-developers/geozarr-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarr-developers%2Fgeozarr-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarr-developers%2Fgeozarr-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarr-developers%2Fgeozarr-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarr-developers%2Fgeozarr-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zarr-developers","download_url":"https://codeload.github.com/zarr-developers/geozarr-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarr-developers%2Fgeozarr-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29870368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:42:30.764Z","status":"ssl_error","status_checked_at":"2026-02-26T18:41:47.936Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-25T19:37:12.678Z","updated_at":"2026-02-26T20:01:06.688Z","avatar_url":"https://github.com/zarr-developers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# geozarr-toolkit\n\nPython library for creating and validating [GeoZarr](https://github.com/zarr-developers/geozarr-spec)-compliant metadata. Provides Pydantic models, helper functions, and a CLI for the modular [Zarr conventions](https://github.com/zarr-conventions):\n\n- **[spatial:](https://github.com/zarr-conventions/spatial)** -- Coordinate transforms between array indices and spatial coordinates\n- **[proj:](https://github.com/zarr-experimental/geo-proj)** -- Coordinate Reference System (CRS) via EPSG codes, WKT2, or PROJJSON\n- **[multiscales](https://github.com/zarr-conventions/multiscales)** -- Pyramid structures and resolution levels\n\n## Installation\n\n```bash\npip install \"geozarr-toolkit\"\n```\n\n## Quick start\n\nCreate complete GeoZarr-compliant attributes in one call:\n\n```python\nfrom geozarr_toolkit import create_geozarr_attrs\n\nattrs = create_geozarr_attrs(\n    dimensions=[\"Y\", \"X\"],\n    crs=\"EPSG:32633\",\n    transform=[10.0, 0.0, 500000.0, 0.0, -10.0, 5000000.0],\n    bbox=[500000.0, 4900000.0, 600000.0, 5000000.0],\n    shape=[10000, 10000],\n)\n```\n\nOr build conventions individually:\n\n```python\nfrom geozarr_toolkit import (\n    create_spatial_attrs,\n    create_proj_attrs,\n    create_zarr_conventions,\n    SpatialConventionMetadata,\n    ProjConventionMetadata,\n)\n\n# Spatial convention\nspatial_attrs = create_spatial_attrs(\n    dimensions=[\"Y\", \"X\"],\n    transform=[10.0, 0.0, 500000.0, 0.0, -10.0, 5000000.0],\n)\n\n# Proj convention\nproj_attrs = create_proj_attrs(code=\"EPSG:32633\")\n\n# Combine with zarr_conventions array\nattrs = {**spatial_attrs, **proj_attrs}\nattrs[\"zarr_conventions\"] = create_zarr_conventions(\n    SpatialConventionMetadata(),\n    ProjConventionMetadata(),\n)\n```\n\n## Validation\n\nValidate attributes or Zarr stores against conventions:\n\n```python\nfrom geozarr_toolkit import validate_spatial, validate_proj, detect_conventions\n\n# Validate individual conventions\nis_valid, errors = validate_spatial({\"spatial:dimensions\": [\"Y\", \"X\"]})\n\n# Auto-detect and validate all conventions in a dict\nfrom geozarr_toolkit import validate_attrs\nresults = validate_attrs(attrs)\n```\n\n## Working with existing data\n\nExtract convention metadata from rioxarray or GDAL GeoTransforms:\n\n```python\nfrom geozarr_toolkit import from_rioxarray, from_geotransform\n\n# From rioxarray DataArray\nattrs = from_rioxarray(da)\n\n# From GDAL GeoTransform\nattrs = from_geotransform(\n    geotransform=(500000.0, 10.0, 0.0, 5000000.0, 0.0, -10.0),\n    crs_wkt='PROJCS[\"UTM zone 33N\"]',\n    shape=(10000, 10000),\n)\n```\n\n## Pydantic models\n\nUse the models directly for type-safe construction and validation:\n\n```python\nfrom geozarr_toolkit import Spatial, Proj\n\nspatial = Spatial(**{\"spatial:dimensions\": [\"Y\", \"X\"]})\nproj = Proj(**{\"proj:code\": \"EPSG:4326\"})\n\n# Serialize with convention-prefixed keys\nattrs = spatial.model_dump(by_alias=True, exclude_none=True)\n```\n\n## CLI\n\n```bash\n# Validate a Zarr store\ngeozarr validate data.zarr\ngeozarr validate data.zarr --conventions spatial proj\n\n# Inspect a Zarr store\ngeozarr info data.zarr\ngeozarr info data.zarr --json\n```\n\n## metazarr\n\n[`metazarr/`](metazarr/) is a client-side JavaScript library and web app for exploring Zarr store hierarchies and validating GeoZarr convention compliance. It runs entirely in the browser with no server required. Deployed at [inspect.geozarr.org](https://inspect.geozarr.org/).\n\nFeatures:\n\n- Opens remote Zarr v2 and v3 stores (consolidated metadata, directory crawling, or manual path entry)\n- Displays full array metadata: shape, dtype, chunks, fill value, codecs/compressor, dimension names, chunk key encoding, memory order, and computed statistics (uncompressed size, chunk count, chunk size)\n- Detects sharding (v3 `sharding_indexed` codec)\n- Auto-detects GeoZarr conventions (spatial:, proj:, multiscales, CF) via `zarr_conventions` or attribute prefixes\n- Validates nodes against convention JSON Schemas (Draft-07 and Draft 2020-12)\n\n```bash\ncd metazarr\nnpm install\nnpm run dev    # Start dev server at http://localhost:5173\nnpm test       # Run test suite\n```\n\nAlso usable as an ES module:\n\n```javascript\nimport { openStore, buildTree, detectConventions, validateNode, buildNodeDocument } from \"metazarr\";\n\nconst result = await openStore(\"https://example.com/data.zarr\");\nconst tree = buildTreeFromV3(result.v3Entries);\nconst conventions = detectConventions(tree.attrs);\n```\n\n## Development\n\n```bash\ngit clone https://github.com/zarr-developers/geozarr-toolkit.git\ncd geozarr-toolkit\nuv sync\nuv run pytest\n```\n\n## License\n\n[MIT](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarr-developers%2Fgeozarr-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzarr-developers%2Fgeozarr-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarr-developers%2Fgeozarr-toolkit/lists"}