{"id":35228924,"url":"https://github.com/quantifyearth/yirgacheffe","last_synced_at":"2026-04-01T17:37:49.376Z","repository":{"id":152656596,"uuid":"537505418","full_name":"quantifyearth/yirgacheffe","owner":"quantifyearth","description":"A declarative geospatial library for Python to make data-science with maps easier","archived":false,"fork":false,"pushed_at":"2026-04-01T10:40:53.000Z","size":2242,"stargazers_count":11,"open_issues_count":18,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-01T12:28:07.699Z","etag":null,"topics":["data-science","geospatial","python3"],"latest_commit_sha":null,"homepage":"https://yirgacheffe.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantifyearth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","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":"2022-09-16T15:00:25.000Z","updated_at":"2026-03-18T14:28:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"eca82122-8139-4e7d-91b5-6f4215c0f487","html_url":"https://github.com/quantifyearth/yirgacheffe","commit_stats":null,"previous_names":["quantifyearth/yirgacheffe"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/quantifyearth/yirgacheffe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantifyearth%2Fyirgacheffe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantifyearth%2Fyirgacheffe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantifyearth%2Fyirgacheffe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantifyearth%2Fyirgacheffe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantifyearth","download_url":"https://codeload.github.com/quantifyearth/yirgacheffe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantifyearth%2Fyirgacheffe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["data-science","geospatial","python3"],"created_at":"2025-12-30T02:03:38.512Z","updated_at":"2026-04-01T17:37:49.348Z","avatar_url":"https://github.com/quantifyearth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yirgacheffe: a declarative geospatial library for Python to make data-science with maps easier\n\n[![CI](https://github.com/quantifyearth/yirgacheffe/actions/workflows/pull-request.yml/badge.svg?branch=main)](https://github.com/quantifyearth/yirgacheffe/actions)\n[![Documentation](https://img.shields.io/badge/docs-yirgacheffe.org-blue)](https://yirgacheffe.org)\n[![PyPI version](https://img.shields.io/pypi/v/yirgacheffe)](https://pypi.org/project/yirgacheffe/)\n\n\n## Overview\n\nYirgacheffe is a declarative geospatial library, allowing you to operate on both raster and polygon geospatial datasets without having to do all the tedious book keeping around layer alignment or dealing with hardware concerns around memory or parallelism. you can load into memory safely.\n\nExample common use-cases:\n\n* Do the datasets overlap? Yirgacheffe will let you define either the intersection or the union of a set of different datasets, scaling up or down the area as required.\n* Rasterisation of vector layers: if you have a vector dataset then you can add that to your computation and yirgaceffe will rasterize it on demand, so you never need to store more data in memory than necessary.\n* Do the raster layers get big and take up large amounts of memory? Yirgacheffe will let you do simple numerical operations with layers directly and then worry about the memory management behind the scenes for you.\n* Parallelisation of operations over many CPU cores.\n* Built in support for optionally using GPUs via [MLX](https://ml-explore.github.io/mlx/build/html/index.html) support.\n\n## Installation\n\nYirgacheffe is available via pypi, so can be installed with pip for example:\n\n```SystemShell\n$ pip install yirgacheffe\n```\n\n## Documentation\n\nThe documentation can be found on [yirgacheffe.org](https://yirgacheffe.org/)\n\n## Simple examples:\n\nHere is how to do cloud removal from [Sentinel-2 data](https://browser.dataspace.copernicus.eu/?zoom=14\u0026lat=6.15468\u0026lng=38.20581\u0026themeId=DEFAULT-THEME\u0026visualizationUrl=U2FsdGVkX1944lrmeTJcaSsnoxNMp4oucN1AjklGUANHd2cRZWyXnepHvzpaOWzMhH8SrWQo%2BqrOvOnu6f9FeCMrS%2FDZmvjzID%2FoE1tbOCEHK8ohPXjFqYojeR9%2B82ri\u0026datasetId=S2_L2A_CDAS\u0026fromTime=2025-09-09T00%3A00%3A00.000Z\u0026toTime=2025-09-09T23%3A59%3A59.999Z\u0026layerId=1_TRUE_COLOR\u0026demSource3D=%22MAPZEN%22\u0026cloudCoverage=30\u0026dateMode=SINGLE), using the [Scene Classification Layer](https://custom-scripts.sentinel-hub.com/custom-scripts/sentinel-2/scene-classification/) data:\n\n```python\nimport yirgaceffe as yg\n\nwith (\n  yg.read_raster(\"T37NCG_20250909T073609_B06_20m.jp2\") as vre2,\n  yg.read_raster(\"T37NCG_20250909T073609_SCL_20m.jp2\") as scl,\n):\n  is_cloud = (scl == 8) | (scl == 9) | (scl == 10)  # various cloud types\n  is_shadow = (scl == 3)\n  is_bad = is_cloud | is_shadow\n\n  masked_vre2 = yg.where(is_bad, float(\"nan\"), vre2)\n  masked_vre2.to_geotiff(\"vre2_cleaned.tif\")\n```\n\nor a species' [Area of Habitat](https://www.sciencedirect.com/science/article/pii/S0169534719301892) calculation:\n\n```python\nimport yirgaceffe as yg\n\nwith (\n    yg.read_raster(\"habitats.tif\") as habitat_map,\n    yg.read_raster('elevation.tif') as elevation_map,\n    yg.read_shape('species123.geojson') as range_map,\n):\n    refined_habitat = habitat_map.isin([...species habitat codes...])\n    refined_elevation = (elevation_map \u003e= species_min) \u0026 (elevation_map \u003c= species_max)\n    aoh = refined_habitat * refined_elevation * range_polygon * area_per_pixel_map\n    print(f'Area of habitat: {aoh.sum()}')\n```\n\n## Citation\n\nIf you use Yirgacheffe in your research, please cite our paper:\n\n\u003e Michael Winston Dales, Alison Eyres, Patrick Ferris, Francesca A. Ridley, Simon Tarr, and Anil Madhavapeddy. 2025. Yirgacheffe: A Declarative Approach to Geospatial Data. In *Proceedings of the 2nd ACM SIGPLAN International Workshop on Programming for the Planet* (PROPL '25). Association for Computing Machinery, New York, NY, USA, 47–54. https://doi.org/10.1145/3759536.3763806\n\n\u003cdetails\u003e\n\u003csummary\u003eBibTeX\u003c/summary\u003e\n\n```bibtex\n@inproceedings{10.1145/3759536.3763806,\n  author = {Dales, Michael Winston and Eyres, Alison and Ferris, Patrick and Ridley, Francesca A. and Tarr, Simon and Madhavapeddy, Anil},\n  title = {Yirgacheffe: A Declarative Approach to Geospatial Data},\n  year = {2025},\n  isbn = {9798400721618},\n  publisher = {Association for Computing Machinery},\n  address = {New York, NY, USA},\n  url = {https://doi.org/10.1145/3759536.3763806},\n  doi = {10.1145/3759536.3763806},\n  abstract = {We present Yirgacheffe, a declarative geospatial library that allows spatial algorithms to be implemented concisely, supports parallel execution, and avoids common errors by automatically handling data (large geospatial rasters) and resources (cores, memory, GPUs). Our primary user domain comprises ecologists, where a typical problem involves cleaning messy occurrence data, overlaying it over tiled rasters, combining layers, and deriving actionable insights from the results. We describe the successes of this approach towards driving key pipelines related to global biodiversity and describe the capability gaps that remain, hoping to motivate more research into geospatial domain-specific languages.},\n  booktitle = {Proceedings of the 2nd ACM SIGPLAN International Workshop on Programming for the Planet},\n  pages = {47–54},\n  numpages = {8},\n  keywords = {Biodiversity, Declarative, Geospatial, Python},\n  location = {Singapore, Singapore},\n  series = {PROPL '25}\n}\n```\n\n\u003c/details\u003e\n\n## Thanks\n\nThanks to discussion and feedback from my colleagues, particularly Alison Eyres, Patrick Ferris, Amelia Holcomb, and Anil Madhavapeddy.\n\nInspired by the work of Daniele Baisero in his AoH library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantifyearth%2Fyirgacheffe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantifyearth%2Fyirgacheffe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantifyearth%2Fyirgacheffe/lists"}