Skip to main content
Version: 2.17.1

Keep Level Specification

The keep level specification is used to define at which zoom levels identified objects (that can be displayed on a geographic view) will be added to the map vector tiles.

The specification is a geo-view configuration item represented in json format that specifies which identified objects to add to the vector tiles at each zoom level based on a specific set of criteria.

  • Properties:
    • rules: defines a list of rules that determine whether an object will be added to the vector tiles. These rules get evaluated in order for each candidate object and the first rule that matches an object will apply the operation specified by its rule type.
    • defaultKeepRuleType: defines the keep level rule type used for objects that do not match any of the criteria specified in the keep level rules.
{
"rules": [ <KEEP_LEVEL_RULE> ],
"defaultKeepRuleType": "<KEEP_LEVEL_RULE_TYPE>"
}

Keep Level Rule

A keep level rule defines the operation that must be applied to an object of a particular class under specific zoom conditions.

  • Properties:
    • type: defines the operation to be applied in case of a successful match.
    • class: defines the class of the targeted identified object. The list of possible classes can be found in the Descendant Classes section of the cimbend documentation for the Identified Object class.
    • zoom: defines the zoom level at which this rule becomes relevant. If a rule doesn't have this property then it will be evaluated at all zoom levels.
    • filters: defines a list of possible filters that allow for a more fine grained control of the specific objects being targeted e.g. transformers with a specific nominalVoltage.
{
"rules": [
{
"type": "<KEEP_LEVEL_RULE_TYPE>",
"class": "<IDENTIFIED_OBJECT_CLASS>", // Name for the object class as defined in cimbend
"zoom": {
"comparator": "<COMPARATOR_VALUE>",
"value": <number>
},
"filters": [ <KEEP_LEVEL_RULE_FILTER> ]
}
],
"defaultKeepRuleType": "<KEEP_LEVEL_RULE_TYPE>"
}

Keep Level Rule Filter

A keep level rule filter specifies a set of conditions that must all match for a rule to be applied to a candidate object. There are two types of filters: symbol filters and property filters.

Symbol Filter

A filter with the type "SYMBOL" checks whether a candidate object has a specific diagram object style.

  • This is the list of diagram object styles:

    • NONE
    • DIST_TRANSFORMER
    • ISO_TRANSFORMER
    • REVERSIBLE_REGULATOR
    • NON_REVERSIBLE_REGULATOR
    • ZONE_TRANSFORMER
    • FEEDER_CB
    • CB
    • JUNCTION
    • SWITCH
    • ARC_CHUTE
    • BRIDGE
    • DISCONNECTOR
    • FLICKER_BLADE
    • FUSE
    • GAS_INSULATED
    • LIVE_LINE_CLAMP
    • RECLOSER
    • FAULT_INDICATOR
    • JUMPER
    • ENERGY_SOURCE
    • SHUNT_COMPENSATOR
    • USAGE_POINT
    • CONDUCTOR_UNKNOWN
    • CONDUCTOR_LV
    • CONDUCTOR_6600
    • CONDUCTOR_11000
    • CONDUCTOR_12700
    • CONDUCTOR_22000
    • CONDUCTOR_33000
    • CONDUCTOR_66000
    • CONDUCTOR_132000
    • CONDUCTOR_220000
    • CONDUCTOR_275000
    • CONDUCTOR_500000
  • Properties:

    • type: should always be "SYMBOL" for a symbol filter.
    • value: specifies the name of the diagram object style to be used for the check.
{
"type": "SYMBOL",
"value": "<DIAGRAM_OBJECT_STYLE>"
}

Property Filter

A filter with the type "PROPERTY" tests the value of a property in the candidate object.

  • Properties:
    • type: should always be "PROPERTY" for a property filter.
    • getter: defines the getter method for the property to be tested. The list of possible classes and their properties can be found in the Descendant Classes section of the cimbend documentation for the Identified Object class.
    • comparator: defines the comparator operator to be used in the test.
    • value: defines the value that the property will be compared against.
{
"type": "PROPERTY",
"getter": [ <string> ], // Array that defines the getter method for the property to be used in the comparison
"comparator": "<COMPARATOR_VALUE>", // Comparator operator to be used
"value": <number | string | boolean> // Value to be compared against
}

Keep Level Rule Type

VALUEDescription
KEEPThe object will be added to the vector tile.
KEEP_SIMPLIFYThe object will be simplified before being added to the vector tile.
SIMPLIFYThe object will be simplified and added to the vector tile only if the simplified geometry results in more than a single point.
REMOVEThe object will not be added to the vector tile.

Comparator Value

VALUEDescriptionSupported Data Types
=equal tonumber, string, boolean
!=not equal tonumber, string, boolean
>=greater than equal tonumber
<=lesser than equal tonumber
>greater thannumber
<lesser thannumber
=~matches regular expressionstring
!=~does not match regular expressionstring

Example

{
"rules": [
// Keep any Disconnector that has a diagram object style of 'DISCONNECTOR' if the zoom level is less than 19
{
"type": "KEEP",
"class": "Disconnector",
"zoom": { "comparator": "<", "value": 19 },
"filters": [{ "type": "SYMBOL", "value": "DISCONNECTOR" }]
},
// Simplify any ConductingEquipment that has a diagram object style of 'REVERSIBLE_REGULATOR' and a 'baseVoltageValue' of 12700 if the zoom level is less than 15
{
"type": "SIMPLIFY",
"class": "ConductingEquipment",
"zoom": { "comparator": "<", "value": 15 },
"filters": [
{ "type": "SYMBOL", "value": "REVERSIBLE_REGULATOR" },
{ "type": "PROPERTY", "getter": ["baseVoltageValue"], "comparator": "=", "value": 12700 }
]
},
// Keep any Fuse that has a name that matches the regular expression "^([0-9]{4,})[ ].*$" regardless of zoom level
{
"type": "KEEP",
"class": "Fuse",
"filters": [
{ "type": "PROPERTY", "getter": ["name"], "comparator": "=~", "value": "^([0-9]{4,})[ ].*$" }
]
}
],
// If the object did not match any of the rules above then don't add it to the vector tiles
"defaultKeepRuleType": "REMOVE"
}