easystac


Nameeasystac JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/cloudsen12/easystac
SummaryA Python package for simple STAC queries
upload_time2022-02-26 17:29:07
maintainer
docs_urlNone
authorDavid Montero Loaiza and Cesar Aybar Camacho
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://github.com/cloudsen12/easystac"><img src="https://raw.githubusercontent.com/cloudsen12/easystac/main/docs/_static/easystac.png" alt="easystac"></a>
</p>
<p align="center">
    <em>A Python package for simple STAC queries</em>
</p>

<p align="center">
<a href='https://pypi.python.org/pypi/easystac'>
    <img src='https://img.shields.io/pypi/v/easystac.svg' alt='PyPI' />
</a>
<a href='https://anaconda.org/conda-forge/easystac'>
    <img src='https://img.shields.io/conda/vn/conda-forge/easystac.svg' alt='conda-forge' />
</a>
<a href='https://easystac.readthedocs.io/en/latest/?badge=latest'>
    <img src='https://readthedocs.org/projects/easystac/badge/?version=latest' alt='Documentation Status' />
</a>
<a href="https://github.com/cloudsen12/easystac/actions/workflows/tests.yml" target="_blank">
    <img src="https://github.com/cloudsen12/easystac/actions/workflows/tests.yml/badge.svg" alt="Tests">
</a>
<a href="https://opensource.org/licenses/MIT" target="_blank">
    <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
</a>
<a href="https://github.com/sponsors/davemlz" target="_blank">
    <img src="https://img.shields.io/badge/GitHub%20Sponsors-Donate-ff69b4.svg" alt="GitHub Sponsors">
</a>
<a href="https://www.buymeacoffee.com/davemlz" target="_blank">
    <img src="https://img.shields.io/badge/Buy%20me%20a%20coffee-Donate-ff69b4.svg" alt="Buy me a coffee">
</a>
<a href="https://ko-fi.com/davemlz" target="_blank">
    <img src="https://img.shields.io/badge/kofi-Donate-ff69b4.svg" alt="Ko-fi">
</a>
<a href="https://twitter.com/dmlmont" target="_blank">
    <img src="https://img.shields.io/twitter/follow/dmlmont?style=social" alt="Twitter">
</a>
<a href="https://twitter.com/csaybar" target="_blank">
    <img src="https://img.shields.io/twitter/follow/csaybar?style=social" alt="Twitter">
</a>
<a href="https://github.com/psf/black" target="_blank">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Black">
</a>
<a href="https://pycqa.github.io/isort/" target="_blank">
    <img src="https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336" alt="isort">
</a>
</p>

---

