Ellipsis Drive
  • πŸ‘‹Welcome to Ellipsis Drive!
  • Getting Started
    • ⚑Quick Start!
      • 1. Sign up for Ellipsis Drive
      • 2. Creating Vector Layers
      • 3. Creating Raster Layers
      • 4. Creating Point Cloud Layers
      • 5. Data sharing and user access
      • 6. Map building
    • 🏒Set up your organisation
    • πŸ‘₯User Types
      • πŸ”ŽData Scientists
      • πŸ–₯️Developers
      • 🌐GIS professionals
      • πŸ—ΊοΈNon-technical users
    • Capabilities table
    • πŸ“šGlossary
    • πŸ“„Metadata
  • Advanced Usage
  • 🌍Working With Vector Data
    • πŸ–ŒοΈVector styling methods
    • β˜‘οΈFilter vector data
    • πŸ”ŽInspect vector data
    • ✏️Edit vector data
  • 🌏Working With Raster Data
    • πŸ“ˆCreating time series with raster data
    • πŸ–ŒοΈRaster styling methods
    • πŸ”ŽAnalyse raster data
  • πŸš€Sharing & Collaboration
    • πŸ“‚Sharing Folders & Layers
    • πŸ’²Subscriptions on spatial data
    • πŸ“€Transferring spatial data
  • πŸ’‘Good to know
    • 🌍Adding third party layer
    • ⬇️Downloading data
    • ⏳Processing Units
    • 🌏How to change the host location
    • πŸ”Marketplace vs Reseller vs Ellipsis Drive
  • Integrate & automate
    • πŸ”—Integration options
      • πŸ’»Use Ellipsis Drive viewer as embedded window
      • Creating (signed) viewer url's
      • πŸ—ΊοΈDisplay Ellipsis Drive layers in your app
      • πŸ’ΎUse Ellipsis Drive layers in third party software
      • πŸ“‰Query layers from your app
      • πŸ“‚Use Ellipsis Drive to ingest client data
      • πŸ”—Connect Ellipsis Drive to your platform
      • πŸ“ŠPerform analytics on Ellipsis Drive layers
      • 🌐Publish your outputs as Ellipsis Drive layers
    • βš™οΈAPI v3
      • Account
        • Create new account
        • Get account details
        • Login to your account
        • Edit profile
        • Update username
        • Delete account
        • Get transactions
        • List root folders
        • Get user history
        • Change your subscription
        • Change your default storage location
        • Add billing information to your account
        • Security
          • Update email
          • Validate email
          • Update password
          • Reset password
          • Validate password
        • Access tokens
          • Create access token
          • Get your access tokens
          • Delete access token
        • External Layer
          • Add external layer
          • Delete external layer
          • Retrieve external layer
      • Users
        • Search users
        • Get user
        • Invite user
        • Contact user
      • Path
        • Get path
        • Search path
        • Move path
        • Rename path
        • Trash or recover a path
        • Hard delete path
        • Edit path public access
        • Edit path metadata
        • Favorite path
        • White list domains
        • Request access
        • Update hosting location
        • Export for download
          • Export layer or folder
          • Get exports
          • Download an export
        • Hashtags
          • Add hastag
          • Remove hashtag
          • Search for hashtag
        • Invites
          • Invite user to path
          • Revoke Invite
          • Accept invite
          • Get your invites
          • Get path invites
        • Path members
          • Get list of members
          • Remove member
          • Edit member
        • Path subscription plans
          • Add subscription plan
          • Get subscription plans
          • Delete Subscription
          • Subscribe to a path
        • Path Usage
          • Path active users
          • Path usage of user
          • Path aggregated processing units
        • Transfer ownership of path
          • Create transfer
          • Revoke transfer Invite
          • Get transfer invites
          • Accept/Reject transfer invite
      • Path/folder
        • Create new folder
        • List folder
        • Traverse folder
      • Path/vector
        • Create new vector layer
        • Timestamps
          • Add timestamp
          • Edit timestamp
          • Trash timestamp
          • Hard delete timestamp
          • Get timestamp bounds
          • Get feature changelog
          • Find features by ids
          • Search feature by extent
          • Search features by tiles
          • Get the compressed features list
          • List features
          • Location information
          • Vector Features
            • Add feature
            • Edit the features
            • Delete feature
            • Feature Versions
            • Feature Messages
              • Get messages on a feature
              • Get message image
              • Add message to a feature
              • Delete message
            • Feature Time Series
              • Get series
              • Get series info
              • Add series
              • Delete series
              • Series Changelog
          • Upload vector data
            • Upload vector file
            • Get uploads
            • Revert the upload
            • Delete failed upload
            • Download file
          • Export vector data
            • Export vector data
            • Get exports
            • Download an export
        • Styles
          • Add style
          • Edit Style
          • Delete Style
        • Vector Layer Properties
          • Add vector property
          • Delete vector property
          • Edit vector properties
        • Vector layer projections
          • Add a projection
          • Remove a projection
        • Edit filter
        • Edit saved data
      • Path/raster
        • Create new raster
        • Timestamps
          • Tile service
          • Stack rasters
          • Get raster
          • Analyse raster data
          • Location information
          • Add timestamp
          • Edit timestamp
          • Get timestamp bounds
          • Activate timestamp
          • Deactivate timestamp
          • Delete timestamp
          • Trash timestamp
          • Upload Raster
            • Upload raster file
            • Get uploads
            • Delete upload
            • Trash upload
            • Download file
          • Export raster data for download
            • Export raster data for download
            • Get exports
            • Download export
        • Styles
          • Add style
          • Edit style
          • Delete style
        • Edit Raster
        • Edit raster band
        • Raster layer projections
          • Add a projection
          • Remove a projection
      • Path/pointCloud
        • Create new point cloud
        • Timestamps
          • 3D tiles
          • Add timestamp
          • Edit timestamp
          • Get timestamp bounds
          • Activate timestamp
          • Deactivate timestamp
          • Delete timestamp
          • Trash timestamp
          • Point cloud uploads
            • Upload point cloud file
            • Get uploads
            • Delete upload
            • Trash upload
            • Download file
          • Export point cloud for download
            • Export point cloud data
            • Get exports
            • Download export
      • Path/file
        • Create new file
        • Download file
      • Path/bookmark
        • Create new bookmark
        • Fetch bookmark details
        • Update bookmark details
      • Path/setUpTasks
        • Add task
        • Get tasks
      • Path/process
        • Create new process
        • Update a process
        • Execute a process
        • Fetch your process jobs
        • Fetch proces jobs of a path
      • OGC Protocols
        • WMTS
        • OGC API - Features
        • TMS/XYZ
        • WMS
        • Processes API (INFORMATION FACTORY INSTANCE ONLY)
          • Landing
          • Conformance
          • Process list
          • Execute a process
          • Get job status
          • Get job results
        • WCS
        • STAC
          • Landing
          • Root Catalog
          • Folder Catalog
          • Layer Collection
          • Timestamp Item
          • Search
        • Terrain RGB
        • MVT
        • WFS
        • 3D tiles
      • Fast read
        • Vector data
        • Raster data
      • OAuth
        • Authorization
        • Authorization code variant
        • Refresh token variant
      • Ellipsis Drive Pricing
        • Public pricing
        • User pricing
      • Ellipsis Drive locations
        • Get locations
      • Top Up
    • πŸ”ŒPlugins & Packages
    • πŸ”Authentication Options
    • Backwards compatibility
      • Add vector style
      • Add raster style
  • Extra
    • πŸ›‘οΈCertification & Compliance
    • ❓Troubleshoot Issues
      • Failing to upload features with properties of type object or array
      • My raster data does not look good on low zoomlevel
      • Connecting webservice to QGIS and ArcGIS
      • Why don't all features show on every zoom level?
      • Failing to upload a .csv
      • Trouble with EPSG or CRS
      • Failing to upload a Shape file
      • Fix Visualisation Transparency
    • Creating a process
  • PRIVATE DEPLOYMENT
    • ℹ️Introduction
    • πŸ“ƒOverview
    • πŸ› οΈDeployment
      • πŸ”ŒIntegration with existing storage
      • πŸ’½Recommended hardware
      • πŸ“ˆManaging your instance
      • ♻️Backup and recovery
      • πŸ”Security and Compliance
      • ☁️Supported clouds
