Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/landing/cookbook-recipes-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/landing/cookbook-recipes-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion datasets/ingest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Protobuf is Google's language-neutral, platform-neutral, extensible mechanism fo

More details on protobuf can be found in the [protobuf section](/sdks/go/protobuf).

In the example below, `v1.Modis` type has been generated using [tilebox-generate](https://github.com/tilebox/tilebox-generate) as described in the [protobuf section](/sdks/go/protobuf).
In the example below, the `v1.Modis` type has been generated with `tilebox dataset generate`, as described in the [protobuf section](/sdks/go/protobuf).

```go Go
datapoints := []*v1.Modis{
Expand Down
196 changes: 115 additions & 81 deletions index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,90 +81,120 @@ export const HomeSearch = () => {
</div>

<div className="lg:col-span-7">
<CodeGroup>
```text Agent
> User
Onboard yourself to Tilebox: https://docs.tilebox.com/onboard-your-agent

Then use Tilebox to find which data center sites changed most from space.

Build a reproducible workflow that:
- starting from a user-provided CSV of known data centers
- finds cloud-free Sentinel-2 imagery over a target lat/lon in a time window
- reads the relevant band products, crops scenes to a 3km area around the target
- computes the cloud fraction for the cropped area, filter out scenes > 1%
- compares before/after by scoring visible change based on suitable metrics
- then create a datacenter site ranking based on score

Use the provided Tilebox skills to research datasets, storage access and outline the
workflow, then implement it. Deploy and run on our GCP cluster, in case of failures
inspect runner logs and iterate on the workflow.
```
<Tabs>
<Tab title="Agent">
<div className="tilebox-agent-chat" aria-label="Example agent chat prompt">
<div className="tilebox-agent-chat-message">
<div className="tilebox-agent-chat-avatar" aria-hidden="true">
U
</div>
<div className="tilebox-agent-chat-content">
<div className="tilebox-agent-chat-meta">You</div>
<div className="tilebox-agent-chat-bubble">
<p>
Build a reproducible Tilebox workflow that starts with a user-provided CSV of known data centers and then:
</p>
<ul>
<li>Finds cloud-free Sentinel-2 imagery over a target lat/lon in a time window</li>
<li>Reads the relevant band products and crops scenes to a 3km area around the target</li>
<li>Computes the cloud fraction for the cropped area and filters out scenes &gt; 1%</li>
<li>Compares before/after by scoring visible change based on suitable metrics</li>
<li>Creates a datacenter site ranking based on score</li>
</ul>
<p>
Use the provided Tilebox skills to research datasets, access storage, outline the workflow, and then implement it. Deploy and run on our GCP cluster, in case of failures inspect runner logs and iterate on the workflow.
</p>
</div>
</div>
</div>
<a className="tilebox-agent-chat-composer" href="/onboard-your-agent">
<span>Ask your agent to build with Tilebox…</span>
<span className="tilebox-agent-chat-send">↵</span>
</a>
</div>
</Tab>

<Tab title="CLI">
<div className="tilebox-cli-window" aria-label="Tilebox CLI example">
<div className="tilebox-cli-controls" aria-hidden="true">
<span className="tilebox-cli-control tilebox-cli-control-red" />
<span className="tilebox-cli-control tilebox-cli-control-yellow" />
<span className="tilebox-cli-control tilebox-cli-control-green" />
</div>
<div className="tilebox-cli-code">
```bash CLI wrap
curl -fsSL https://cli.tilebox.com/install.sh | sh

tilebox dataset query
open_data.copernicus.sentinel2_msi
--last 7d
--spatial-extent 'POLYGON((-109 41,-109 37,-102 37,-102 41,-109 41))'
--limit 10

```bash CLI
curl -fsSL https://cli.tilebox.com/install.sh | sh
tilebox job submit
--name "Datacenter Monitoring"
--task "ComputeVisibleChange"
--input "{\"before\": \"2024-06-01\", \"after\": \"2026-06-01\"}"
--cluster gcp-Drv6L7Li4t7Yvk
```
</div>
</div>
</Tab>

tilebox dataset query
open_data.copernicus.sentinel2_msi
--last 7d
--spatial-extent 'POLYGON((-109.05 41,-109.05 37,-102.05 37,-102.05 41,-109.05 41))'
--limit 10

tilebox job submit
--name "Datacenter Monitoring"
--task "ComputeVisibleChange"
--input "{\"before\": \"2024-06-01\", \"after\": \"2026-06-01\"}"
--cluster gcp-Drv6L7Li4t7Yvk
```
<Tab title="Python">
```python runner.py lines
from tilebox.datasets import Client
from tilebox.workflows import ExecutionContext, Runner, Task

```python Python lines
from tilebox.datasets import Client
from tilebox.workflows import Task, ExecutionContext

class ComputeVisibleChange(Task):
before: str
after: str
class ComputeVisibleChange(Task):
before: str
after: str

def execute(self, context: ExecutionContext):
sentinel2 = Client().dataset(
"open_data.copernicus.sentinel2_msi"
)
scenes = sentinel2.collection("S2A_S2MSI1A").query(
temporal_extent=(before, after),
)
context.logger.info("Found scenes", n=len(scenes.granule_name))
context.submit_subtasks([
ProcessScene(str(name) for name in scenes.granule_name)
])
```
def execute(self, context: ExecutionContext):
sentinel2 = Client().dataset(
"open_data.copernicus.sentinel2_msi"
)
scenes = sentinel2.collection("S2A_S2MSI1A").query(
temporal_extent=(before, after),
)
context.logger.info("Found scenes", n=len(scenes.granule_name))
context.submit_subtasks([
ProcessScene(str(name) for name in scenes.granule_name)
])

```go Go lines
type ComputeVisibleChange struct {
Before time.Time
After time.Time
}
runner = Runner(tasks=[ComputeVisibleChange])
```
</Tab>

func (t *ComputeVisibleChange) Execute(ctx context.Context) error {
client := datasets.NewClient()
dataset, _ := client.Datasets.Get(ctx, "open_data.copernicus.sentinel2_msi")
collection, _ := client.Collections.Get(ctx, dataset.ID, "S2A_S2MSI1C")
<Tab title="Go">
```go main.go lines
type ComputeVisibleChange struct {
Before time.Time
After time.Time
}

var scenes []*examplesv1.Sentinel2Msi
_ = client.Datapoints.QueryInto(ctx, dataset.ID, &scenes,
datasets.WithCollections(collection),
datasets.WithTemporalExtent(query.NewTimeInterval(t.Before, t.After)),
)
func (t *ComputeVisibleChange) Execute(ctx context.Context) error {
client := datasets.NewClient()
dataset, _ := client.Datasets.Get(ctx, "open_data.copernicus.sentinel2_msi")
collection, _ := client.Collections.Get(ctx, dataset.ID, "S2A_S2MSI1C")

slog.InfoContext(ctx, "Found scenes", slog.Int("n", len(scenes)))
for _, scene := range scenes {
_, _ = workflows.SubmitSubtask(ctx, &ProcessScene{
Name: scene.GetGranuleName(),
})
}
return nil
}
```
</CodeGroup>
var scenes []*examplesv1.Sentinel2Msi
_ = client.Datapoints.QueryInto(ctx, dataset.ID, &scenes,
datasets.WithCollections(collection),
datasets.WithTemporalExtent(query.NewTimeInterval(t.Before, t.After)),
)

slog.InfoContext(ctx, "Found scenes", slog.Int("n", len(scenes)))
for _, scene := range scenes {
_, _ = workflows.SubmitSubtask(ctx, &ProcessScene{
Name: scene.GetGranuleName(),
})
}
return nil
}
```
</Tab>
</Tabs>
</div>
</div>
</div>
Expand All @@ -178,7 +208,7 @@ export const HomeSearch = () => {
Choose how you build
</h2>
<p className="mt-4 text-lg leading-8 text-gray-600 dark:text-gray-400 max-w-2xl">
Use Tilebox directly as a developer, or give an agent the same tools and documentation context so it can work with Tilebox for you.
Use Tilebox directly as a developer, or give an agent the same tools and documentation context so it can operate Tilebox for you.
</p>

<div className="mt-10 grid lg:grid-cols-2 gap-6">
Expand Down Expand Up @@ -256,7 +286,7 @@ export const HomeSearch = () => {
</p>

<div className="mt-8">
<Columns cols={3}>
<Columns cols={2}>
<Tile href="/datasets/query/querying-data" title="Query satellite data" description="Search typed datasets by time, location, collection, or datapoint ID.">
<img src="/assets/console/datasets-explorer-light.png" alt="Tilebox dataset explorer" className="block dark:hidden" />
<img src="/assets/console/datasets-explorer-dark.png" alt="Tilebox dataset explorer" className="hidden dark:block" />
Expand All @@ -269,6 +299,10 @@ export const HomeSearch = () => {
<img src="/assets/workflows/runners/runner-architecture-light.png" alt="Tilebox runner architecture" className="block dark:hidden" />
<img src="/assets/workflows/runners/runner-architecture-dark.png" alt="Tilebox runner architecture" className="hidden dark:block" />
</Tile>
<Tile href="/guides/cookbook" title="Browse practical recipes" description="Find task-focused guides for querying data, building workflows, connecting storage, and operating Tilebox.">
<img src="/assets/landing/cookbook-recipes-light.png" alt="Recipe cards for common Tilebox guides" className="block dark:hidden" />
<img src="/assets/landing/cookbook-recipes-dark.png" alt="Recipe cards for common Tilebox guides" className="hidden dark:block" />
</Tile>
</Columns>
</div>

Expand All @@ -291,7 +325,7 @@ export const HomeSearch = () => {
Scale
</p>
<h2 className="mt-3 text-2xl font-semibold tracking-tight text-gray-950 dark:text-white">
From first query to running on your infrastructure
From query to operational pipelines
</h2>
<p className="mt-3 text-gray-600 dark:text-gray-400 max-w-3xl">
Start with open data or your own catalogs, turn processing steps into tasks, and run them where your data and infrastructure already live.
Expand All @@ -300,7 +334,7 @@ export const HomeSearch = () => {
<div className="mt-8">
<Steps>
<Step title="Discover and query data">
Query open datasets or your own Tilebox datasets by time, area of interest, collection, or datapoint ID.
Query open datasets or your own custom Tilebox datasets by time, area of interest, collection, or datapoint ID.
</Step>
<Step title="Build workflow tasks">
Turn processing steps into workflow tasks that can submit subtasks, report progress, use caches, and emit logs and traces.
Expand All @@ -309,7 +343,7 @@ export const HomeSearch = () => {
Develop with local runners, iterate quickly, and prototype your geospatial workflows.
</Step>
<Step title="Deploy to your own compute">
Run workflows across cloud, on-premises, sovereign, air-gapped, or edge environments while Tilebox tracks jobs and distributes work for parallel execution.
Run workflows across cloud, on premise, sovereign, air-gapped, or edge environments while Tilebox tracks jobs and distributes work for parallel execution.
</Step>
<Step title="Inspect and iterate">
Query job state, logs, spans, and progress from the Console, SDKs, CLI, or agent tools.
Expand Down
10 changes: 5 additions & 5 deletions sdks/go/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ icon: download

## Package Overview

Tilebox offers a Go SDK for accessing Tilebox services. It additionally includes a command-line tool (tilebox-generate) that can be installed separately.
Tilebox offers a Go SDK for accessing Tilebox services. The Tilebox command-line tool includes `tilebox dataset generate`, which generates Go protobuf types for Tilebox datasets.

<Columns cols={2}>
<Card title="tilebox-go" icon="golang" href="https://github.com/tilebox/tilebox-go" horizontal>
Datasets and workflows client for Tilebox
</Card>
<Card title="tilebox-generate" icon="terminal" href="https://github.com/tilebox/tilebox-generate" horizontal>
Command-line tool to generate Tilebox datasets types for Go
<Card title="Tilebox CLI" icon="terminal" href="/agents-and-ai-tools/tilebox-cli" horizontal>
Command-line tools to query datasets, run workflows, and generate Go dataset types
</Card>
</Columns>

Expand All @@ -25,8 +25,8 @@ Add `tilebox-go` to your project.
go get github.com/tilebox/tilebox-go
```

Install `tilebox-generate` command-line tool on your machine.
Install the Tilebox command-line tool on your machine.

```bash Shell
go install github.com/tilebox/tilebox-generate@latest
curl -fsSL https://cli.tilebox.com/install.sh | sh
```
10 changes: 5 additions & 5 deletions sdks/go/protobuf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ Tilebox uses [Protocol Buffers](https://protobuf.dev/), with a custom generation
[Protocol Buffers](https://protobuf.dev/) (often referred to as `protobuf`) is a schema definition language with an efficient binary format and native language support for lots of languages, including Go.
Protocol buffers are open source since 2008 and are maintained by Google.

## tilebox-generate
## Generate Go types

Protobuf schemas are typically defined in a `.proto` file, and then converted to a native Go struct using the protobuf compiler.
Tilebox datasets already define a protobuf schema as well, and automate the generation of Go structs for existing datasets through a quick `tilebox-generate` command-line tool.
Tilebox datasets already define a protobuf schema as well. Use `tilebox dataset generate` to generate Go structs for existing datasets.

See [Installation](/sdks/go/install) for more details on how to install `tilebox-generate`.
See [Installation](/sdks/go/install) for more details on how to install the Tilebox command-line tool.

```sh
tilebox-generate --dataset open_data.copernicus.sentinel1_sar
tilebox dataset generate --slug open_data.copernicus.sentinel1_sar
```

The preceding command will generate a `./protogen/tilebox/v1/sentinel1_sar.pb.go` file. More flags can be set to change the default output folders, package name, etc.
The preceding command will generate a `./protogen/tilebox/v1/sentinel1_sar.pb.go` file. Use `--out`, `--package`, and `--name` to change the default output directory, protobuf package, or message name.

This file contains everything needed to work with the [Sentinel-1 SAR](https://console.tilebox.com/datasets/explorer/e27e6a58-c149-4379-9fdf-9d43903cba74) dataset.
It's recommended to check the generated files you use in your version control system.
Expand Down
Loading
Loading