Use this step by step guide to get started with the Cecil platform.

flowchart LR
	U@{ shape: rounded, label: "User"}
	C@{ shape: rounded, label: "1. Configure SDK"}
	A@{ shape: rounded, label: "2. Create AOI"}

	D@{ shape: rounded, label: "3. Create data request"}
	DP@{ shape: rounded, label: "Background process"}

	R@{ shape: rounded, label: "4. Create reprojection"}
	RP@{ shape: rounded, label: "Background process"}

	Q@{ shape: rounded, label: "5. Query"}
	DB@{ shape: database, label: "Analytics database"}

	U-->C
	U-->A

	U-->D	
	D-.->DP

	U-->R
	R-.->RP

	U-->Q
	Q-->DB

1. Configure the SDK

Install the Cecil SDK in your project virtual environment.

pip install cecil

Configure the SDK with your API key.

export CECIL_API_KEY="my-api-key"
set CECIL_API_KEY=my-api-key

Don’t have an API key?

<aside> <img src="/icons/arrow-right-basic_gray.svg" alt="/icons/arrow-right-basic_gray.svg" width="40px" />

Get in touch to join early access.

</aside>

2. Create an area of interest (AOI)

Create your first area of interest (AOI) using the geometry type and coordinates of a GeoJSON in EPSG:4326. Learn more about the AOI specification in the SDK documentation.

import cecil

client = cecil.Client()

aoi = client.create_aoi(
    name="Kakadu National Park",
    geometry={
        "type": "Polygon",
        "coordinates": [
            [
                [132.52934211276073, -12.721072673008706],
                [132.52934211276073, -12.730063400794094],
                [132.54027735328083, -12.730063400794094],
                [132.54027735328083, -12.721072673008706],
                [132.52934211276073, -12.721072673008706]
            ]
        ]
    }
)

print(aoi)

3. Create data requests for your AOI

Create data requests for your AOI and let Cecil take care of the data integration with all providers for you. You can find the dataset_id for each dataset on the details page of available datasets. This step runs in the background and the processing time depends on the provider. You can use the get_data_request() function to get progress updates. Once the data request status is completed, you can move into the next step.

import cecil

client = cecil.Client()

kanop_data_request = client.create_data_request(
    aoi_id="my-aoi-id",
    dataset_id="kanop-dataset-id",
)

planet_data_request = client.create_data_request(
    aoi_id="my-aoi-id",
    dataset_id="planet-dataset-id",
)

print(kanop_data_request)
print(planet_data_request)

4. Create reprojections to make datasets joinable

Create reprojections for your datasets and let Cecil prepare all data using your preferred coordinate reference system (CRS) and spatial resolution. In this example, a resolution of 0.00025 degrees represents 27.8 metres at the equator. Learn more about reprojections in the SDK documentation. This step runs in the background and the processing time depends on the size of the dataset being reprojected. You can use the get_reprojection() function to get progress updates. Once the reprojection status is completed, you can move into the next step.

<aside> <img src="/icons/info-alternate_gray.svg" alt="/icons/info-alternate_gray.svg" width="40px" />

The reprojection status is currently a work in progress and will be available soon.

</aside>

import cecil

client = cecil.Client()

kanop_reprojection = client.create_reprojection(
    data_request_id="my-kanop-data-request-id",
    crs="EPSG:4326",
    resolution=0.00025,
)

planet_reprojection = client.create_reprojection(
    data_request_id="my-planet-data-request-id",
    crs="EPSG:4326",
    resolution=0.00025,
)

print(kanop_reprojection)
print(planet_reprojection)