!pip install up42-py
import up42
Authentication¶
To authenticate, you need to know your project credentials.
up42.authenticate(
project_id="your-project-ID",
project_api_key="your-project-API-key"
)
# Alternatively, you can create a config.json file and use the following code for it:
# {
# "project_id": your-project-ID",
# "project_api_key": "your-project-API-key"
# }
# If you use a configuration file, uncomment this line:
# up42.authenticate(cfg_file="credentials.json")
2023-09-05 13:12:47,226 - Authentication with UP42 successful!
Step 1. Choose an UP42 asset¶
Choose an UP42 asset and use its ID to retrieve associated STAC objects.
asset = up42.initialize_asset(asset_id="55434287-31bc-3ad7-1a63-d61aac11ac55")
2023-09-05 13:13:14,742 - Initialized Asset(name: earthsearch-aws_a6e2259d-c90c-45c5-8c3d-b104b8e9e7de.zip, asset_id: 55434287-31bc-3ad7-1a63-d61aac11ac55, createdAt: 2023-09-01T13:34:52.744744Z, size: 1312988151), source: ARCHIVE, contentType: application/zip
Step 2. Get STAC collections¶
Retrieve STAC collections associated with the specified UP42 asset. A STAC collection is an UP42 asset you received after a completed order. It groups related items and aggregates their summary metadata. An order can produce multiple STAC collections.
asset.stac_info
CollectionClient: 2ef4a8a3-c6a7-43a6-96ce-2d881a124341
id: 2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
title: S2A_32UQD_20230426_0_L2A |
description: Sentinel-2 is an Earth observation mission from the Copernicus Programme by the European Space Agency providing Open Data for anybody to use. It's imaging satellites carry wide swath high-resolution multispectral sensors with 13 spectral bands and they systematically acquire optical imagery at high spatial resolution (10 m to 60 m) over land and coastal waters. The satellites were manufactured by a consortium led by Airbus Defence and Space. |
providers: |
type: Collection |
up42-product:data_type: raster |
up42-user:title: earthsearch-aws_a6e2259d-c90c-45c5-8c3d-b104b8e9e7de.zip |
up42-system:metadata_version: 0.0.14 |
up42-system:source: ARCHIVE |
up42-product:collection_name: sentinel-2 |
up42-order:id: a6e2259d-c90c-45c5-8c3d-b104b8e9e7de |
up42-system:asset_id: 55434287-31bc-3ad7-1a63-d61aac11ac55 |
up42-product:modality: multispectral |
up42-system:account_id: 3c86279b-610a-4dba-ad12-abe3bdc51428 |
up42-system:workspace_id: 68567134-27ad-7bd7-4b65-d61adb11fc78 |
up42-product:product_id: c3de9ed8-f6e5-4bb5-a157-f6430ba756da |
STAC Extensions
Items
Only the first item shown
Item: 62b6aa53-53f6-4e4a-92c3-991ce391c13c
id: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
bbox: [11.927835243788259, 52.17549424226928, 13.6341671437856, 53.21198351848647] |
gsd: 10.0 |
title: S2A_32UQD_20230426_0_L2A |
created: 2023-04-26T19:58:48.287Z |
updated: 2023-04-26T19:58:48.287Z |
datetime: 2023-04-26T10:26:11+00:00 |
platform: sentinel-2a |
proj:epsg: 32632 |
providers: [{'url': 'https://www.up42.com', 'name': 'UP42', 'roles': ['host']}, {'url': 'https://www.esa.int/', 'name': 'ESA', 'roles': ['producer']}] |
instruments: ['msi'] |
end_datetime: 2023-04-26T10:26:11+00:00 |
constellation: sentinel-2 |
up42-order:id: a6e2259d-c90c-45c5-8c3d-b104b8e9e7de |
eo:cloud_cover: 88.99 |
start_datetime: 2023-04-26T10:26:11+00:00 |
up42-user:tags: [] |
view:off_nadir: 0 |
up42-user:title: earthsearch-aws_a6e2259d-c90c-45c5-8c3d-b104b8e9e7de.zip |
view:sun_azimuth: 164.559769467917 |
sentinel:sequence: 0 |
sentinel:utm_zone: 32 |
up42-system:source: ARCHIVE |
view:sun_elevation: 40.02115848896 |
sentinel:product_id: S2A_MSIL2A_20230426T101601_N0509_R065_T32UQD_20230426T162055 |
sentinel:grid_square: QD |
up42-system:asset_id: 55434287-31bc-3ad7-1a63-d61aac11ac55 |
up42-product:modality: multispectral |
sentinel:data_coverage: 100 |
sentinel:latitude_band: U |
up42-product:data_type: raster |
up42-system:account_id: 3c86279b-610a-4dba-ad12-abe3bdc51428 |
up42-product:product_id: c3de9ed8-f6e5-4bb5-a157-f6430ba756da |
up42-system:workspace_id: 68567134-27ad-7bd7-4b65-d61adb11fc78 |
sentinel:valid_cloud_cover: True |
sentinel:boa_offset_applied: True |
sentinel:processing_baseline: 05.09 |
up42-product:collection_name: sentinel-2 |
up42-system:metadata_version: 0.0.14 |
STAC Extensions
Assets
Asset: Aerosol Optical Thickness (AOT)
href: https://api.up42.com/v2/assets/b1abf750-fc48-47de-9c09-6383dfa93cf5 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Aerosol Optical Thickness (AOT) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:transform: [60, 0, 699960, 0, -60, 5900040, 0, 0, 1] |
proj:shape: [1830, 1830] |
Asset: Coastal aerosol (band 1)
href: https://api.up42.com/v2/assets/062b867c-ce82-47b6-b0d8-5b55244ed78f |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Coastal aerosol (band 1) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 60 |
eo:bands: [{'name': 'B01', 'common_name': 'coastal', 'center_wavelength': 0.4439, 'full_width_half_max': 0.027}] |
proj:transform: [60, 0, 699960, 0, -60, 5900040, 0, 0, 1] |
proj:shape: [1830, 1830] |
Asset: Blue (band 2)
href: https://api.up42.com/v2/assets/0ce814bd-97c5-439b-9b31-9b9730835b79 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Blue (band 2) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 10 |
eo:bands: [{'name': 'B02', 'common_name': 'blue', 'center_wavelength': 0.4966, 'full_width_half_max': 0.098}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
proj:shape: [10980, 10980] |
Asset: Green (band 3)
href: https://api.up42.com/v2/assets/fca27f19-9eee-436b-bae4-900772081909 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Green (band 3) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 10 |
eo:bands: [{'name': 'B03', 'common_name': 'green', 'center_wavelength': 0.56, 'full_width_half_max': 0.045}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
proj:shape: [10980, 10980] |
Asset: Red (band 4)
href: https://api.up42.com/v2/assets/87a424c0-c8bc-460a-952a-b4820b41307c |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red (band 4) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 10 |
eo:bands: [{'name': 'B04', 'common_name': 'red', 'center_wavelength': 0.6645, 'full_width_half_max': 0.038}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
proj:shape: [10980, 10980] |
Asset: Red edge 1 (band 5)
href: https://api.up42.com/v2/assets/831feba9-d753-41c8-92e3-a6295a4ae423 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red edge 1 (band 5) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 20 |
eo:bands: [{'name': 'B05', 'common_name': 'rededge', 'center_wavelength': 0.7039, 'full_width_half_max': 0.019}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: Red edge 2 (band 6)
href: https://api.up42.com/v2/assets/c2690881-46b3-49dd-92d5-e10ccfca2b03 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red edge 2 (band 6) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 20 |
eo:bands: [{'name': 'B06', 'common_name': 'rededge', 'center_wavelength': 0.7402, 'full_width_half_max': 0.018}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: Red edge 3 (band 7)
href: https://api.up42.com/v2/assets/d790d89c-e95d-4c97-b437-c7207e0a409e |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red edge 3 (band 7) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 20 |
eo:bands: [{'name': 'B07', 'common_name': 'rededge', 'center_wavelength': 0.7825, 'full_width_half_max': 0.028}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: NIR 1 (band 8)
href: https://api.up42.com/v2/assets/f6dda6de-0da8-4907-9a33-d6685d3a36a1 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: NIR 1 (band 8) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 10 |
eo:bands: [{'name': 'B08', 'common_name': 'nir', 'center_wavelength': 0.8351, 'full_width_half_max': 0.145}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
proj:shape: [10980, 10980] |
Asset: NIR 3 (band 9)
href: https://api.up42.com/v2/assets/b9838515-d3e4-4f8c-a969-b337dd1b3eec |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: NIR 3 (band 9) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 60 |
eo:bands: [{'name': 'B09', 'common_name': 'nir09', 'center_wavelength': 0.945, 'full_width_half_max': 0.026}] |
proj:transform: [60, 0, 699960, 0, -60, 5900040, 0, 0, 1] |
proj:shape: [1830, 1830] |
Asset: SWIR 1 (band 11)
href: https://api.up42.com/v2/assets/ab7c0bad-6419-4967-bf84-e9719cebb56d |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: SWIR 1 (band 11) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 20 |
eo:bands: [{'name': 'B11', 'common_name': 'swir16', 'center_wavelength': 1.6137, 'full_width_half_max': 0.143}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: SWIR 2 (band 12)
href: https://api.up42.com/v2/assets/b0623eb6-d968-4f9a-baad-f151becffec4 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: SWIR 2 (band 12) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 20 |
eo:bands: [{'name': 'B12', 'common_name': 'swir22', 'center_wavelength': 2.22024, 'full_width_half_max': 0.242}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: NIR 2 (band 8A)
href: https://api.up42.com/v2/assets/e59c7471-1f01-4f76-9fd8-de4a4d27d6cb |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: NIR 2 (band 8A) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 20 |
eo:bands: [{'name': 'B8A', 'common_name': 'nir08', 'center_wavelength': 0.8648, 'full_width_half_max': 0.033}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: Scene classification map
href: https://api.up42.com/v2/assets/3e6482a9-c1d2-4ccd-a1ae-2ec26cc7f664 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Scene classification map |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
proj:shape: [5490, 5490] |
Asset: True Color Visual
href: https://api.up42.com/v2/assets/934fa4e0-0368-4c5e-a39b-dfae51113bad |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: True Color Visual |
roles: ['visual', 'data', 'multispectral'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 10 |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
proj:shape: [10980, 10980] |
Asset: Water Vapor Permeability
href: https://api.up42.com/v2/assets/54e21c05-28e4-4fca-81ab-bcab6699a708 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Water Vapor Permeability |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
proj:shape: [10980, 10980] |
Asset: True color overview
href: https://api.up42.com/v2/assets/b018818f-6289-4dbc-bdad-08d104a83111 |
type: image/png |
title: True color overview |
roles: ['overview'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Asset: Perpendicular vegetation index
href: https://api.up42.com/v2/assets/730b5e05-23d5-4498-afc8-6bfaaa27f9d9 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Perpendicular vegetation index |
roles: ['data', 'index'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
gsd: 10 |
proj:transform: [320, 0, 699960, 0, -320, 5900040, 0, 0, 1] |
proj:shape: [343, 343] |
Asset: Delivery Metadata
href: https://api.up42.com/v2/assets/0b6d6117-e6fe-4b3d-ae5b-24b2f21aa0d6 |
type: application/xml |
title: Delivery Metadata |
roles: ['metadata'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Asset: STAC metadata
href: https://api.up42.com/v2/assets/d68dad0e-b8f7-402f-9088-2e00fe2ff701 |
type: application/geo+json |
title: STAC metadata |
roles: ['metadata', 'stac'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Asset: Tile info metadata
href: https://api.up42.com/v2/assets/9fd67f51-6c6d-480b-9526-8caf1d78275c |
type: application/json |
title: Tile info metadata |
roles: ['metadata', 'tile-info'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Links
Link:
rel: self |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341/items/62b6aa53-53f6-4e4a-92c3-991ce391c13c |
type: application/geo+json |
Link:
rel: parent |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
type: application/json |
Link:
rel: collection |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
type: application/json |
Link:
rel: root |
href: https://api.up42.com/v2/assets/stac/ |
type: application/json |
Links
Link:
rel: self |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
type: application/json |
Link:
rel: parent |
href: https://api.up42.com/v2/assets/stac/ |
type: application/json |
Link:
rel: items |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341/items |
type: application/geo+json |
Link: UP42 Storage
rel: root |
href: https://api.up42.com/v2/assets/stac |
type: application/json |
title: UP42 Storage |
Assets
Asset: Original Delivery
href: https://api.up42.com/v2/assets/55434287-31bc-3ad7-1a63-d61aac11ac55 |
type: application/zip |
title: Original Delivery |
roles: ['data', 'original'] |
owner: 2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
Step 3. Get STAC items¶
Retrieve STAC items associated with the specified UP42 asset. A STAC item is an individual scene that represents inseparable data and metadata. A STAC item has a unique spatiotemporal extent, that is, has one AOI and acquisition time in its characteristics.
asset.stac_items
ItemCollection
Items
Item: 62b6aa53-53f6-4e4a-92c3-991ce391c13c
id: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
bbox: [11.927835243788259, 52.17549424226928, 13.6341671437856, 53.21198351848647] |
gsd: 10.0 |
title: S2A_32UQD_20230426_0_L2A |
created: 2023-04-26T19:58:48.287Z |
updated: 2023-04-26T19:58:48.287Z |
datetime: 2023-04-26T10:26:11+00:00 |
platform: sentinel-2a |
proj:epsg: 32632 |
providers: [{'url': 'https://www.up42.com', 'name': 'UP42', 'roles': ['host']}, {'url': 'https://www.esa.int/', 'name': 'ESA', 'roles': ['producer']}] |
instruments: ['msi'] |
end_datetime: 2023-04-26T10:26:11+00:00 |
constellation: sentinel-2 |
up42-order:id: a6e2259d-c90c-45c5-8c3d-b104b8e9e7de |
eo:cloud_cover: 88.99 |
start_datetime: 2023-04-26T10:26:11+00:00 |
up42-user:tags: [] |
view:off_nadir: 0 |
up42-user:title: earthsearch-aws_a6e2259d-c90c-45c5-8c3d-b104b8e9e7de.zip |
view:sun_azimuth: 164.559769467917 |
sentinel:sequence: 0 |
sentinel:utm_zone: 32 |
up42-system:source: ARCHIVE |
view:sun_elevation: 40.02115848896 |
sentinel:product_id: S2A_MSIL2A_20230426T101601_N0509_R065_T32UQD_20230426T162055 |
sentinel:grid_square: QD |
up42-system:asset_id: 55434287-31bc-3ad7-1a63-d61aac11ac55 |
up42-product:modality: multispectral |
sentinel:data_coverage: 100 |
sentinel:latitude_band: U |
up42-product:data_type: raster |
up42-system:account_id: 3c86279b-610a-4dba-ad12-abe3bdc51428 |
up42-product:product_id: c3de9ed8-f6e5-4bb5-a157-f6430ba756da |
up42-system:workspace_id: 68567134-27ad-7bd7-4b65-d61adb11fc78 |
sentinel:valid_cloud_cover: True |
sentinel:boa_offset_applied: True |
sentinel:processing_baseline: 05.09 |
up42-product:collection_name: sentinel-2 |
up42-system:metadata_version: 0.0.14 |
STAC Extensions
Assets
Asset: Aerosol Optical Thickness (AOT)
href: https://api.up42.com/v2/assets/b1abf750-fc48-47de-9c09-6383dfa93cf5 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Aerosol Optical Thickness (AOT) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [1830, 1830] |
proj:transform: [60, 0, 699960, 0, -60, 5900040, 0, 0, 1] |
Asset: Coastal aerosol (band 1)
href: https://api.up42.com/v2/assets/062b867c-ce82-47b6-b0d8-5b55244ed78f |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Coastal aerosol (band 1) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [1830, 1830] |
gsd: 60 |
eo:bands: [{'name': 'B01', 'common_name': 'coastal', 'center_wavelength': 0.4439, 'full_width_half_max': 0.027}] |
proj:transform: [60, 0, 699960, 0, -60, 5900040, 0, 0, 1] |
Asset: Blue (band 2)
href: https://api.up42.com/v2/assets/0ce814bd-97c5-439b-9b31-9b9730835b79 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Blue (band 2) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [10980, 10980] |
gsd: 10 |
eo:bands: [{'name': 'B02', 'common_name': 'blue', 'center_wavelength': 0.4966, 'full_width_half_max': 0.098}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
Asset: Green (band 3)
href: https://api.up42.com/v2/assets/fca27f19-9eee-436b-bae4-900772081909 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Green (band 3) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [10980, 10980] |
gsd: 10 |
eo:bands: [{'name': 'B03', 'common_name': 'green', 'center_wavelength': 0.56, 'full_width_half_max': 0.045}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
Asset: Red (band 4)
href: https://api.up42.com/v2/assets/87a424c0-c8bc-460a-952a-b4820b41307c |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red (band 4) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [10980, 10980] |
gsd: 10 |
eo:bands: [{'name': 'B04', 'common_name': 'red', 'center_wavelength': 0.6645, 'full_width_half_max': 0.038}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
Asset: Red edge 1 (band 5)
href: https://api.up42.com/v2/assets/831feba9-d753-41c8-92e3-a6295a4ae423 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red edge 1 (band 5) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
gsd: 20 |
eo:bands: [{'name': 'B05', 'common_name': 'rededge', 'center_wavelength': 0.7039, 'full_width_half_max': 0.019}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: Red edge 2 (band 6)
href: https://api.up42.com/v2/assets/c2690881-46b3-49dd-92d5-e10ccfca2b03 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red edge 2 (band 6) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
gsd: 20 |
eo:bands: [{'name': 'B06', 'common_name': 'rededge', 'center_wavelength': 0.7402, 'full_width_half_max': 0.018}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: Red edge 3 (band 7)
href: https://api.up42.com/v2/assets/d790d89c-e95d-4c97-b437-c7207e0a409e |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Red edge 3 (band 7) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
gsd: 20 |
eo:bands: [{'name': 'B07', 'common_name': 'rededge', 'center_wavelength': 0.7825, 'full_width_half_max': 0.028}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: NIR 1 (band 8)
href: https://api.up42.com/v2/assets/f6dda6de-0da8-4907-9a33-d6685d3a36a1 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: NIR 1 (band 8) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [10980, 10980] |
gsd: 10 |
eo:bands: [{'name': 'B08', 'common_name': 'nir', 'center_wavelength': 0.8351, 'full_width_half_max': 0.145}] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
Asset: NIR 3 (band 9)
href: https://api.up42.com/v2/assets/b9838515-d3e4-4f8c-a969-b337dd1b3eec |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: NIR 3 (band 9) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [1830, 1830] |
gsd: 60 |
eo:bands: [{'name': 'B09', 'common_name': 'nir09', 'center_wavelength': 0.945, 'full_width_half_max': 0.026}] |
proj:transform: [60, 0, 699960, 0, -60, 5900040, 0, 0, 1] |
Asset: SWIR 1 (band 11)
href: https://api.up42.com/v2/assets/ab7c0bad-6419-4967-bf84-e9719cebb56d |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: SWIR 1 (band 11) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
gsd: 20 |
eo:bands: [{'name': 'B11', 'common_name': 'swir16', 'center_wavelength': 1.6137, 'full_width_half_max': 0.143}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: SWIR 2 (band 12)
href: https://api.up42.com/v2/assets/b0623eb6-d968-4f9a-baad-f151becffec4 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: SWIR 2 (band 12) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
gsd: 20 |
eo:bands: [{'name': 'B12', 'common_name': 'swir22', 'center_wavelength': 2.22024, 'full_width_half_max': 0.242}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: NIR 2 (band 8A)
href: https://api.up42.com/v2/assets/e59c7471-1f01-4f76-9fd8-de4a4d27d6cb |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: NIR 2 (band 8A) |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
gsd: 20 |
eo:bands: [{'name': 'B8A', 'common_name': 'nir08', 'center_wavelength': 0.8648, 'full_width_half_max': 0.033}] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: Scene classification map
href: https://api.up42.com/v2/assets/3e6482a9-c1d2-4ccd-a1ae-2ec26cc7f664 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Scene classification map |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [5490, 5490] |
proj:transform: [20, 0, 699960, 0, -20, 5900040, 0, 0, 1] |
Asset: True Color Visual
href: https://api.up42.com/v2/assets/934fa4e0-0368-4c5e-a39b-dfae51113bad |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: True Color Visual |
roles: ['visual', 'data', 'multispectral'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [10980, 10980] |
gsd: 10 |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
Asset: Water Vapor Permeability
href: https://api.up42.com/v2/assets/54e21c05-28e4-4fca-81ab-bcab6699a708 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Water Vapor Permeability |
roles: ['data'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [10980, 10980] |
proj:transform: [10, 0, 699960, 0, -10, 5900040, 0, 0, 1] |
Asset: True color overview
href: https://api.up42.com/v2/assets/b018818f-6289-4dbc-bdad-08d104a83111 |
type: image/png |
title: True color overview |
roles: ['overview'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Asset: Perpendicular vegetation index
href: https://api.up42.com/v2/assets/730b5e05-23d5-4498-afc8-6bfaaa27f9d9 |
type: image/tiff; application=geotiff; profile=cloud-optimized |
title: Perpendicular vegetation index |
roles: ['data', 'index'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
proj:shape: [343, 343] |
gsd: 10 |
proj:transform: [320, 0, 699960, 0, -320, 5900040, 0, 0, 1] |
Asset: Delivery Metadata
href: https://api.up42.com/v2/assets/0b6d6117-e6fe-4b3d-ae5b-24b2f21aa0d6 |
type: application/xml |
title: Delivery Metadata |
roles: ['metadata'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Asset: STAC metadata
href: https://api.up42.com/v2/assets/d68dad0e-b8f7-402f-9088-2e00fe2ff701 |
type: application/geo+json |
title: STAC metadata |
roles: ['metadata', 'stac'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Asset: Tile info metadata
href: https://api.up42.com/v2/assets/9fd67f51-6c6d-480b-9526-8caf1d78275c |
type: application/json |
title: Tile info metadata |
roles: ['metadata', 'tile-info'] |
owner: 62b6aa53-53f6-4e4a-92c3-991ce391c13c |
Links
Link:
rel: self |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341/items/62b6aa53-53f6-4e4a-92c3-991ce391c13c |
type: application/geo+json |
Link:
rel: parent |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
type: application/json |
Link:
rel: collection |
href: https://api.up42.com/v2/assets/stac/collections/2ef4a8a3-c6a7-43a6-96ce-2d881a124341 |
type: application/json |
Link: UP42 Storage
rel: root |
href: https://api.up42.com/v2/assets/stac |
type: application/json |
title: UP42 Storage |
Step 4. Get STAC assets¶
Retrieve STAC assets associated with the specified UP42 asset. A STAC asset is a geospatial feature of a STAC item. For example, bands in an optical image, thumbnails, and metadata files represent different STAC assets.
stac_items = asset.stac_items.items
stac_assets = stac_items[0].assets
print(stac_assets)
{'aot.tiff': <Asset href=https://api.up42.com/v2/assets/b1abf750-fc48-47de-9c09-6383dfa93cf5>, 'b01.tiff': <Asset href=https://api.up42.com/v2/assets/062b867c-ce82-47b6-b0d8-5b55244ed78f>, 'b02.tiff': <Asset href=https://api.up42.com/v2/assets/0ce814bd-97c5-439b-9b31-9b9730835b79>, 'b03.tiff': <Asset href=https://api.up42.com/v2/assets/fca27f19-9eee-436b-bae4-900772081909>, 'b04.tiff': <Asset href=https://api.up42.com/v2/assets/87a424c0-c8bc-460a-952a-b4820b41307c>, 'b05.tiff': <Asset href=https://api.up42.com/v2/assets/831feba9-d753-41c8-92e3-a6295a4ae423>, 'b06.tiff': <Asset href=https://api.up42.com/v2/assets/c2690881-46b3-49dd-92d5-e10ccfca2b03>, 'b07.tiff': <Asset href=https://api.up42.com/v2/assets/d790d89c-e95d-4c97-b437-c7207e0a409e>, 'b08.tiff': <Asset href=https://api.up42.com/v2/assets/f6dda6de-0da8-4907-9a33-d6685d3a36a1>, 'b09.tiff': <Asset href=https://api.up42.com/v2/assets/b9838515-d3e4-4f8c-a969-b337dd1b3eec>, 'b11.tiff': <Asset href=https://api.up42.com/v2/assets/ab7c0bad-6419-4967-bf84-e9719cebb56d>, 'b12.tiff': <Asset href=https://api.up42.com/v2/assets/b0623eb6-d968-4f9a-baad-f151becffec4>, 'b8a.tiff': <Asset href=https://api.up42.com/v2/assets/e59c7471-1f01-4f76-9fd8-de4a4d27d6cb>, 'scl.tiff': <Asset href=https://api.up42.com/v2/assets/3e6482a9-c1d2-4ccd-a1ae-2ec26cc7f664>, 'tci.tiff': <Asset href=https://api.up42.com/v2/assets/934fa4e0-0368-4c5e-a39b-dfae51113bad>, 'wvp.tiff': <Asset href=https://api.up42.com/v2/assets/54e21c05-28e4-4fca-81ab-bcab6699a708>, 'preview.jpg': <Asset href=https://api.up42.com/v2/assets/b018818f-6289-4dbc-bdad-08d104a83111>, 'l2a_pvi.tiff': <Asset href=https://api.up42.com/v2/assets/730b5e05-23d5-4498-afc8-6bfaaa27f9d9>, 'metadata.xml': <Asset href=https://api.up42.com/v2/assets/0b6d6117-e6fe-4b3d-ae5b-24b2f21aa0d6>, 'stac.geojson': <Asset href=https://api.up42.com/v2/assets/d68dad0e-b8f7-402f-9088-2e00fe2ff701>, 'tileinfo.json': <Asset href=https://api.up42.com/v2/assets/9fd67f51-6c6d-480b-9526-8caf1d78275c>}
Step 5. Download STAC assets¶
Use the name of the chosen STAC asset to download it.
asset.download_stac_asset(
stac_assets.get(
"b01.tiff",
"/Users/max.mustermann/Desktop/"
)
)