stactools-sentinel2


Namestactools-sentinel2 JSON
Version 0.6.4 PyPI version JSON
download
home_pagehttps://github.com/stactools-sentinel2/stactools-sentinel2
SummaryCreate STAC Items from Sentinel-2 metadata
upload_time2024-04-04 16:36:30
maintainerNone
docs_urlNone
authorstac-utils
requires_python>=3.9
licenseNone
keywords stactools pystac catalog stac
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stactools-sentinel2

stactools package for Sentinel-2 data.

## Examples

- [L1C item](./examples/sentinel2-l1c-example/S2A_T01LAC_20200717T221944_L1C/S2A_T01LAC_20200717T221944_L1C.json)
- [L2A item](./examples/sentinel2-l2a-example/S2A_T07HFE_20190212T192646_L2A/S2A_T07HFE_20190212T192646_L2A.json)

## Running

```shell
pip install stactools-sentinel2
````

SAFE archive:

```shell
stac sentinel2 create-item tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE output/
```

AWS Open Data bucket `sentinel-s2-l2a`:

```shell
stac sentinel2 create-item tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG output/
```

Sentinel Hub metadata:

```shell
stac sentinel2 create-item --asset-href-prefix s3://sentinel-s2-l2a/tiles/34/L/BP/2022/4/1/0/ \
      https://roda.sentinel-hub.com/sentinel-s2-l2a/tiles/34/L/BP/2022/4/1/0/ output
````

**Note:** this does not currently work with S3 buckets using requester-pays.

The flag `--tolerance` can be set to a decimal value to define the simplification tolerance of the Item geometry.
This is a pass-through to the [Shapely simplify method](https://shapely.readthedocs.io/en/stable/manual.html#object.simplify).

## Development

Install pre-commit hooks with:

```commandline
pre-commit install
```

Run these pre-commit hooks with:

```commandline
pre-commit run --all-files
```

Install the code in the local python env so your IDE can see it:

```commandline
pip install -e .
```

Run the tests with:

```commandline
pytest -vvv
```

If you change the STAC metadata output, you will need to re-create the test files with the following command:

```shell
python scripts/create_expected.py
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stactools-sentinel2/stactools-sentinel2",
    "name": "stactools-sentinel2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "stactools, pystac, catalog, STAC",
    "author": "stac-utils",
    "author_email": "stac@radiant.earth",
    "download_url": "https://files.pythonhosted.org/packages/30/64/853291e4157a95ca9a92ee2d54a7d4d2534a0b7dc7efd85009d927f7233c/stactools-sentinel2-0.6.4.tar.gz",
    "platform": null,
    "description": "# stactools-sentinel2\n\nstactools package for Sentinel-2 data.\n\n## Examples\n\n- [L1C item](./examples/sentinel2-l1c-example/S2A_T01LAC_20200717T221944_L1C/S2A_T01LAC_20200717T221944_L1C.json)\n- [L2A item](./examples/sentinel2-l2a-example/S2A_T07HFE_20190212T192646_L2A/S2A_T07HFE_20190212T192646_L2A.json)\n\n## Running\n\n```shell\npip install stactools-sentinel2\n````\n\nSAFE archive:\n\n```shell\nstac sentinel2 create-item tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE output/\n```\n\nAWS Open Data bucket `sentinel-s2-l2a`:\n\n```shell\nstac sentinel2 create-item tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG output/\n```\n\nSentinel Hub metadata:\n\n```shell\nstac sentinel2 create-item --asset-href-prefix s3://sentinel-s2-l2a/tiles/34/L/BP/2022/4/1/0/ \\\n      https://roda.sentinel-hub.com/sentinel-s2-l2a/tiles/34/L/BP/2022/4/1/0/ output\n````\n\n**Note:** this does not currently work with S3 buckets using requester-pays.\n\nThe flag `--tolerance` can be set to a decimal value to define the simplification tolerance of the Item geometry.\nThis is a pass-through to the [Shapely simplify method](https://shapely.readthedocs.io/en/stable/manual.html#object.simplify).\n\n## Development\n\nInstall pre-commit hooks with:\n\n```commandline\npre-commit install\n```\n\nRun these pre-commit hooks with:\n\n```commandline\npre-commit run --all-files\n```\n\nInstall the code in the local python env so your IDE can see it:\n\n```commandline\npip install -e .\n```\n\nRun the tests with:\n\n```commandline\npytest -vvv\n```\n\nIf you change the STAC metadata output, you will need to re-create the test files with the following command:\n\n```shell\npython scripts/create_expected.py\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Create STAC Items from Sentinel-2 metadata",
    "version": "0.6.4",
    "project_urls": {
        "Homepage": "https://github.com/stactools-sentinel2/stactools-sentinel2",
        "Issues": "https://github.com/stactools-sentinel2s/stactools-sentinel2/issues"
    },
    "split_keywords": [
        "stactools",
        " pystac",
        " catalog",
        " stac"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85837436057e9f2435b8ef62d327d03fd1a9c1370f591388106961362ab3233d",
                "md5": "8a8cd0e3cf864a6c5da187bfd23508a8",
                "sha256": "c4b26b2eff282e71c82e54bf493063cca79dc13d854720f4454e98b00b26f337"
            },
            "downloads": -1,
            "filename": "stactools_sentinel2-0.6.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a8cd0e3cf864a6c5da187bfd23508a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 23719,
            "upload_time": "2024-04-04T16:36:28",
            "upload_time_iso_8601": "2024-04-04T16:36:28.252486Z",
            "url": "https://files.pythonhosted.org/packages/85/83/7436057e9f2435b8ef62d327d03fd1a9c1370f591388106961362ab3233d/stactools_sentinel2-0.6.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3064853291e4157a95ca9a92ee2d54a7d4d2534a0b7dc7efd85009d927f7233c",
                "md5": "ed3bfe31ba19d3ba7d89a9b72573ebfb",
                "sha256": "7f30ee963fcc786b79116d2918e031728e1584bccf119c491c7a6e24b9dc640c"
            },
            "downloads": -1,
            "filename": "stactools-sentinel2-0.6.4.tar.gz",
            "has_sig": false,
            "md5_digest": "ed3bfe31ba19d3ba7d89a9b72573ebfb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 24828,
            "upload_time": "2024-04-04T16:36:30",
            "upload_time_iso_8601": "2024-04-04T16:36:30.145264Z",
            "url": "https://files.pythonhosted.org/packages/30/64/853291e4157a95ca9a92ee2d54a7d4d2534a0b7dc7efd85009d927f7233c/stactools-sentinel2-0.6.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 16:36:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stactools-sentinel2",
    "github_project": "stactools-sentinel2",
    "github_not_found": true,
    "lcname": "stactools-sentinel2"
}
        
Elapsed time: 0.26792s