Cropwise
powered by syngenta

REMOTE SENSING

Cropwise Remote Sensing

The Remote Sensing APIs are an extension of the Cropwise Platform that allows users to visualize and analyze satellite imagery data. This document provides an overview of the key concepts and components of the Remote Sensing APIs.

About the Satellite Imagery processing pipelines

The Remote Sensing APIs are built on top of a set of processing pipelines that ingest, process, and store satellite imagery data, such as NDVI images, statistical data, and other derived products. These pipelines run multiple times a day, and the data is stored in a database that is optimized for fast historical access and retrieval of years' worth of data.

Key Concepts

Scenes

Scenes are products provided by remote imaging sources. They represent pictures taken of the land in a top-down point-of-view, usually at high altitudes using drones, airplanes, or satellites, and they are georreferenced.

Each scene is composed by 5 main attributes:

  • source: The id of the remote imaging source that produced the scene. (example: sentinel)
  • acquisition_date: Date when the scene was captured by the remote imaging source.
  • bounds: The georreferenced shape of the scene, represented in GeoJSON structure.
  • bands: Data representation of the scene from a frequency or analytical perspective. Scenes can have multiple bands for different color frequencies or even bands with pre-processed data.
  • metadata: Extra information about the scene provided by the satellite source. Example: estimated cloud coverage.

Once a scene is acquired and it gets ingested into our processing pipelines, it becomes available to be fetched through the scenes APIs.

Note: some satellite sources might be private, so their availability may be subject to the requester current license.

AOIs

AOI, Area of Interest, is portion of map that represents a geometry or set of geometries.

The AOIs representation should always come in pairs:

  • {AOI_ID}: It may mean the Cropwise Field ID, or Cropwise Property ID
  • {AOI_TYPE}: Can be: field, property, composite_property.

Images

Images are a combination of scenes and AOIs. They represent a scene that has been clipped in the shape of the AOI geometry.

Subproducts

Since images have all attributes of a scene, but limited to an AOI geometry, the bands available and be processed in order to produce subproducts.

Subproducts are a transformation of existing bands of a scene into a visual or matrix representation.

This could be an NDVIrepresentation for example, which highlights living vegetation by using how much plants absorb red wavelength frequencies.

Subproducts availability may be subject to the available bands, weather factors, scene quality, etc. There are no guarantees that all subproducts will be available for all images.

Dynamic band expressions

Some subproducts analysis can be done at runtime using dynamic band expressions or dbx.

Dynamic band expression encoded as a base64url word, for example, (b4-b3)/(b4+b3) would be encoded with base64url as KGI0LWIzKS8oYjQrYjMp.

You can also send the color bands instead of the bands numbers, for example, (nir-red)/(nir+red) would be encoded as KG5pci1yZWQpLyhuaXIrcmVkKQ==.

These are equations that take existing bands as input and output one or more bands as a result.

The dbx output can be exported in multiple formats, usually as .png, .tiff, .jpeg, it depends on the subproduct.

Raster Types

A raster_type is a color palette used to visualize the images requested.

Raster TypePalette
multicolorMulticolor
falsecolorFalsecolor
falsecolor_alt_3Falsecolor_Alt_3
falsecolor_alt_4Falsecolor_Alt_4
falsecolor_alt_5Falsecolor_Alt_5
falsecolor_alt_6Falsecolor_Alt_6
falsecolor_alt_8Falsecolor_Alt_8
falsecolor_alt_10Falsecolor_Alt_10

Pro Tip: The raster types above are only compatible with png output format.

Use raw raster type to get the original image without any color palette.

Tiles

Tiles should not be confused with scenes. Tiles are map layer representations of images and subproducts, sliced in a {z}/{x}/{y} grid.

They are usually integrated with Map rendering tools like Mapbox or Google Maps.

Satellite Image Bands

Each Satellite provider has its own set of bands, and they can be retrieved using the Image Preview API.

Bands can be filtered by using dynamic_band_expression parameter and custom subproduct type to retrieve the desired set of bands.

Here is a list of all bands available for each satellite provider

Sentinel 2

BandDescription
b1Blue
b2Green
b3Red
b4NIR
b5SCL

Planet

(Analytical + UDM2)

BandDescription
b1Coastal Blue
b2Blue
b3Green I
b4Green
b5Yellow
b6Red
b7Red Edge
b8NIR
b9Clear
b10Snow
b11Cloud Shadow
b12Light Haze
b13Heavy Haze
b14Cloud
b15Confidence
b16Unusable Pixels

Error Handling

All error messages should be mapped with error codes.

These codes will be at this following format: E{3 character for context}{3 digit for indexing}

Error CodeDescription
ESNF001Scene ID not found
EMNF002Image/Field ID not found
EMNF004Field not found for for specified ID. Check if the user has access to it or if it exists for that user's workspace
EMNF005Property not found for specified ID. Check if the user has access to it or if it exists for that user's workspace
EMNF006Region not found for specified ID. Check if the user has access to it or if it exists for that user's workspace
EINNF007Entity not found for specified ID. Check if the user has access to it or if it exists for that user's workspace
EMUG001Unprocessable Image Data: The image data is malformed and the server was unable to process it
EISE000Internal Server Error: General server-side error, likely with an unknown cause
EISE001Bad Formating Error: Something is wrong with the format of the request
EISE002Error Parsing Data: Some data is malformed and the server was unable to parse it properly
EISE003Not implemented: This functionality is not yet available
EISE004Unprocessable Data: The data is malformed and the server was unable to process it
EISE100Service Timeout: An upstream service timed out and the server was unable to recovery
EISE101Service Unreachable: The server is unable to reach an upstream service and was unable to recovery
EISE102Service Error: The service was unable to continue due to an error in its execution
EISE103Service Unavailable: The service is currently unavailable, please try again later
EISE201Database Timeout: The operation timed out when communicating with the database
EISE202Database Error: The operation in the database failed and the server was unable to recovery
EISE203Database Host Error: The server is unable to connect to the database host
EIRE001Bad Request: Invalid request parameters or request body
EIRE002Not authorized: User is unauthorized to use this service or is not logged in
EIRE003Forbidden: User is not allowed to access this resource
SURE004Rate Limit: The user has reached the rate limit for this service
EIRE005Not authenticated with another service: The user is not authenticated with the service required to access this resource