Skip to main content

TDS web services to STAC catalogs

Project description

TDS2STAC

A STAC catalog creator from Thredds data server web services

Installation

pip install tds2stac

Usage

Use case

You can use the following template for creating STAC catalog from the TDS web service for your project.

from tds2stac.tds2stac import Converter

converter = Converter("http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/catalog.html",
                     stac=True, stac_dir="/path/to/save/stac/catalogs/",
                     stac_id = "sample",
                     stac_description = "sample")

output:

Start Scanning datasets of http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/catalog.xml
|__ http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/catalog.xml |  Number of branches:  5
|_______ http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/static/catalog.xml |  Number of data:  1
|_______ http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/monthly/catalog.xml |  Number of data:  246
|_______ http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/daily/catalog.xml |  Number of data:  360
|_______ http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/climatology/catalog.xml |  Number of data:  7
|_______ http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/aggregated/catalog.xml |  Number of data:  1
615 data is going to be set as items
5 data is going to be set as items
Start processing:  http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/static/catalog.xml
5 / 5 STAC catalogs is created
1 / 615 STAC items is connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 11.02it/s]
Start processing:  http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/monthly/catalog.xml
5 / 5 STAC catalogs is created
247 / 615 STAC items is connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████████| 246/246 [00:43<00:00,  5.64it/s]
Start processing:  http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/daily/catalog.xml
5 / 5 STAC catalogs is created
607 / 615 STAC items is connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████████| 360/360 [01:10<00:00,  5.11it/s]
Start processing:  http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/climatology/catalog.xml
5 / 5 STAC catalogs is created
614 / 615 STAC items is connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00,  7.89it/s]
Start processing:  http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/aggregated/catalog.xml
5 / 5 STAC catalogs is created
615 / 615 STAC items is connected to the related catalog
100%|████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:22<00:00, 22.02s/it]
Start processing:  http://172.27.80.119:8088/thredds/catalog/regclim/raster/global/era5/sfc/catalog.xml
5 / 5 STAC catalogs is created
615 / 615 STAC items is connected to the related catalog
0it [00:00, ?it/s]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tds2stac-1.0.2.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

tds2stac-1.0.2-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page