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. Backwards compatibility

Add vector style

PreviousBackwards compatibilityNextAdd raster style

Last updated 1 month ago

Was this helpful?

This API call has been replaced. See to find the new documentation.

Description

Adds a style to a vector layer.

Endpoint

/path/{pathId}/vector/style

Method

POST

Access Level Rules

Access Level

edit+

Processing Units

Processing units

2

Parameters

Name
Description
Required
Default

pathId

The id of the vector layer.

true

name

The name of the new style.

true

default

Boolean whether the style should be the default style.

true

method

The method of the style. Must be one of "rules", "transitionPoints", "'random", "singleColor" or "fromColorProperty".

true

parameters

A JSON containing the parameters of the style. Below table defines the style parameters, whose content differs between methods.

true

Sample requests for different methods

//Assings the same color to all vectors
{
    "name": "Vector Style",
    "dashedLine": null,
    "method": "singleColor",
    "popupProperty":"propertyToDisplayAsTextLabel",
    "parameters": {
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        },
        "color": "#c75b1c",
        "pattern":null,
        "icon":null,
        "borderColor": "#934314"        
        }
}
//Evaluates logical rules and assigns the color of the first ruele that evaluates true.
{
    "name": "Vector Style",
    "dashedLine": null,
    "method": "transitionPoints",
    "popupProperty":"propertyToDisplayAsTextLabel",
    "parameters": {
        "property": "fid",
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        },
        "continuous": true,
       "rules":[
       {"property":"property1","operator":">","value":0,"color":"#06661f", "pattern":null,"icon":null},
       {"property":"property3","operator":">","value":5,"color":"#c4f0f4", "pattern":null,"icon":null},
       {"property":"property1","operator":">","value":8,"color":"#000000", "pattern":null,"icon":null}
       ],
        "borderColor": "#060200",
        "defaultColor": "#c75b1c",
        "defaultPattern": null,
        "defaultIcon": null        
    }
}
//Assigns a color to all vectors based on hashing a particular property
{
    "name": "Vector Style",
    "dashedLine": null,
    "method": "random",
    "popupProperty":"propertyToDisplayAsTextLabel",
    "parameters": {
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        },
        "property": "iso_a2",
        "borderColor": "#934314",
        "defaultColor": "#c75b1c",
    }
}
//Assings colors based on the bin in which the value of a property resides.
//In case continuous=true the colors fade continously.
{
    "name": "Vector Style",
    "dashedLine": null,
    "method": "transitionPoints",
    "popupProperty":"propertyToDisplayAsTextLabel",
    "parameters": {
        "property": "fid",
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        },
        "continuous": true,
        "transitionPoints": [
            {
                "value": 1,
                "color": "#2A5C84",
                "pattern": null,
                "icon":null
            },
            {
                "value": 1524.25,
                "color": "#74AE56"
                "pattern": null,
                "icon":null
            },
            {
                "value": 3047.5,
                "color": "#FFE733"
                "pattern": null,
                "icon":null
            },
            {
                "value": 4570.75,
                "color": "#FF8C01"
                "pattern": null,
                "icon":null
            },
            {
                "value": 6094,
                "color": "#ED2938"
                "pattern": null,
                "icon":null
            }
        ],
        "borderColor": "#060200",
        "defaultColor": "#c75b1c",
        "defaultPattern": null,
        "defaultIcon": null        
    }
}
//Colors a vector based on the hex color that is assigned to the property named 'color' of the vector.
//If the vector in question has no property named 'color' the default color will be used.
{
    "name": "Vector Style",
    "dashedLine": null,
    "method": "fromColorProperty",
    "popupProperty":"propertyToDisplayAsTextLabel",
    "parameters": {
        "defaultColor": "#c75b1c",
        "defaultPattern": null,
        "defaultIcon": null,
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        }
    }
}
//Assigns a specific color to a vector based on the particular value the a chosen property property has for this vector.
{
    "method": "classToColor",
    "popupProperty":"propertyToDisplayAsTextLabel",
    "dashedLine": null,
    "name": "maps vectors to a color based on the value of a certain property",
    "parameters": {
        "alpha": 1,
        "defaultColor": "#c75b1c",
        "defaultPattern": null,
        "defaultIcon": null,
        "property": "myProperty",
        "colorMapping": 
            [
                {"value":"myPropertyValue1", "color": "#2A5C84", "pattern": null, "icon":null},
                {"value":"myPropertyValue2", "color":"#FFE733", "pattern": null, "icon":null},
                {"value":"myPropertyValue3", "color": "#FF8C01", "pattern": null, "icon":null},
                {"value":"myPropertyValue4", "color":"#ED2938", "pattern": null, "icon":null},
            ],
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        }            
    }
}
//Allows you to perform algebra on the properties of a vector and assign the resulting  value to a color.
{
    "name": "Vector Style",
    "dashedLine": null,
    "popupProperty":"propertyToDisplayAsTextLabel",
    "method": "formula",
    "parameters": {
        "properties": ["fid"],
        "formula": "5 * property1 ^ 2",
        "defaultColor": "#c75b1c",
        "defaultPattern": null,
        "defaultIcon": null,
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        },
        "continuous": true,
        "transitionPoints": [
            {
                "value": 1,
                "color": "#2A5C84",
                "pattern": null,
                "icon": null,
            },
            {
                "value": 1524.25,
                "color": "#74AE56",
                "pattern": null,
                "icon": null,
            },
            {
                "value": 3047.5,
                "color": "#FFE733",
                "pattern": null,
                "icon": null,
            },
            {
                "value": 4570.75,
                "color": "#FF8C01",
                "pattern": null,
                "icon": null,
            },
            {
                "value": 6094,
                "color": "#ED2938",
                "pattern": null,
                "icon": null,
            }
        ],
        "borderColor": "#060200"
    }
}

The circle radius can be made dependent on the property of a vector using the method "onProperty" this dependency can be made linear or logarithmic.

Example:

radius = {"method":"onProperty","parameters":{"property":"propertyToUse","bias":0,"weight":1,"logarithmic":false}}

If dashedLine is not null lines will become dashed lines. In this case dashedLine should be an array with two floats. The first float indicates the length of the open spaces the second the length of the dashes.

Example:

dashedLine=[1,3]

A pattern must be an object with:

  • type: One of solid, diagonal, horizontal or vertical

  • width: a float between 1 and 50

  • backgroundColor: a hex color, optional.

Example:

pattern = {"type":"diagonal", "width": 2, "backgroundColor":"#934314"}

Alternatively the pattern can be an object of type drive. In this case you need to include a pathId of a png that is stored on the Drive.

Example:

pattern = {"type":"drive", "pathId":"4d695990-ace7-434e-b703-e1d5ae006800"}

In this case the png will be used as pattern.

An icon must be an object with

  • name: the name of the icon as a string.

All valid inputs for name can be listed with

GET /image/listIcons

Example:

icon = {"name":"dog"}

Alternatively the icon can be an object of type drive. In this case you need to include a pathId of a png that is stored on the Drive.

Example:

pattern = {"type":"drive", "pathId":"4d695990-ace7-434e-b703-e1d5ae006800"}

In this case the png will be used as icon.

RECOMMENDED READING

this page
πŸ–ŒοΈVector styling methods