The config block

The config block contains configuration options for a given visualization.

These are the fields that each config block can contain:

Field nameDescription

band

Optional. Used in raster numeric visualizations. The raster band that we’ll use to get the data from.

categoricalAttribute

Mandatory for categorical visualizations. The attribute that contains the categorical attributes that will be used.

categories

Mandatory for a categorical visualization. An array of the values that will be used as categories. Categories will be rendered from top to bottom following the definition order.

labelAttribute

Optional. Defines which dataset attribute or attributes to use for labeling. If multiple values are provided, the first available one will be used.

method

Optional. Used in raster algebra numeric visualizations. The type of operation and the bands used for it.

noData

Optional. Used in raster visualizations. Defines values that won’t be shown

numericAttribute

Mandatory for a numeric visualization. The attribute that contains the numeric values used.

otherOrder

Optional. Used in categorical visualizations. It can be set to either “below” or “above” to make features that do not match any of the defined categories render below or above the other ones. The default position is “below”.

rasterResampling

Optional. Used on raster data visualizations. It can be set to either “nearest” or “linear”. Defaults to “nearest”

showOther

Optional. Used in categorical visualizations. If this field is set to true it will show all features that do not match any of the defined categories and add an extra entry as the last item in the legend.

steps

Mandatory for a numeric visualization. An array of values that are either step based depending on the classification method and number of steps chosen or, for a continuous visualization, the min and max values from the numericAttribute.

Default Values

NamePointsPolygonsLinesRaster

rasterResampling

-

-

-

“nearest”

highlightColor

"#EA3891"

"#EA3891"

"#EA3891"

-

highlightStrokeColor

"#EA3891"

"#EA3891"

"#EA3891"

-

dashArray

-

-

-

lineCap

-

-

"round"

-

lineJoin

-

-

"round"

-

opacity

0.9

0.8

1

-

isSandwiched

-

false

-

-

size

4

-

2

-

strokeColor

"#F9F8Fb"

"#777777"

-

-

strokeWidth

1

1

-

-

Examples

Example of a categorical config block
"config": [
	{
    "labelAttribute": ["Wikipedia", "faa"],
		"categoricalAttribute": "faa",
		"categories": ["faa-code-1", "faa-code-2", "faa-code-3"],
		"showOther": true,
		"otherOrder": "above"
	}
]
Example of a vector numeric config block
"config": [
	{
    "labelAttribute": ["Wikipedia", "faa"],
		"numericAttribute": "percentage",
		"steps": [1, 25, 50, 75, 100]
	}
]
Example of a raster numeric config block
"config": {
  "band": 1,
  "method": {"NDVI": {"NIR": 1, "R": 2}},
  "steps": [-0.5, 0.5]
},

Last updated