========
TDS2STAC
========
.. image:: https://codebase.helmholtz.cloud/cat4kit/tds2stac/-/raw/main/tds2stac-logo.png
=========
.. image:: https://img.shields.io/pypi/v/tds2stac.svg
:target: https://pypi.python.org/pypi/tds2stac
.. image:: https://readthedocs.org/projects/tds2stac/badge/?version=latest
:target: https://tds2stac.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status
STAC specification is a method of exposing spatial and temporal data collections in a standardized manner. Specifically, the `SpatioTemporal Asset Catalog (STAC) <https://stacspec.org/en>`_ specification describes and catalogs spatiotemporal assets using a common structure.
This package creates STAC metadata by harvesting dataset details from the `Thredds <https://www.unidata.ucar.edu/software/tds/>`_ data server. After creating STAC Catalogs, Collections, and Items, it imports them into `pgSTAC <https://stac-utils.github.io/pgstac/pgstac/>`_ and `STAC-FastAPI <https://stac-utils.github.io/stac-fastapi/>`_.
* Free software: EUPL-1.2
* Documentation: https://tds2stac.readthedocs.io.
Installation from PyPi
------------------------
.. code:: bash
pip install tds2stac
Installation for development
--------------------------------
.. code:: bash
git clone https://codebase.helmholtz.cloud/cat4kit/tds2stac.git
cd tds2stac
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Installing using Docker
------------------------
For runnig by docker use `this <https://codebase.helmholtz.cloud/cat4kit/tds2stac-docker>`_ repository.
Usage
----------------
Use case:
You can use the following template for creating STAC catalog from the TDS web service for your project.
You can change configuration of PgSTAC in `config_pgstac <./tds2stac/config_pgstac.py>`_
.. code:: python
from tds2stac.tds2stac import Converter
from tds2stac import app
app.Harvester("https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.html",
stac = True,
stac_id = "id",
stac_description = "description",
stac_dir = "/Users/hadizadeh-m/stac/",
)
output:
INFO 2023-08-15 10:13:49,031 app.py @function __init__ line 123 - Start Scanning datasets
Start Scanning datasets of https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.xml
|__ https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.xml | Number of branches: 2
|_______ https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.05/catalog.xml | Number of data: 1
|_______ https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.1/catalog.xml | Number of data: 1
2 data are going to be set as items
2 datasets are going to be set as collction
INFO 2023-08-15 10:13:49,110 app.py @function __init__ line 196 - Harvesting datasets is started
Start processing: https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.05/catalog.xml
2 / 2 STAC catalogs are created
1 / 2 STAC items are connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.82s/it]
Start processing: https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.1/catalog.xml
2 / 2 STAC catalogs are created
2 / 2 STAC items are connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.40it/s]
Start processing: https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.xml
2 / 2 STAC catalogs are created
2 / 2 STAC items are connected to the related catalog
0it [00:00, ?it/s]
INFO 2023-08-15 10:13:52,002 app.py @function __init__ line 247 - Harvesting datasets is finished
Copyright
---------
Copyright © 2023 Karlsruher Institut für Technologie
Licensed under the EUPL-1.2-or-later
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the EUPL-1.2 license for more details.
You should have received a copy of the EUPL-1.2 license along with this
program. If not, see https://www.eupl.eu/.
Raw data
{
"_id": null,
"home_page": "https://codebase.helmholtz.cloud/CAT4KIT/tds2stac",
"name": "TDS2STAC",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "CAT4KIT,KIT,EXU-Vorhaben-Research-Data-Management,helmholtz",
"author": "Mostafa Hadizadeh",
"author_email": "mostafa.hadizadeh@kit.edu",
"download_url": "https://files.pythonhosted.org/packages/32/ca/cbc62a4d291ee792a3a6bf5246b7bb01ad986c6f1770067e04ff4c917cd8/TDS2STAC-2.2.3.tar.gz",
"platform": null,
"description": "========\nTDS2STAC\n========\n\n.. image:: https://codebase.helmholtz.cloud/cat4kit/tds2stac/-/raw/main/tds2stac-logo.png\n\n\n\n\n=========\n\n.. image:: https://img.shields.io/pypi/v/tds2stac.svg\n :target: https://pypi.python.org/pypi/tds2stac\n\n.. image:: https://readthedocs.org/projects/tds2stac/badge/?version=latest\n :target: https://tds2stac.readthedocs.io/en/latest/?version=latest\n :alt: Documentation Status\n\n\n\nSTAC specification is a method of exposing spatial and temporal data collections in a standardized manner. Specifically, the `SpatioTemporal Asset Catalog (STAC) <https://stacspec.org/en>`_ specification describes and catalogs spatiotemporal assets using a common structure. \nThis package creates STAC metadata by harvesting dataset details from the `Thredds <https://www.unidata.ucar.edu/software/tds/>`_ data server. After creating STAC Catalogs, Collections, and Items, it imports them into `pgSTAC <https://stac-utils.github.io/pgstac/pgstac/>`_ and `STAC-FastAPI <https://stac-utils.github.io/stac-fastapi/>`_.\n\n* Free software: EUPL-1.2\n* Documentation: https://tds2stac.readthedocs.io.\n\n\nInstallation from PyPi\n------------------------\n.. code:: bash\n\n pip install tds2stac\n\nInstallation for development\n--------------------------------\n.. code:: bash\n\n git clone https://codebase.helmholtz.cloud/cat4kit/tds2stac.git\n cd tds2stac\n python -m venv venv\n source venv/bin/activate\n pip install -r requirements.txt\n\n\nInstalling using Docker\n------------------------\n\nFor runnig by docker use `this <https://codebase.helmholtz.cloud/cat4kit/tds2stac-docker>`_ repository.\n\n\nUsage\n----------------\n \nUse case:\n\nYou can use the following template for creating STAC catalog from the TDS web service for your project.\n\nYou can change configuration of PgSTAC in `config_pgstac <./tds2stac/config_pgstac.py>`_\n\n.. code:: python\n\n from tds2stac.tds2stac import Converter\n\n from tds2stac import app\n\n app.Harvester(\"https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.html\",\n stac = True,\n stac_id = \"id\",\n stac_description = \"description\",\n stac_dir = \"/Users/hadizadeh-m/stac/\",\n )\n\n output:\n\n INFO 2023-08-15 10:13:49,031 app.py @function __init__ line 123 - Start Scanning datasets\n Start Scanning datasets of https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.xml\n |__ https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.xml | Number of branches: 2\n |_______ https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.05/catalog.xml | Number of data: 1\n |_______ https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.1/catalog.xml | Number of data: 1\n 2 data are going to be set as items\n 2 datasets are going to be set as collction\n INFO 2023-08-15 10:13:49,110 app.py @function __init__ line 196 - Harvesting datasets is started\n Start processing: https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.05/catalog.xml\n 2 / 2 STAC catalogs are created\n 1 / 2 STAC items are connected to the related catalog\n 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1/1 [00:01<00:00, 1.82s/it]\n Start processing: https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/0.1/catalog.xml\n 2 / 2 STAC catalogs are created\n 2 / 2 STAC items are connected to the related catalog\n 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1/1 [00:00<00:00, 1.40it/s]\n Start processing: https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/climatology/catalog.xml\n 2 / 2 STAC catalogs are created\n 2 / 2 STAC items are connected to the related catalog\n 0it [00:00, ?it/s]\n INFO 2023-08-15 10:13:52,002 app.py @function __init__ line 247 - Harvesting datasets is finished\n\nCopyright\n---------\nCopyright \u00a9 2023 Karlsruher Institut f\u00fcr Technologie\n\nLicensed under the EUPL-1.2-or-later\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the EUPL-1.2 license for more details.\n\nYou should have received a copy of the EUPL-1.2 license along with this\nprogram. If not, see https://www.eupl.eu/.\n\n\n",
"bugtrack_url": null,
"license": "EUPL-1.2",
"summary": "A STAC catalog creator from Thredds data server",
"version": "2.2.3",
"project_urls": {
"Documentation": "https://tds2stac.readthedocs.io/",
"Homepage": "https://codebase.helmholtz.cloud/CAT4KIT/tds2stac",
"Source": "https://codebase.helmholtz.cloud/CAT4KIT/tds2stac",
"Tracker": "https://codebase.helmholtz.cloud/CAT4KIT/tds2stac/issues/"
},
"split_keywords": [
"cat4kit",
"kit",
"exu-vorhaben-research-data-management",
"helmholtz"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1345f29b507615eda9381885610fad06ce35904b47256826ccac6e0fa8adb53c",
"md5": "405d0a30e25c574bad5f58534965e75a",
"sha256": "fd1bf54c9b51d93763ce0cabcc851f18b24968a0d94d582031198e7425cbf689"
},
"downloads": -1,
"filename": "TDS2STAC-2.2.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "405d0a30e25c574bad5f58534965e75a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 27155,
"upload_time": "2023-09-09T09:43:35",
"upload_time_iso_8601": "2023-09-09T09:43:35.379956Z",
"url": "https://files.pythonhosted.org/packages/13/45/f29b507615eda9381885610fad06ce35904b47256826ccac6e0fa8adb53c/TDS2STAC-2.2.3-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "32cacbc62a4d291ee792a3a6bf5246b7bb01ad986c6f1770067e04ff4c917cd8",
"md5": "e99221b11031c106ea63644416b0a417",
"sha256": "a06012478aba9e0d02674bdcf94c25ea4882eda4a547b9631f129f94a231e4e2"
},
"downloads": -1,
"filename": "TDS2STAC-2.2.3.tar.gz",
"has_sig": false,
"md5_digest": "e99221b11031c106ea63644416b0a417",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 50705,
"upload_time": "2023-09-09T09:43:37",
"upload_time_iso_8601": "2023-09-09T09:43:37.552890Z",
"url": "https://files.pythonhosted.org/packages/32/ca/cbc62a4d291ee792a3a6bf5246b7bb01ad986c6f1770067e04ff4c917cd8/TDS2STAC-2.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-09 09:43:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "tds2stac"
}