Skip to main content

Build a spatio-temporal catalog

Learn how to create a custom dataset catalog with the Python SDK.

Ingest into a spatio-temporal catalog

Learn how to ingest GeoParquet metadata into an existing spatio-temporal catalog.

Dataset types

Each dataset is of a specific type. Each dataset type comes with a set of required fields for each data point. The dataset type also determines the query capabilities for a dataset, for example, whether a dataset supports time-based queries or additionally also spatially filtered queries. To find out which fields are required for each dataset type check out the documentation for the available dataset types below.

Timeseries Data

Each data point is linked to a specific point in time. Common for satellite telemetry, or other time-based data. Supports efficient time-based queries.

Spatio-temporal Data

Each data point is linked to a specific point in time and a location on the Earth’s surface. Common for satellite imagery. Supports efficient time-based and spatially filtered queries.

Dataset specific fields

Additionally, each dataset has a set of fields that are specific to that dataset. Fields are defined during dataset creation. That way, all data points in a dataset are strongly typed and are validated during ingestion. The required fields of the dataset type, as well as the custom fields specific to each dataset together make up the dataset schema. Once a dataset schema is defined, existing fields cannot be removed or edited as soon as data has been ingested into it. You can add new non-queryable fields to a non-empty dataset because all custom fields are optional. You cannot add a new queryable field or change whether an existing field is queryable after ingesting data.
Empty datasets are the exception. If all collections are empty, you can freely edit the data schema and its queryable field annotations because no existing datapoints can conflict with the change.

Field types

When defining the data schema, you can specify each field’s type. The following field types are supported.

Primitives

Time

Identifier

Geospatial

STAC metadata

Structured STAC types preserve common metadata without flattening it into separate custom fields. In Python, import these types from tilebox.datasets.schema. See Assets and storage for the asset access model.

Arrays

Every type is also available as an array, allowing to ingest multiple values of the underlying type for each data point. The size of the array is flexible, and can be different for each data point.

Queryable fields

Custom fields can be marked as queryable when you define the dataset schema. Tilebox projects these fields into query storage so you can filter datapoints by their values together with temporal, spatial, and collection filters.
Select queryable fields before ingesting datapoints. For a non-empty dataset, you cannot change whether an existing field is queryable or add a new queryable field.

Listing datasets

You can use your client instance to access the datasets available to you. To list all available datasets, use the datasets method of the client.
Output
Once you have your dataset object, you can use it to list the available collections for the dataset.
In python, if you’re using an IDE or an interactive environment with auto-complete, you can use it on your client instance to discover the datasets available to you. Type client. and trigger auto-complete after the dot to do so.

Creating / Updating a dataset

Create a dataset by defining its kind, custom fields, and field annotations. The Tilebox Console provides a visual schema editor.
This code will create a new catalog with 7 fields in total. 4 of those fields are auto-generated by choosing the spatio-temporal dataset type, and 3 (granule_name, cloud_cover, proj_shape) are custom fields that are defined. granule_name and cloud_cover can be used in custom field filters; the repeated proj_shape field cannot be queryable.
If a dataset with the same code_name already exists, it will be updated instead.

Accessing a dataset

Each dataset has an automatically generated slug that can be used to access it. The slug is the name of the group, followed by a dot, followed by the dataset code name. For example, the slug for the Sentinel-2 MSI dataset, which is part of the open_data.copernicus group, is open_data.copernicus.sentinel2_msi. To access a dataset, use the dataset method of your client instance and pass the slug of the dataset as an argument.
Once you have your dataset object, you can use it to access available collections for the dataset.

Deleting a dataset

Datasets can be deleted through the Tilebox Console by clicking the Delete button in the dataset page. Empty datasets will be deleted right away. A dataset is considered empty if none of its collections contain any data points. A non-empty dataset can also be deleted, but is a destructive operation. Every data point in every collection of the dataset will be deleted. As a safety measure, Tilebox soft-deletes the dataset for 7 days before permanently deleting it. Please get in touch if you deleted a dataset by accident and want to restore it.