**GitHub**: [https://github.com/cloudsen12/easystac](https://github.com/cloudsen12/easystac)

**Documentation**: [https://easystac.readthedocs.io/](https://easystac.readthedocs.io/)

**PyPI**: [https://pypi.org/project/easystac/](https://pypi.org/project/easystac/)

**Conda-forge**: [https://anaconda.org/conda-forge/easystac](https://anaconda.org/conda-forge/easystac)

---

## Overview

[SpatioTemporal Asset Catalogs (STAC)](https://stacspec.org/) provide a standardized format that describes
geospatial information. Multiple platforms are using this standard to provide clients several datasets.
Platforms such as [Planetary Computer](https://planetarycomputer.microsoft.com/),
[Radiant ML Hub](https://mlhub.earth/) and [Google Earth Engine](https://earthengine.google.com/) use this standard,
however, only Google Earth Engine provides a fully easy API that is transparent for clients.

`easystac` is a Python package that provides users of STAC objects as well as clients from Planetary Computer and Radiant ML Hub
with an easy API that is transparent for them, implementing Google Earth Engine-like methods
and classes to query, explore and convert STAC assets to [`xarray`](https://docs.xarray.dev/en/stable/) objects.

Some of the `easystac` features are listed here:

- Simple authentication for Planetary Computer and Radiant ML Hub.
- Access to STAC collections from Planetary Computer and Radiant ML Hub.
- Earth Engine-like classes such as ImageCollection, including filtering methods.
- Compatibility with xarray.

Check the simple usage of `easystac` here:

```python
import easystac as es
from geojson import Polygon

geom = Polygon([
        [
            [-122.1553, 38.7578],
            [-121.8321, 39.7444],
            [-123.0002, 39.7503],
            [-123.0002, 38.7609],
            [-122.1553, 38.7578]
        ]
    ]
)

HLSS30 = (es.ImageCollection("HLSS30.v2.0")
    .fromSTAC("https://cmr.earthdata.nasa.gov/stac/LPCLOUD/")
    .filterBounds(geom)
    .filterDate("2021-01-01","2022-01-01")
    .getInfo(epsg = 4326,resolution = 0.0001,assets = ["B02","B03","B04"]))
```

In the case of specialized STAC objects, we have created special modules for Planetary Computer:

```python
import easystac.planetary as pc
from geojson import Point

pc.Authenticate()
pc.Initialize()

geom = Point([-76.1,4.3])

S2 = (pc.ImageCollection("sentinel-2-l2a")
    .filterBounds(geom)
    .filterDate("2020-01-01","2021-01-01")
    .getInfo(resolution = 10))
```

This principle applies also for Radiant ML Hub.

```python
import easystac.radiant as rd

rd.Authenticate()
rd.Initialize()

S1floods = (rd.ImageCollection("sen12floods_s1_source")
    .filterDate("2019-01-01","2019-01-05")
    .getInfo(epsg = 4326,resolution = 0.0001))
```

## Installation

Install the latest version from PyPI:

```
pip install easystac
```

Upgrade `easystac` by running:

```
pip install -U easystac
```

Install the latest version from conda-forge:

```
conda install -c conda-forge easystac
```

Install the latest dev version from GitHub by running:

```
pip install git+https://github.com/cloudsen12/easystac
```

## License

The project is licensed under the MIT license.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cloudsen12/easystac",
    "name": "easystac",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "David Montero Loaiza and Cesar Aybar Camacho",
    "author_email": "dml.mont@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/31/70/4ef4a11343fe297951d6680f2f68a05f7058824a0f111e2410818abe1618/easystac-0.0.1.tar.gz",
    "platform": "",
    "description": "<p align=\"center\">\n  <a href=\"https://github.com/cloudsen12/easystac\"><img src=\"https://raw.githubusercontent.com/cloudsen12/easystac/main/docs/_static/easystac.png\" alt=\"easystac\"></a>\n</p>\n<p align=\"center\">\n    <em>A Python package for simple STAC queries</em>\n</p>\n\n<p align=\"center\">\n<a href='https://pypi.python.org/pypi/easystac'>\n    <img src='https://img.shields.io/pypi/v/easystac.svg' alt='PyPI' />\n</a>\n<a href='https://anaconda.org/conda-forge/easystac'>\n    <img src='https://img.shields.io/conda/vn/conda-forge/easystac.svg' alt='conda-forge' />\n</a>\n<a href='https://easystac.readthedocs.io/en/latest/?badge=latest'>\n    <img src='https://readthedocs.org/projects/easystac/badge/?version=latest' alt='Documentation Status' />\n</a>\n<a href=\"https://github.com/cloudsen12/easystac/actions/workflows/tests.yml\" target=\"_blank\">\n    <img src=\"https://github.com/cloudsen12/easystac/actions/workflows/tests.yml/badge.svg\" alt=\"Tests\">\n</a>\n<a href=\"https://opensource.org/licenses/MIT\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License\">\n</a>\n<a href=\"https://github.com/sponsors/davemlz\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/GitHub%20Sponsors-Donate-ff69b4.svg\" alt=\"GitHub Sponsors\">\n</a>\n<a href=\"https://www.buymeacoffee.com/davemlz\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/Buy%20me%20a%20coffee-Donate-ff69b4.svg\" alt=\"Buy me a coffee\">\n</a>\n<a href=\"https://ko-fi.com/davemlz\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/kofi-Donate-ff69b4.svg\" alt=\"Ko-fi\">\n</a>\n<a href=\"https://twitter.com/dmlmont\" target=\"_blank\">\n    <img src=\"https://img.shields.io/twitter/follow/dmlmont?style=social\" alt=\"Twitter\">\n</a>\n<a href=\"https://twitter.com/csaybar\" target=\"_blank\">\n    <img src=\"https://img.shields.io/twitter/follow/csaybar?style=social\" alt=\"Twitter\">\n</a>\n<a href=\"https://github.com/psf/black\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Black\">\n</a>\n<a href=\"https://pycqa.github.io/isort/\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336\" alt=\"isort\">\n</a>\n</p>\n\n---\n\n**GitHub**: [https://github.com/cloudsen12/easystac](https://github.com/cloudsen12/easystac)\n\n**Documentation**: [https://easystac.readthedocs.io/](https://easystac.readthedocs.io/)\n\n**PyPI**: [https://pypi.org/project/easystac/](https://pypi.org/project/easystac/)\n\n**Conda-forge**: [https://anaconda.org/conda-forge/easystac](https://anaconda.org/conda-forge/easystac)\n\n---\n\n## Overview\n\n[SpatioTemporal Asset Catalogs (STAC)](https://stacspec.org/) provide a standardized format that describes\ngeospatial information. Multiple platforms are using this standard to provide clients several datasets.\nPlatforms such as [Planetary Computer](https://planetarycomputer.microsoft.com/),\n[Radiant ML Hub](https://mlhub.earth/) and [Google Earth Engine](https://earthengine.google.com/) use this standard,\nhowever, only Google Earth Engine provides a fully easy API that is transparent for clients.\n\n`easystac` is a Python package that provides users of STAC objects as well as clients from Planetary Computer and Radiant ML Hub\nwith an easy API that is transparent for them, implementing Google Earth Engine-like methods\nand classes to query, explore and convert STAC assets to [`xarray`](https://docs.xarray.dev/en/stable/) objects.\n\nSome of the `easystac` features are listed here:\n\n- Simple authentication for Planetary Computer and Radiant ML Hub.\n- Access to STAC collections from Planetary Computer and Radiant ML Hub.\n- Earth Engine-like classes such as ImageCollection, including filtering methods.\n- Compatibility with xarray.\n\nCheck the simple usage of `easystac` here:\n\n```python\nimport easystac as es\nfrom geojson import Polygon\n\ngeom = Polygon([\n        [\n            [-122.1553, 38.7578],\n            [-121.8321, 39.7444],\n            [-123.0002, 39.7503],\n            [-123.0002, 38.7609],\n            [-122.1553, 38.7578]\n        ]\n    ]\n)\n\nHLSS30 = (es.ImageCollection(\"HLSS30.v2.0\")\n    .fromSTAC(\"https://cmr.earthdata.nasa.gov/stac/LPCLOUD/\")\n    .filterBounds(geom)\n    .filterDate(\"2021-01-01\",\"2022-01-01\")\n    .getInfo(epsg = 4326,resolution = 0.0001,assets = [\"B02\",\"B03\",\"B04\"]))\n```\n\nIn the case of specialized STAC objects, we have created special modules for Planetary Computer:\n\n```python\nimport easystac.planetary as pc\nfrom geojson import Point\n\npc.Authenticate()\npc.Initialize()\n\ngeom = Point([-76.1,4.3])\n\nS2 = (pc.ImageCollection(\"sentinel-2-l2a\")\n    .filterBounds(geom)\n    .filterDate(\"2020-01-01\",\"2021-01-01\")\n    .getInfo(resolution = 10))\n```\n\nThis principle applies also for Radiant ML Hub.\n\n```python\nimport easystac.radiant as rd\n\nrd.Authenticate()\nrd.Initialize()\n\nS1floods = (rd.ImageCollection(\"sen12floods_s1_source\")\n    .filterDate(\"2019-01-01\",\"2019-01-05\")\n    .getInfo(epsg = 4326,resolution = 0.0001))\n```\n\n## Installation\n\nInstall the latest version from PyPI:\n\n```\npip install easystac\n```\n\nUpgrade `easystac` by running:\n\n```\npip install -U easystac\n```\n\nInstall the latest version from conda-forge:\n\n```\nconda install -c conda-forge easystac\n```\n\nInstall the latest dev version from GitHub by running:\n\n```\npip install git+https://github.com/cloudsen12/easystac\n```\n\n## License\n\nThe project is licensed under the MIT license.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package for simple STAC queries",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/cloudsen12/easystac"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31704ef4a11343fe297951d6680f2f68a05f7058824a0f111e2410818abe1618",
                "md5": "7a2398dac94754859bfff5f705eb8402",
                "sha256": "9c2f962098f8db1c543e5141ecdb0ea7cecf79a24a9abd8f0946c14da16e5bf3"
            },
            "downloads": -1,
            "filename": "easystac-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7a2398dac94754859bfff5f705eb8402",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9078,
            "upload_time": "2022-02-26T17:29:07",
            "upload_time_iso_8601": "2022-02-26T17:29:07.413339Z",
            "url": "https://files.pythonhosted.org/packages/31/70/4ef4a11343fe297951d6680f2f68a05f7058824a0f111e2410818abe1618/easystac-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-02-26 17:29:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudsen12",
    "github_project": "easystac",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "easystac"
}
        
Elapsed time: 0.10322s