Stack rasters

This endpoint allows you to stack raster data from multiple layers/timestamps. You can retrieve the raster stack as raw data of style it as a png.

Description

Retrieves a tif or png file of the (styled) raster stack.

Endpoint

/path/raster/timestamp/stack/{z}/{x}/{y}?token={token}

Method

GET

Access Level Rules

Minimum Access Level

view for visual and view+ when applyStyle is set to false

Processing Units

Minimum processing units

1

Parameters

NameDescriptionRequiredDefault

stack

An array of JSONs. Each JSON should have properties "pathId", "timestampId" and "bandNumber". The mentioned bands will be stacked in the order they are in the array.

true

style

An id of a style to apply or an object describing a valid style. Valid object for style can be found here: https://docs.ellipsis-drive.com/developers/api-v3/path-raster/styles/add-style

true

x

The x coordinate of the tile.

true

y

The y coordinate of the tile.

true

z

The zoom level of the tile.

true

token

User’s login token.

false, token can also be passed in through the authorization header

Default null.

mask

A geojson polygon in wgs84 coordinates to mask the stack.

false

Default null.

applyStyle

Boolean indicating whether to style the tile. If true a PNG is returned if false the style is ignored and a tiff file is returned instead.

false

Defaut true.

Example of a valid stack request

// example of a valid stack:
stack=[
        {"pathId": "69661175-6aa6-4258-8114-f3f4093561ca", "timestampId": "e2233ac8-5357-48bd-a785-694af842e48e", "bandNumber": 1},
        {"pathId": "848b0931-62a3-41eb-a3c7-4c8203313381", "timestampId": "2c7ffef4-b906-4a64-921a-7e3493c6739e", "bandNumber": 1}
    ]

This creates a raster with two bands. Each band coming from the specified band, timestamp and layer combination.

Mind that the stack is only defined in places where all the bands making up the stack are defined. All other location will be transparent. If the referenced bands do not intersect anywhere there visualization will be transparent everywhere!

A valid style for the above mentioned stack would be:

{
        "method":"formula",
        "name":"Visualization of my stack"
        "parameters":{      
          "formula": "band2 - band1",
          "alpha": 1,
          "continuous": true,
          "transitionPoints":[{"color":"#2A5C84","value":25},{"color":"#74AE56","value":129.5},{"color":"#FFE733","value":234},{"color":"#FF8C01","value":338.5},{"color":"#ED2938","value":443}]
    }
}

This visualizes the difference between the first and second band in the stack.

See here to find how to create a style object.

Last updated