Powered by GitBook
On this page
  • Access Level Rules
  • Processing Units
  • Parameters

Was this helpful?

  1. Integrate & automate
  2. API v3
  3. Path/raster
  4. Styles

Add style

Description

Adds a raster style.

Endpoint

/path/{pathId}/raster/style

Method

POST

Access Level Rules

Minimum Access Level

edit+

Processing Units

Minimum processing units

2

Parameters

Name
Description
Required
Default

pathId

The id of the raster layer.

true

name

The name of the style to add.

true

parameters

The parameters for the style. See details below.

true

description

A description of the style as string.

false

Default null.

Sample requests for different methods

//Define the values of the three color channels using free expressions
{
    "fill": {
        "type": "channelMap", //must be channelMap
        "channelMap": [
            {
                "expression": "band3", //An expression giving the value of the particular color channel
                "channel": "red", //The color channel to place the expression outcome in
            },
            {
                "expression": "band2", //An expression giving the value of the particular color channel
                "channel": "green", //The color channel to place the expression outcome in
            },
            {
                "expression": "band1", //An expression giving the value of the particular color channel
                "channel": "blue", //The color channel to place the expression outcome in
            }
        ],
    },
    "alphaMultiplier": 1,//A float between 0 and 1 to fade the image
    "alpha": null, //An alpha object documented below
    "noData":null, //A noData object documented below
    "shade":null //A shade object documented below
}
//Define conditions and assign colors based on those conditions 
{
    "fill": {
        "type": "caseMap", //must be caseMap
        "defaultTarget":{"color":"#FFE733"}, //Color to assign if all conditions evaluate false
        "caseMap": [
            {
                "expression": "band1>0", //An expression to evaluate
                "target": {"color":"#2A5C84"}, //The color to assign if the expression evaluates true
                "label":"label" //An optional label to use in the legend
            },
            {
                "expression": "band1>1", //An expression to evaluate
                "target": {"color":"#74AE56"}, //The color to assign if the exxpression evaluates true
                "label":"label" //An optional label to use in the legend
            },
            {
                "expression": "and(band1>2, band2<0 )", //An expression to evaluate
                "target": {"color":"#ED2938"}, //The color to assign if the expression evaluates true
                "label":"label" //An optional label to use in the legend
            }
        ],
    },
    "alphaMultiplier": 1,//A float between 0 and 1 to fade the image
    "alpha": null, //An alpha object documented below
    "noData":null, //A noData object documented below
    "shade":null //A shade object documented below
}
//Define an expression and sent the result to a color using ranges. 
{
    "fill": {
        "type": "rangeMap", //must be rangeMap
        "expression":"2*band1+5", //An expression whose output to apply the rangeMap to
        "gradient":true, //A boolean indicating whether the color shoud fade from one range to the other
        "rangeMap": [
            {
                "value": 1, //Start of the range
                "target": {"color":"#2A5C84"}, //The color to assign if the output of the expression falls in this range
                "label":"label" //An optional label to use in the legend
            },
            {
                "value": 2, //Start of the range
                "target": {"color":"#74AE56"},  //The color to assign if the output of the expression falls in this range
                "label":"label" //An optional label to use in the legend
            },
            {
                "value": 3, //Start of the range
                "target": {"color":"#ED2938"}, //The color to assign if the output of the expression falls in this range
                "label":"label" //An optional label to use in the legend
            }
        ],
    },
    "alphaMultiplier": 1,//A float between 0 and 1 to fade the image
    "alpha": null, //An alpha object documented below
    "noData":null, //A noData object documented below
    "shade":null //A shade object documented below
}
//Define an expression and sent the result to a color based on a value to color map
{
    "fill": {
        "type": "valueMap", //must be valueMap
        "expression":"2*band1+5", //An expression whose output to apply the valueMap to
        "defaultTarget":"#FFE733", //Color to assing if the output of the expression does not match any of the values in the valueMap
        "rangeMap": [
            {
                "value": 1, //Value to sent to the specific color. Must be integer
                "target": {"color":"#2A5C84"}, //The color to assign if the output equals the given value
                "label":"label" //An optional label to use in the legend
            },
            {
                "value": 2, //Value to sent to the specific color. Must be integer
                "target": {"color":"#74AE56"}, //The color to assign if the output equals the given value
                "label":"label" //An optional label to use in the legend
            },
            {
                "value": 3, //Value to sent to the specific color. Must be integer
                "target": {"color":"#ED2938"}, //The color to assign if the output equals the given value
                "label":"label" //An optional label to use in the legend
             }
        ],
    },
    "alphaMultiplier": 1,//A float between 0 and 1 to fade the image
    "alpha": null, //An alpha object documented below
    "noData":null, //A noData object documented below
    "shade":null //A shade object documented below
}

