The glossary provides information on UP42 data offerings. It helps you create orders.
Collections serve as the higher-level category, containing one or more data products related to the actual configuration of data available for ordering.
View repositoryA data class that represents product glossary in the system.
Methods
Retrieves a list of geospatial collections. Returns Iterator[Collection]. Use itertools.islice to offset and limit the results.
| Parameter | Description |
|---|---|
collection_type | Optional[CollectionType] The type of the collection. |
sort_by | Optional[utils.SortingField] The results sorting method that arranges elements in ascending or descending order based on a chosen field. |
# Fetch collectionstasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
# Define output9 collapsed lines
print(f"Tasking collections")for collection in tasking_collections: print(f" {collection.title}: {collection.name}") print(f" {collection.description}\n")
print(f"Catalog collections")for collection in archive_collections: print(f" {collection.title}: {collection.name}") print(f" {collection.description}\n")A data class that represents a collection in the system.
Attributes
| Attribute | Description |
|---|---|
name | str The name of the collection. |
title | str The title of the collection. |
description | str The description of the collection. |
type | CollectionType The type of the collection. |
integrations | list[IntegrationValue] |
providers | list[Provider] Providers. |
data_products | list[DataProduct] Data products. |
metadata | Optional[CollectionMetadata] The collection metadata. |
from itertools import chain
# Fetch collections11 collapsed lines
tasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
all_collections = chain(tasking_collections, archive_collections)
# Define outputfor collection in all_collections: print(f"- Title: {collection.title}") print(f" Name: {collection.name}") print(f" Description: {collection.description}") print(f" Type: {collection.type.value}") print(" Integrations:") for integration in collection.integrations: print(f" {integration}") print(" Providers:") for provider in collection.providers: print(f" {provider.name} ({', '.join(provider.roles)})") print(" Data products:") for product in collection.data_products: print(f" - Title: {product.title}") print(f" Name: {product.name}") print(f" ID: {product.id}") print(" Metadata:") print(f" Product type: {collection.metadata.product_type}") print(f" Resolution class: {collection.metadata.resolution_class}") print(f" Min resolution: {collection.metadata.resolution_value.minimum} m") if collection.metadata.resolution_value.maximum: print(f" Max resolution: {collection.metadata.resolution_value.maximum} m") print()An enumeration class that defines types of geospatial collections.
Constants
| Constant | Description | Value |
|---|---|---|
ARCHIVE | str A catalog collection. Scenes from catalog collections are available for immediate purchase. | ARCHIVE |
TASKING | str A tasking collection. Tasking is requesting a satellite or an aircraft to capture your designated area of interest. | TASKING |
# Fetch collectionstasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
# Define output9 collapsed lines
print(f"Tasking collections")for collection in tasking_collections: print(f" {collection.title}: {collection.name}") print(f" {collection.description}\n")
print(f"Catalog collections")for collection in archive_collections: print(f" {collection.title}: {collection.name}") print(f" {collection.description}\n")A class that provides sorting options for collections.
Attributes
| Attribute | Description |
|---|---|
name | utils.SortingField Sorts by collection name. The default order is ascending. |
title | utils.SortingField Sorts by collection title. The default order is ascending. |
description | utils.SortingField Sorts by collection description. The default order is ascending. |
type | utils.SortingField Sorts by collection type. The default order is ascending. |
tasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
for collection in tasking_collections: print(f"{collection.name}")A data class that contains metadata related to a collection.
Attributes
| Attribute | Description |
|---|---|
product_type | Optional[Literal[“OPTICAL”, “SAR”, “ELEVATION”]] The type of product the collection delivers. |
resolution_class | Optional[Literal[“VERY_HIGH”, “HIGH”, “MEDIUM”, “LOW”]] The nominal resolution class. |
resolution_value | Optional[ResolutionValue] The level of detail achievable for the collection. |
from itertools import chain
# Fetch collections11 collapsed lines
tasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
all_collections = chain(tasking_collections, archive_collections)
# Define outputfor collection in all_collections: print(f"- Title: {collection.title}") print(f" Name: {collection.name}") print(" Metadata:") print(f" Product type: {collection.metadata.product_type}") print(f" Resolution class: {collection.metadata.resolution_class}") print(f" Min resolution: {collection.metadata.resolution_value.minimum} m") if collection.metadata.resolution_value.maximum: print(f" Max resolution: {collection.metadata.resolution_value.maximum} m") print()A data class that represents the resolution of data within a collection.
Attributes
| Attribute | Description |
|---|---|
minimum | float The best native resolution available for the collection, in meters. |
maximum | Optional[float] The least detailed resolution available for the collection, in meters. The parameter is omitted if the collection has only one resolution value, specified in |
from itertools import chain
# Fetch collections11 collapsed lines
tasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
all_collections = chain(tasking_collections, archive_collections)
# Define outputfor collection in all_collections: print(f"- Title: {collection.title}") print(f" Name: {collection.name}") print(" Metadata:") print(f" Product type: {collection.metadata.product_type}") print(f" Resolution class: {collection.metadata.resolution_class}") print(f" Min resolution: {collection.metadata.resolution_value.minimum} m") if collection.metadata.resolution_value.maximum: print(f" Max resolution: {collection.metadata.resolution_value.maximum} m") print()A data class that represents a provider in the system.
Attributes
| Attribute | Description |
|---|---|
name | str The name of the provider. |
title | str The title of the provider. The default value is an empty string. |
description | str The description of the provider. The default value is an empty string. |
roles | list[Literal[“PRODUCER”, “HOST”]] Provider roles:
The default value is |
# Fetch catalog collectionsarchive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
# Define output, return hosts and producers by collectionfor collection in archive_collections: print(f"- Title: {collection.title}") print(f" Name: {collection.name}") print(" Providers:") for provider in collection.providers: print(f" {provider.name} ({', '.join(provider.roles)})") print()Properties
Checks if the provider has the HOST role. Returns bool.
# Fetch catalog collectionsarchive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
# Define output, return only providers who are hostsfor collection in archive_collections: print(f"- Title: {collection.title}") print(f" Name: {collection.name}") for provider in collection.providers: if getattr(provider, "is_host", False): print(f" Host: {provider.name}") print()Methods
Searches the catalog and retrieves scenes. Returns Iterator[Scene]. Use itertools.islice to offset and limit the results.
| Parameter | Description |
|---|---|
bbox | Optional[BoundingBox] A search geometry in the GeoJSON format. Returns images that intersect with the defined rectangle and may not fully cover it. Use only if |
intersects | Optional[geojson.Polygon] A polygon in the GeoJSON format. |
start_date | Optional[str] Search for full scenes that were acquired after the given start date, in the |
end_date | Optional[str] Search for full scenes that were acquired before the given end date, in the |
query | Optional[dict] A STAC query object. |
collections | Optional[list[str]] The names of the collections whose full scenes you want to include in search results. |
import pandas as pdimport geojsonfrom itertools import islice
# Select the hosthost = "oneatlas"
# Fetch catalog collections7 collapsed lines
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
# Find the provider matching the host name that's marked as a hosthost_provider = next((p for c in archive_collections for p in c.providers if p.name == host and getattr(p, "is_host", False)), None)
# Define search geometry13 collapsed lines
geometry = { "type": "Polygon", "coordinates": [[ [13.369713, 52.452327], [13.369713, 52.470760], [13.339159, 52.470760], [13.339159, 52.452327], [13.369713, 52.452327] ]]}
# Wrap the geometry into a GeoJSON FeatureCollectionfeatures = geojson.FeatureCollection(features=[geojson.Feature(geometry=geometry)])
# Search for scenes using the hostscenes = host_provider.search( collections=["SPOT", "phr"], intersects=geometry, start_date="2022-06-01", end_date="2022-12-31", query={ "cloudCoverage": {"LT": 20} })
# Define output, return found scenes and their detailsscene_ids = [scene.id for scene in islice(scenes, 0, 5)] # Print first 5 resultsprint(f"Displaying the first {len(scene_ids)} scenes found.")
# Display the tabledf = pd.DataFrame(scene_ids, columns=["Scene ID"])display(df)A data class that represents a scene in the system.
Attributes
| Attribute | Description |
|---|---|
id | str The scene ID. |
bbox | Optional[BoundingBox] The bounding box. |
geometry | Union[geojson.Polygon, geojson.MultiPolygon] The geometry in the GeoJSON format. |
datetime | Optional[str] The date and time when the sensor acquired the data. |
start_datetime | Optional[str] The date and time when the sensor started the acquisition process. |
end_datetime | Optional[str] The date and time when the sensor finished the acquisition process. |
constellation | str The name of the sensor. |
collection | str The name of the collection. |
cloud_coverage | Optional[float] The percentage of cloud coverage. |
resolution | Optional[float] The nominal resolution, in meters. |
delivery_time | Optional[Literal[“MINUTES”, “HOURS”, “DAYS”]] The unit of data delivery time. |
producer | str The name of the producer. Data producers are companies that initially acquired and processed the source data. Data acquired by a producer can be distributed to various hosts. |
quicklook | utils.ImageFile The quicklook file. Quicklooks are low-resolution scene previews. |
provider_properties | dict Additional properties returned by the provider. |
import geojsonfrom itertools import islice
# Select the hosthost = "oneatlas"
# Fetch catalog collections15 collapsed lines
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
# Find the provider matching the selected host name that's marked as a hosthost_provider = next( ( p for c in archive_collections for p in c.providers if p.name == host and getattr(p, "is_host", False) ), None,)
# Define search geometry15 collapsed lines
geometry = { "type": "Polygon", "coordinates": [ [ [13.369713, 52.452327], [13.369713, 52.470760], [13.339159, 52.470760], [13.339159, 52.452327], [13.369713, 52.452327], ] ],}
# Wrap the geometry into a GeoJSON FeatureCollectionfeatures = geojson.FeatureCollection(features=[geojson.Feature(geometry=geometry)])
# Search for scenes using the hostscenes = host_provider.search( collections=["SPOT", "phr"], intersects=geometry, start_date="2022-06-01", end_date="2022-12-31", query={"cloudCoverage": {"LT": 20}},)
# Define outputfor scene in islice(scenes, 0, 5): # Print first 5 results print(f"- Scene ID: {scene.id}") print(f" Bounding box: {scene.bbox}") print(f" Geometry: {scene.geometry}") print(f" Acquisition date and time: {scene.datetime}") print(f" Acquisition start: {scene.start_datetime}") print(f" Acquisition end: {scene.end_datetime}") print(f" Constellation: {scene.constellation}") print(f" Collection: {scene.collection}") print(f" Cloud coverage: {scene.cloud_coverage}%") print(f" Resolution: {scene.resolution} m") print(f" Delivery time: {scene.delivery_time}") print(f" Producer: {scene.producer}") print(f" Quicklook: {scene.quicklook}\n")A data class that represents a data product in the system.
Attributes
| Attribute | Description |
|---|---|
name | str The data product name. |
title | str The title of the data product. |
description | str The description of the data product. |
id | Optional[str] The data product ID. |
eula_id | Optional[str] The EULA ID. |
from itertools import chain
# Fetch collections18 collapsed lines
tasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
all_collections = chain(tasking_collections, archive_collections)
# Create a single generator for all data productsall_products = ( product for collection in all_collections for product in collection.data_products)
# Define outputdef print_product_info(product): print(f"Name: {product.name}") print(f"Title: {product.title}") print(f"Description: {(product.description or '').replace(chr(10), ' ').strip()}") print(f"ID: {product.id}") print(f"EULA ID: {product.eula_id}\n")
# Print information for data productsfor product in all_products: print_product_info(product)Properties
Retrieves the schema of the data product. Returns Optional[dict].
from itertools import chain
# Select a data productdata_product_name="sentinel-2-level-2a"
# Fetch collections11 collapsed lines
tasking_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.TASKING, sort_by = up42.CollectionSorting.name.asc,)
archive_collections = up42.ProductGlossary.get_collections( collection_type = up42.CollectionType.ARCHIVE, sort_by = up42.CollectionSorting.name.asc,)
all_collections = chain(tasking_collections, archive_collections)
# Retrieve the first matching data product's schemaschema = Noneall_products = ( product for collection in all_collections for product in collection.data_products)
# Look up the schema for the selected data productfor product in all_products: if product.name == data_product_name: schema = product.schema breakschema