Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tilebox.com/llms.txt

Use this file to discover all available pages before exploring further.

If you already know the ID of the datapoint you want to query, you can fetch it directly without needing to construct and execute a broader query. You can query a datapoint ID either in only specific collection of a dataset, a selected set of collections of a dataset, or from all collections of a dataset at once.
datapoint_id = "0197a491-1520-102f-48f4-f087d6ef8603"

# query in all collections of a dataset
datapoint = dataset.find(datapoint_id)

# query in selected collections of a dataset
datapoint = dataset.find(
    datapoint_id,
    collections=["S2A_S2MSI2A", "S2B_S2MSI2A"],
)

# query in a single collection
datapoint = dataset.collection("S2A_S2MSI2A").find(
    datapoint_id
)

print(datapoint)
Output
<xarray.Dataset> Size: 443B
Dimensions:                ()
Coordinates:
    time                   datetime64[ns] 8B 2025-06-25T00:51:01.024000
Data variables: (12/23)
    id                     <U36 144B '0197a491-1520-102f-48f4-f087d6ef8603'
    ingestion_time         datetime64[ns] 8B 2025-06-25T05:33:11.104000
    geometry               object 8B POLYGON ((156.090908 48.709728, 155.7188...
    granule_name           object 8B 'S2A_MSIL2A_20250625T005101_N0511_R045_T...
    processing_level       uint8 1B 5
    product_type           object 8B 'S2MSI2A'
    ...                     ...
    thumbnail              object 8B 'https://catalogue.dataspace.copernicus....
    cloud_cover            float64 8B 87.38
    resolution             int64 8B 0
    flight_direction       uint8 1B 2
    acquisition_mode       uint8 1B 20
    mission_take_id        object 8B 'GS2A_20250625T005101_052266_N05.11'
You can also set the skip_data parameter when calling find to query only the required fields of the data point, same as for query.

Checking if a datapoint exists

find returns an error if the specified datapoint does not exist. You can use this to check if a datapoint exists or not.
from tilebox.datasets.sync.dataset import NotFoundError

datapoint_id = "0197a47f-a830-1160-6df5-61ac723dae17"  # doesn't exist

try:
    dataset.find(datapoint_id)
    exists = True
except NotFoundError:
    exists = False