Expressions

An expression is a string containing an expression outputting either a number or boolean.

In the expression you can use raster values by referencing the band:

band1, band2, band3, ...

The expression can also contain standard operators such as:

*,+,-,/, floor(_),),(

Lastly one can use these logical operators

&&, ||, !, ==,<=,<,>,>=,!=

An expression can simply be the value of the band

expression = "band1"

Or an expression can simply be a value

expression="1"

Or boolean

expression="true"

An example of an expression rendering a number:

expression = "(band1^2+band2^2)^(1/2)"

An example of an expression rendering a boolean

expression = "!( band1 > 0 && band2>0)"

Alpha object

The Alpha object can have two types. Expression Map and caseMap

In case of type expression the result of the expression will be used as alpha value. Mind that the alpha value will be clipped to 0 and 1.

alpha={type:"expressionMap", expression: "5*band1/2"}

In case of type case, all expressions in the conditions are evaluated and the given value is assigned if the condition evaluates true.

alpha={"type":"caseMap", "caseMap":[{"expression": "and(band1>0, band1<1)" , "target":{"number":0.2}}, {"expression":"and(band1>1, band1<2)", "target":{"number":0.4}}] }

NoData

NoData should be an expression outputting a boolean. True will make the output pixel transparent, false will make it non transparent.

noData="or(band1<0, band2==0)"

Shade

Shade should be an object describing a hill shade.

shade={bandNumber:1, exaggerate:1, azimuth:90, factor:0.5, angle:45 }

The bandNumber tells which band of the raster to interpret as altitude.

The factor should be between 0 and 1 and describes the weight with which to blend the shade into the output.

The exaggerate is used to multiply the band with.

The angle and azimuth describe the position of the sun in degrees.

RECOMMENDED READING

PreviousStylesNextEdit style

Last updated 1 day ago

Was this helpful?

βš™οΈ
πŸ–ŒοΈRaster styling methods