CartoSym draft check

CartoSym 2.0 draft: every requirement in PR #133

Each requirement with its text, how it is checked, and links to the evidence: a gallery card for judgement calls, a sample render (below each class) for straightforward visual requirements, test cases for expressions, or a note for encodings. Samples show what the draft renderer draws; "Check" says what to look for. 137 requirements: 35 with a gallery card, 39 with a sample render, 66 with test cases, 12 checked as encodings, 2 partly and 2 not implemented. A requirement can be checked in more than one way.

core (clause 7)

1-core/sections/clause_7_core.adoc

RequirementChecked byEvidence
/req/core/rules
text
  • An Encoding SHALL support individually storing and preserving the order of each StylingRule constituting a Style.
  • A Renderer SHALL support considering in order each individual StylingRule constituting a style.
  • The Symbolizer properties specified in a StylingRule appearing later in a Style's list of rules and whose Selector
samplesample: Rules, selectors, nested rules and visibility
/req/core/selector
text
  • An Encoding SHALL support defining an optional selector for a StylingRule as an Expression evaluating to a boolean value.
  • A Renderer SHALL support applying the Symbolizer of a StylingRule to a feature or coverage cell only if the rule has no selector or if its selector evaluates to true for that feature or coverage cell.
samplesample: Rules, selectors, nested rules and visibility
/req/core/nested
text
  • An Encoding SHALL support defining a StylingRule with an ordered list of nested StylingRules.
  • A Renderer SHALL support considering the nested rules of a StylingRule only if that parent rule is selected.
  • A Renderer SHALL support the Symbolizer of a selected nested rule inheriting from, and overriding, the Symbolizer properties of its parent rule.
samplesample: Rules, selectors, nested rules and visibility
/req/core/symbolizer
text
  • An Encoding SHALL support defining a Symbolizer for a StylingRule, specifying any subset of the Symbolizer properties.
  • A Renderer SHALL support portraying data using the Symbolizer properties resulting from all selected StylingRules, using the default values for properties not set by any selected rule.
samplesample: Rules, selectors, nested rules and visibility
/req/core/visibility
text
  • An Encoding SHALL support defining a visibility Symbolizer property as a boolean.
  • A Renderer SHALL support not portraying a feature or coverage cell for which the resolved visibility property is false.
samplesample: Rules, selectors, nested rules and visibility
/req/core/opacity
text
  • An Encoding SHALL support defining an opacity Symbolizer property as a float between 0 (fully transparent) and 1 (fully opaque).
  • A Renderer SHALL support portraying a feature or coverage cell with the opacity specified by the resolved opacity property, applied to the portrayal as a whole.
cardcard: Symbolizer opacity: whole symbol or each part
/req/core/z-order
text
  • An Encoding SHALL support defining a zOrder Symbolizer property as an integer.
  • A Renderer SHALL support portraying features and coverage cells of a single rendering pass in increasing order of their resolved zOrder property, so that portrayals with a higher zOrder are drawn on top of those with a lower zOrder.
cardcard: Which zOrder is drawn on top
/req/core/parameters
text
  • An Encoding SHALL support defining Symbolizer properties as Parameter Values using Literal Expressions compatible with the data type expected by the property.
  • A Renderer SHALL support resolving Parameter Values to the data type expected by the Symbolizer property.
samplesample: Property values from expressions
/req/core/expressions-field-identifiers
text
  • An Encoding SHALL support defining Identifier Expressions referring to feature properties or coverage range fields by name.
  • A Renderer SHALL support resolving an Identifier Expression to the value of the named feature property or coverage range field for the feature or coverage cell being portrayed.
sample testedsample: Rules, selectors, nested rules and visibility
1 test case: draft renderer 1/1, libCartoSym –
/req/core/expressions-system-identifiers
text
  • An Encoding SHALL support defining System Identifier Expressions referring to the System Identifiers defined in this requirements class, including the capabilities System Identifiers.
  • A Renderer SHALL support resolving System Identifier Expressions to the corresponding state of the system, with each capabilities System Identifier resolving to true if and only if the Renderer supports the corresponding requirements class.
sample tested partlysample: Rules depending on the scale
1 test case: draft renderer 1/1, libCartoSym –
partly: viz.sd and dataLayer identifiers work; capabilities identifiers are not implemented
/req/core/scale
text
  • An Encoding SHALL support defining expressions using the visualization.scaleDenominator System Identifier.
  • A Renderer SHALL support resolving the visualization.scaleDenominator System Identifier to the scale denominator of the map being rendered.
sample testedsample: Rules depending on the scale
1 test case: draft renderer 1/1, libCartoSym –
/req/core/time
text
  • An Encoding SHALL support defining expressions using the visualization.dateTime, visualization.date, visualization.timeOfDay and visualization.timeInterval System Identifiers.
  • A Renderer SHALL support resolving the visualization time System Identifiers to the time instant or interval of the map being rendered.
not implementednot implemented: the draft renderer has no visualization time
/req/core/layers
text
  • An Encoding SHALL support defining expressions using the dataLayer.identifier and dataLayer.type System Identifiers.
  • A Renderer SHALL support resolving the dataLayer.identifier System Identifier to the identifier of the data layer being portrayed, and the dataLayer.type System Identifier to its type (map, vector or coverage).
samplesample: Rules, selectors, nested rules and visibility
/req/core/literals
text
  • An Encoding SHALL support defining integer, real, text, null, enumeration value, boolean, array and instance literals.
  • A Renderer SHALL support resolving literal expressions to their fixed value.
tested3 test cases: draft renderer 3/3, libCartoSym 3/3
/req/core/operations
text
  • An Encoding SHALL support defining operation expressions consisting of operands and an operator for unary, binary and ternary operators.
  • An Encoding SHALL support defining the priority of expressions using multiple operators (e.g., using parentheses: ( )).
  • A Renderer SHALL support evaluating operation expressions while respecting the priority of operations.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/core/logical
text
  • An Encoding SHALL support defining operation expressions using the and, or and not logical operators.
  • A Renderer SHALL support evaluating the and, or and not logical operators as defined in the Logical Operators table.
tested4 test cases: draft renderer 4/4, libCartoSym 2/4
/req/core/relational
text
  • An Encoding SHALL support defining operation expressions using the relational operators equal, notEqual, is, isNot, lesser, greater, lesserEqual, greaterEqual, in, notIn, between and notBetween.
  • A Renderer SHALL support evaluating the relational operators as defined in the Relational Operators table.
tested8 test cases: draft renderer 8/8, libCartoSym 5/8
/req/core/arrays
text
  • An Encoding SHALL support defining array expressions as an ordered list of zero or more element expressions.
  • A Renderer SHALL support resolving array expressions to an ordered array of the values of their element expressions.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/core/instances
text
  • An Encoding SHALL support defining instance expressions of a class, optionally specifying values for its members.
  • An Encoding SHALL support overriding a single member of an object Symbolizer property without replacing the other members.
  • A Renderer SHALL support resolving instance expressions to an object of the specified class, using default values for members which are not specified.
samplesample: Partial updates (alter) and array element updates
/req/core/default-values
text
  • An Encoding SHALL support omitting Symbolizer properties and object members for which a default value is defined in this section.
  • A Renderer SHALL support using the default values defined in this section for Symbolizer properties and object members which are not set by any selected StylingRule.
card samplecard: The default marker
sample: Rules, selectors, nested rules and visibility

Rules, selectors, nested rules and visibility

/req/core/rules /req/core/selector /req/core/nested /req/core/symbolizer /req/core/visibility /req/core/layers /req/core/expressions-field-identifiers /req/core/default-values

Check: Each parcel gets the color its rules give it. Farm: silver (only the layer rule applies), with the default black 1 px stroke. Large forest: forest green (nested rule). Small forest (area < 2000): light green (a rule nested twice). Lake: blue with a 3 px navy stroke. The second farm (hidden = true) is not drawn: the dashed outline only shows where it would be. Grey italic labels are annotations, not part of the style.

large forestsmall forestlakefarmfarm, hidden = true
style.cs.json · Parcels.geojson · view.json

Property values from expressions

/req/core/parameters /req/parameter-values/expressions

Check: Stroke width = lanes × 3 + 1 px: the roads with 1, 2 and 4 lanes are 4, 7 and 13 px wide.

1 lane2 lanes4 lanes
style.cs.json · Roads.geojson · view.json

Rules depending on the scale

/req/core/scale /req/core/expressions-system-identifiers

Check: The dots are shown at both scales; a nested rule on viz.sd < 10 000 adds the labels, so they show at 1:5 000 only.

KongsbergHvittingfoss
1:5 000style.cs.json · Places.geojson · view.json
1:20 000 (the same places, smaller)style.cs.json · Places.geojson · view.json

Partial updates (alter) and array element updates

/req/core/instances /req/json/partial-update /req/json/array-element-update

Check: First: a later rule with alter: true changes only the width, so the line stays red. Second: the same rule without alter replaces the whole stroke, so the color falls back to the default black. Third and fourth: the dash pattern [16, 8] before and after a later rule sets {index: 1, value: 2}, which changes only the gap, to [16, 2].

alter: truestyle.cs.json · Roads.geojson · view.json
no alterstyle.cs.json · Roads.geojson · view.json
before: dashPattern [16, 8]style.cs.json · Roads.geojson · view.json
after: element 1 set to 2, [16, 2]style.cs.json · Roads.geojson · view.json

rc-arithmetic

1-core/requirements/rc-arithmetic.adoc

RequirementChecked byEvidence
/req/arithmetic/add
text
  • An Encoding SHALL support defining an add operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating an add operation expression as the sum of its two operands.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/arithmetic/sub
text
  • An Encoding SHALL support defining a sub operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating a sub operation expression as the first operand minus the second operand.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/arithmetic/mul
text
  • An Encoding SHALL support defining a mul operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating a mul operation expression as the product of its two operands.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/arithmetic/div
text
  • An Encoding SHALL support defining a div operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating a div operation expression as the real-valued quotient of the first operand divided by the second operand, including when both operands are integers.
card testedcard: Example 7: NDVI with integer bands
2 test cases: draft renderer 2/2, libCartoSym 1/2
/req/arithmetic/int-div
text
  • An Encoding SHALL support defining an intDiv operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating an intDiv operation expression as the integer quotient of the first operand divided by the second operand, truncated toward zero.
tested2 test cases: draft renderer 2/2, libCartoSym 0/2
/req/arithmetic/mod
text
  • An Encoding SHALL support defining a mod operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating a mod operation expression as the remainder of the first operand divided by the second operand, consistent with the intDiv operator (i.e., the result has the sign of the first operand).
tested2 test cases: draft renderer 2/2, libCartoSym 2/2
/req/arithmetic/pow
text
  • An Encoding SHALL support defining a pow operation expression taking two numeric operands.
  • A Renderer SHALL support evaluating a pow operation expression as the first operand raised to the power of the second operand.
tested1 test case: draft renderer 1/1, libCartoSym 1/1

rc-array-relations

1-core/requirements/rc-array-relations.adoc

RequirementChecked byEvidence
/req/array-relations/a-contained-by
text
  • An Encoding SHALL support defining a call to the a_containedBy standard function taking two array arguments.
  • A Renderer SHALL support evaluating a_containedBy(a, b) to true if and only if every element of array a is also an element of array b.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/array-relations/a-contains
text
  • An Encoding SHALL support defining a call to the a_contains standard function taking two array arguments.
  • A Renderer SHALL support evaluating a_contains(a, b) to true if and only if every element of array b is also an element of array a.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/array-relations/a-equals
text
  • An Encoding SHALL support defining a call to the a_equals standard function taking two array arguments.
  • A Renderer SHALL support evaluating a_equals(a, b) to true if and only if arrays a and b have the same number of elements and each element of a is equal to the element of b at the same position.
tested2 test cases: draft renderer 2/2, libCartoSym 2/2
/req/array-relations/a-overlaps
text
  • An Encoding SHALL support defining a call to the a_overlaps standard function taking two array arguments.
  • A Renderer SHALL support evaluating a_overlaps(a, b) to true if and only if arrays a and b have at least one element in common.
tested2 test cases: draft renderer 2/2, libCartoSym 2/2

rc-casing

1-core/requirements/rc-casing.adoc

RequirementChecked byEvidence
/req/casing/casing
text
  • An Encoding SHALL support defining a casing Stroke property as a StrokeStyling object.
  • A Renderer SHALL support drawing the casing of a stroke along the same geometry as the stroke, using the StrokeStyling specified by the casing property, beneath the main stroke.
  • A Renderer SHALL support drawing the casing so that it extends the width of the casing beyond each side of the main stroke, for a total width of the main stroke's width plus twice the casing's width.
  • A Renderer SHALL support drawing, within a single visualization pass, the casings of all features with the same zOrder beneath the main strokes of all those features, so that the casings of crossing and joining lines merge.
cardcard: Casing beneath or above the stroke
card: Casing at crossings
card: What casing width means
/req/casing/center
text
  • An Encoding SHALL support defining a center Stroke property as a StrokeStyling object.
  • A Renderer SHALL support drawing the center line of a stroke along the same geometry as the stroke, using the StrokeStyling specified by the center property, on top of the main stroke.
cardcard: Casing beneath or above the stroke

rc-conditional

1-core/requirements/rc-conditional.adoc

RequirementChecked byEvidence
/req/conditional/condition
text
  • An Encoding SHALL support defining a ConditionalExpression with a condition property as an Expression evaluating to a boolean value.
  • A Renderer SHALL support evaluating the condition of a ConditionalExpression to select whether the ConditionalExpression resolves to its thenExp or its elseExp expression.
tested2 test cases: draft renderer 2/2, libCartoSym 0/2
/req/conditional/then-exp
text
  • An Encoding SHALL support defining a ConditionalExpression with a thenExp property as an Expression.
  • A Renderer SHALL support resolving a ConditionalExpression to the value of its thenExp expression when its condition evaluates to true.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/conditional/else-exp
text
  • An Encoding SHALL support defining a ConditionalExpression with an elseExp property as an Expression.
  • A Renderer SHALL support resolving a ConditionalExpression to the value of its elseExp expression when its condition does not evaluate to true.
tested1 test case: draft renderer 1/1, libCartoSym 0/1

rc-coverage

1-core/requirements/rc-coverage.adoc

RequirementChecked byEvidence
/req/coverage/color-channels
text
  • An Encoding SHALL support defining a colorChannels Symbolizer property as a Color object.
  • A Renderer SHALL support portraying each coverage cell with the red, green and blue components resolved from the colorChannels property for that cell, each in the range 0 to 1.
cardcard: Example 6: scaling colorChannels
/req/coverage/alpha-channel
text
  • An Encoding SHALL support defining a alphaChannel Symbolizer property as a float.
  • A Renderer SHALL support portraying each coverage cell with the opacity resolved from the alphaChannel property for that cell, where 0 is fully transparent and 1 is fully opaque.
card samplecard: Example 6: scaling colorChannels
sample: Coverage opacity map
/req/coverage/single-channel
text
  • An Encoding SHALL support defining a singleChannel Symbolizer property as a float.
  • A Renderer SHALL support using the value resolved from the singleChannel property for each coverage cell as the input value to the colorMap and opacityMap properties.
card samplecard: Example 7: NDVI with integer bands
sample: Coverage opacity map
/req/coverage/color-map
text
  • An Encoding SHALL support defining a colorMap Symbolizer property as an array of value (float) and color (Color) pairs which can be tagged with a name.
  • A Renderer SHALL support portraying each coverage cell with the color mapped from its singleChannel value by the colorMap, using the color of an entry for a value equal to that entry's value, interpolating between the colors of the two closest entries for other values within the range of the map, and using the color of the first or last entry for values outside the range of the map.
cardcard: Example 5: colorMap between and beyond entries
card: Example 7: NDVI with integer bands
/req/coverage/opacity-map
text
  • An Encoding SHALL support defining a opacityMap Symbolizer property as an array of value (float) and opacity (float) pairs which can be tagged with a name.
  • A Renderer SHALL support portraying each coverage cell with the opacity mapped from its singleChannel value by the opacityMap, using the opacity of an entry for a value equal to that entry's value, interpolating between the opacities of the two closest entries for other values within the range of the map, and using the opacity of the first or last entry for values outside the range of the map.
card samplecard: Example 5: colorMap between and beyond entries
sample: Coverage opacity map
/rec/coverage/map-interpolation
text
  • A Renderer SHOULD interpolate the colors of a colorMap and the opacities of an opacityMap so that the result lies between those of the two closest entries.
cardcard: Example 5: colorMap between and beyond entries
/req/coverage/gamma
text
  • An Encoding SHOULD support defining a gamma Symbolizer property as a float.
  • A Renderer SHOULD support applying a gamma correction to the portrayed color values, using the value of the gamma property as the exponent applied to normalized (0 to 1) color components.
cardcard: Direction of coverage gamma

Coverage opacity map

/req/coverage/opacity-map /req/coverage/single-channel /req/coverage/alpha-channel

Check: Example 5's colors (stretched to Rondane's 500–2000 m) with an opacityMap from 0 at 500 m to 1 at 2000 m, over a striped background: the stripes show through the valleys and disappear under the peaks. Elevation data © Kartverket, CC BY 4.0.

rc-cscss

1-core/requirements/rc-cscss.adoc

RequirementChecked byEvidence
/req/cscss/grammar
text
  • A style encoded as CartoSym-CSS SHALL conform to the BNF grammar definition of this requirements class.
  • A Renderer SHALL support parsing styles encoded as CartoSym-CSS.
encodingthe spec's examples 5 to 9 converted with pycartosym and parsed by libCartoSym
/req/cscss/rules
text
  • An Encoding SHALL support encoding a style as a sequence of styling rules, each consisting of zero or more selectors, an optional .name, symbolizer property assignments and nested rules enclosed within { }.
  • An Encoding SHALL support assigning a value to a member of an object property (using .) or to an element of an array property (using [ ]), overriding only that portion of the property.
  • A Renderer SHALL support symbolizer properties set further down in rules overriding those set by rules at the same level appearing earlier, and properties set in nested rules overriding those set in the parent rule.
encodingas for the grammar
/req/cscss/selectors
text
  • An Encoding SHALL support defining selectors either as expressions enclosed within [ ], or as a short-hand data layer name.
  • A Renderer SHALL support combining multiple expression selectors of a rule with a logical AND, combining multiple data layer name selectors with a logical OR, and combining those two groups with a logical AND.
encodingas for the grammar
/req/cscss/expressions
text
  • An Encoding SHALL encode expressions using CQL2-Text, extended with instance expressions, tuples, units of measure, conditional expressions and enumeration values as specified in this requirements class.
  • A Renderer SHALL support evaluating CQL2-Text expressions (including WKT geometry) used directly as a selector or symbolizer parameter value.
encodingas for the grammar
/req/cscss/include
text
  • An Encoding SHALL support including another style sheet using the .include directive followed by a relative path enclosed within single quotes.
  • A Renderer SHALL support replacing an .include directive by the content of the referenced style sheet, recursively, before interpreting the style.
encodingpycartosym converts .include to $include, keeping the file's own rules and variables
/req/cscss/comments
text
  • An Encoding SHALL support C-style multi-line comments (between /\* and */) and C++-style single-line comments (starting with //).
  • A Renderer SHALL support ignoring comments when interpreting a style sheet.
encodingthe spec's examples contain comments; they convert
/req/cscss/variables
text
  • An Encoding supporting the <<rc-variables,Variables>> requirements class SHALL define variables before the styling rules using the syntax @<identifier> = <expression>;, and reference them as an expression using @<identifier>.
encodingpycartosym converts @variables to $variables and $ref, including variables defined by expressions; the draft renderer resolves them

rc-dashes

1-core/requirements/rc-dashes.adoc

RequirementChecked byEvidence
/req/dashes/dash-pattern
text
  • An Encoding SHALL support defining a dashPattern property for the stroke symbolizer.
  • A Renderer SHALL support dashing vector geometry based on a dashPattern property, whose lengths are in pixels unless qualified with another unit (<<graphical-units-of-measure,Graphical Units of Measure>>).
cardcard: Units of dashPattern
/req/dashes/dash-offset
text
  • An Encoding SHALL support defining a dashOffset property for the stroke symbolizer.
  • A Renderer SHALL support dashing vector geometry based on a dashOffset property.
samplesample: Dash offset

Dash offset

/req/dashes/dash-offset

Check: Both lines use dashPattern [16, 8]; the lower one has dashOffset 8 px, so its dashes start 8 px later.

dashOffset 0dashOffset 8 px
style.cs.json · Lines.geojson · view.json

rc-dotpatterns

1-core/requirements/rc-dotpatterns.adoc

RequirementChecked byEvidence
/req/dot-patterns/dotpattern
text
  • An Encoding SHALL support defining a dotpattern property within the Fill class, defined as a Dotpattern class.
  • A Renderer SHALL support filling vector geometry with a regular grid of points based on a dotpattern property.
card samplecard: What a stipple or dot-pattern dot looks like
sample: Dot pattern distance
/req/dot-patterns/distance
text
  • An Encoding SHALL support defining a distance Dotpattern property as a Distance object including a horizontal and a vertical float.
  • A Renderer SHALL support spacing the rendered points of a dot pattern fill horizontally by the horizontal distance and vertically by the vertical distance.
card samplecard: What a stipple or dot-pattern dot looks like
sample: Dot pattern distance

Dot pattern distance

/req/dot-patterns/dotpattern /req/dot-patterns/distance

Check: Left: dots every 8 px both ways. Right: horizontal 20 px, vertical 8 px, so columns of closely spaced dots, 20 px apart.

8 × 8 px20 × 8 px
style.cs.json · A.geojson · B.geojson · view.json

rc-font-outlines

1-core/requirements/rc-font-outlines.adoc

RequirementChecked byEvidence
/req/font-outlines/outline
text
  • An Encoding SHALL support defining an outline Font property as a FontOutline object including a size, an opacity and a color.
  • A Renderer SHALL support drawing an outline around the glyphs of text drawn with a Font specifying an outline, beneath the glyphs themselves.
cardcard: Font outline beneath or above the glyphs
/req/font-outlines/size
text
  • An Encoding SHALL support defining a size FontOutline property as a float.
  • A Renderer SHALL support drawing the outline extending outward from the glyph contours by the thickness specified by the size property.
card samplecard: Font outline beneath or above the glyphs
sample: Font outline size, opacity and color
/req/font-outlines/opacity
text
  • An Encoding SHALL support defining an opacity FontOutline property as a float between 0 (fully transparent) and 1 (fully opaque).
  • A Renderer SHALL support drawing the outline with the opacity specified by the opacity property.
samplesample: Font outline size, opacity and color
/req/font-outlines/color
text
  • An Encoding SHALL support defining a color FontOutline property as a Color.
  • A Renderer SHALL support drawing the outline in the color specified by the color property.
samplesample: Font outline size, opacity and color

Font outline size, opacity and color

/req/font-outlines/size /req/font-outlines/opacity /req/font-outlines/color

Check: On the dark band: a 1 px white outline, a 4 px yellow outline, and a 4 px white outline at opacity 0.3.

Outline 1 pxOutline 4 pxOpacity 0.3
style.cs.json · Band.geojson · L1.geojson · L2.geojson · L3.geojson · view.json

rc-functions

1-core/requirements/rc-functions.adoc

RequirementChecked byEvidence
/req/functions/call-expressions
text
  • An Encoding SHALL support defining a FunctionCallExpression identifying the Function to call and an ordered list of zero or more argument Expressions.
  • A Renderer SHALL support evaluating a FunctionCallExpression by evaluating its arguments and resolving the expression to the value returned by the Function, of the Function's return type.
  • A Renderer SHALL treat a FunctionCallExpression whose arguments do not match the parameters of the Function, in number or type, as invalid.
tested2 test cases: draft renderer 2/2, libCartoSym 0/2
/req/functions/standard-functions
text
  • An Encoding SHALL support identifying standard functions by their name, with the name mapping to the URI of the standard function.
  • A Renderer SHALL support standard functions as specified by the requirements class defining them, with the parameters, return type and behavior defined there.
tested1 test case: draft renderer 1/1, libCartoSym 0/1

rc-hatches

1-core/requirements/rc-hatches.adoc

RequirementChecked byEvidence
/req/hatches/hatch
text
  • An Encoding SHALL support defining a hatch property within the Fill class, defined as a Hatch class.
  • A Renderer SHALL support filling vector geometry with a pattern of parallel lines based on a hatch property.
samplesample: Hatch width and distance
/req/hatches/width
text
  • An Encoding SHALL support defining a width property for the hatch fill symbolizer.
  • A Renderer SHALL support fill hatching vector geometry based on a width property.
samplesample: Hatch width and distance
/req/hatches/angle
text
  • An Encoding SHALL support defining an angle property for the hatch fill symbolizer.
  • A Renderer SHALL support fill hatching vector geometry based on an angle property.
cardcard: Hatch angle direction
/req/hatches/distance
text
  • An Encoding SHALL support defining a distance property for the hatch fill symbolizer.
  • A Renderer SHALL support fill hatching vector geometry based on a distance property.
samplesample: Hatch width and distance

Hatch width and distance

/req/hatches/hatch /req/hatches/width /req/hatches/distance

Check: Left: the defaults (1 px lines every 10 px at 45°). Middle: width 3 px. Right: distance 20 px.

defaultswidth 3 pxdistance 20 px
style.cs.json · A.geojson · B.geojson · C.geojson · view.json

rc-hillshading

1-core/requirements/rc-hillshading.adoc

RequirementChecked byEvidence
/req/hill-shading/hill-shading
text
  • An Encoding SHALL support defining a hillShading Symbolizer property as an object including factor, sun, colorMap and opacityMap properties.
  • A Renderer SHALL support computing the terrain surface normal of each cell from the differences in elevation between neighbouring samples of the elevation coverage at the resolution being rendered, over the horizontal distance between those samples, in the same units as the elevation.
  • A Renderer SHALL support portraying an elevation coverage with a shade value computed for each cell as the dot product of the unit normal of the terrain surface and the unit vector pointing towards the sun, clamped to the range 0 to 1, where 0 is full shade (the sun at 90 degrees or more from the normal) and 1 is no shade (the sun in the direction of the normal).
  • A Renderer SHALL support, where the HillShading has no colorMap, multiplying the red, green and blue components of each cell by its shade value.
cardcard: Example 8: what hillShading factor means
/req/hill-shading/factor
text
  • An Encoding SHALL support defining a factor HillShading property as a float.
  • A Renderer SHALL support multiplying the horizontal components of the terrain surface normal by the factor property before normalizing it, so that a factor of 1 shades the terrain as it is and a larger factor exaggerates the relief.
cardcard: Example 8: what hillShading factor means
card: Example 9: shading intensity mapped to color and opacity
/req/hill-shading/sun
text
  • An Encoding SHALL support defining a sun HillShading property as an object consisting of azimuth and elevation angle members representing the orientation of the sun relative to the terrain.
  • A Renderer SHALL support computing the shade of each cell for a light source at the azimuth angle (in degrees clockwise from North, as a compass bearing) and elevation angle (relative to the ground) specified by the sun property.
cardcard: Direction of the sun azimuth
/req/hill-shading/color-map
text
  • An Encoding SHALL support defining a colorMap HillShading property as an array of value (float) and color (Color) pairs.
  • A Renderer SHALL support portraying each cell with the color mapped from its computed shade value by the colorMap, as for the colorMap Symbolizer property.
cardcard: Example 9: shading intensity mapped to color and opacity
/req/hill-shading/opacity-map
text
  • An Encoding SHALL support defining a opacityMap HillShading property as an array of value (float) and opacity (float) pairs.
  • A Renderer SHALL support portraying each cell with the opacity mapped from its computed shade value by the opacityMap, as for the opacityMap Symbolizer property.
cardcard: Example 9: shading intensity mapped to color and opacity

rc-json

1-core/requirements/rc-json.adoc

RequirementChecked byEvidence
/req/json/schema
text
  • A style encoded as CartoSym-JSON SHALL validate against the CartoSym-JSON JSON Schema defined in this requirements class.
  • A Renderer SHALL support parsing styles encoded as CartoSym-JSON.
encodingevery gallery and sample style is validated against the PR's JSON schema on each build
/req/json/expressions
text
  • An Encoding SHALL encode Selector and Symbolizer Parameter Value expressions based on the CQL2-JSON encoding, extended as specified by the JSON Schema to cover expressions which do not evaluate to a boolean value.
encodingevery style in the gallery uses CQL2-JSON expressions
/req/json/partial-update
text
  • An Encoding SHALL support representing a partial update of an object property by specifying an object containing only the modified properties, with an alter property set to true.
  • A Renderer SHALL support preserving the values of the properties not specified in an object whose alter property is true, as set by earlier rules or by default values.
samplesample: Partial updates (alter) and array element updates
/req/json/array-element-update
text
  • An Encoding SHALL support representing an update to a single element of an array property by specifying an object with an index property set to the zero-based index of the array element, and a value property set to the new value of that element.
  • A Renderer SHALL support updating only the array element identified by index, preserving the other elements of the array.
samplesample: Partial updates (alter) and array element updates
/req/json/dot-size-color
text
  • An Encoding SHALL NOT set both size and stroke.width, nor both color and stroke.color, for the same Dot within a single styling rule.
encodingenforced by the PR's JSON schema (not on Dot), which every style is validated against
/req/json/variables
text
  • An Encoding supporting the <<rc-variables,Variables>> requirements class SHALL encode variables as members of a top-level $variables object, referenced using a JSON Pointer within a $ref property (e.g., { "$ref": "#/$variables/myVariable" }).
encodingtested (variables cases) and used by the draft renderer
/req/json/include
text
  • An Encoding SHALL support including base style sheets using an $include property in the top-level object, specified as either a single relative file path string or an array of relative file path strings.
  • A Renderer SHALL support considering the styling rules of included style sheets before the styling rules defined by the including file.
encodingread by the draft renderer ($include, included rules first)

rc-labels

1-core/requirements/rc-labels.adoc

RequirementChecked byEvidence
/req/labels/label
text
  • An Encoding SHALL support defining a label Symbolizer property as a Label, which is a MultiGraphic that can contain multiple graphical elements.
  • A Renderer SHALL support drawing the graphical elements of the labels as a separate pass on top of all styled vector features and coverages.
  • A Renderer SHALL support omitting labels which cannot be placed without overlapping other labels.
cardcard: Which label priority wins
card: Labels on top of everything
/req/labels/placement
text
  • An Encoding SHALL support defining a placement Label property as a LabelPlacement object including a priority, a minSpacing and a maxSpacing.
  • A Renderer SHALL support placing labels so that a label with a higher priority is placed in preference to a conflicting label with a lower priority.
  • A Renderer SHALL support repeating a label so that the distance between repetitions of that label is at least minSpacing and, where space allows, at most maxSpacing, both in pixels unless qualified with another unit (<<graphical-units-of-measure,Graphical Units of Measure>>).
card partlycard: Which label priority wins
card: Units of label minSpacing
partly: priority and minSpacing are rendered; maxSpacing is not implemented

rc-math

1-core/requirements/rc-math.adoc

RequirementChecked byEvidence
/req/math/abs
text
  • An Encoding SHALL support defining a call to the abs standard function taking one numeric argument.
  • A Renderer SHALL support evaluating abs(x) as the absolute value of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/acos
text
  • An Encoding SHALL support defining a call to the acos standard function taking one numeric argument.
  • A Renderer SHALL support evaluating acos(x) as the arc cosine of x, in radians, in the range [0, π].
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/asin
text
  • An Encoding SHALL support defining a call to the asin standard function taking one numeric argument.
  • A Renderer SHALL support evaluating asin(x) as the arc sine of x, in radians, in the range [-π/2, π/2].
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/atan
text
  • An Encoding SHALL support defining a call to the atan standard function taking one numeric argument.
  • A Renderer SHALL support evaluating atan(x) as the arc tangent of x, in radians, in the range [-π/2, π/2].
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/atan2
text
  • An Encoding SHALL support defining a call to the atan2 standard function taking two numeric arguments.
  • A Renderer SHALL support evaluating atan2(y, x) as the angle, in radians in the range [-π, π], between the positive x axis and the point (x, y).
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/ceil
text
  • An Encoding SHALL support defining a call to the ceil standard function taking one numeric argument.
  • A Renderer SHALL support evaluating ceil(x) as the smallest integral value greater than or equal to x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/cos
text
  • An Encoding SHALL support defining a call to the cos standard function taking one numeric argument.
  • A Renderer SHALL support evaluating cos(x) as the cosine of x expressed in radians.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/cosh
text
  • An Encoding SHALL support defining a call to the cosh standard function taking one numeric argument.
  • A Renderer SHALL support evaluating cosh(x) as the hyperbolic cosine of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/exp
text
  • An Encoding SHALL support defining a call to the exp standard function taking one numeric argument.
  • A Renderer SHALL support evaluating exp(x) as Euler's number _e_ raised to the power of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/floor
text
  • An Encoding SHALL support defining a call to the floor standard function taking one numeric argument.
  • A Renderer SHALL support evaluating floor(x) as the largest integral value less than or equal to x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/log
text
  • An Encoding SHALL support defining a call to the log standard function taking one numeric argument.
  • A Renderer SHALL support evaluating log(x) as the natural (base _e_) logarithm of x.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/math/log10
text
  • An Encoding SHALL support defining a call to the log10 standard function taking one numeric argument.
  • A Renderer SHALL support evaluating log10(x) as the base 10 logarithm of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/max
text
  • An Encoding SHALL support defining a call to the max standard function taking two numeric arguments.
  • A Renderer SHALL support evaluating max(x, y) as the greater of x and y.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/min
text
  • An Encoding SHALL support defining a call to the min standard function taking two numeric arguments.
  • A Renderer SHALL support evaluating min(x, y) as the smaller of x and y.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/pow
text
  • An Encoding SHALL support defining a call to the pow standard function taking two numeric arguments.
  • A Renderer SHALL support evaluating pow(x, y) as x raised to the power of y.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/math/random
text
  • An Encoding SHALL support defining a call to the random standard function taking no argument.
  • A Renderer SHALL support evaluating random() as a pseudo-random real number greater than or equal to 0 and less than 1.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/rint
text
  • An Encoding SHALL support defining a call to the rint standard function taking one numeric argument.
  • A Renderer SHALL support evaluating rint(x) as the integral value closest to x, rounding halfway cases to the even integral value.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/round
text
  • An Encoding SHALL support defining a call to the round standard function taking one numeric argument.
  • A Renderer SHALL support evaluating round(x) as the integer closest to x, rounding halfway cases toward positive infinity.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/sin
text
  • An Encoding SHALL support defining a call to the sin standard function taking one numeric argument.
  • A Renderer SHALL support evaluating sin(x) as the sine of x expressed in radians.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/sinh
text
  • An Encoding SHALL support defining a call to the sinh standard function taking one numeric argument.
  • A Renderer SHALL support evaluating sinh(x) as the hyperbolic sine of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/sqrt
text
  • An Encoding SHALL support defining a call to the sqrt standard function taking one numeric argument.
  • A Renderer SHALL support evaluating sqrt(x) as the positive square root of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/tan
text
  • An Encoding SHALL support defining a call to the tan standard function taking one numeric argument.
  • A Renderer SHALL support evaluating tan(x) as the tangent of x expressed in radians.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/math/tanh
text
  • An Encoding SHALL support defining a call to the tanh standard function taking one numeric argument.
  • A Renderer SHALL support evaluating tanh(x) as the hyperbolic tangent of x.
tested1 test case: draft renderer 1/1, libCartoSym 0/1

rc-parameter-values

1-core/requirements/rc-parameter-values.adoc

RequirementChecked byEvidence
/req/parameter-values/expressions
text
  • An Encoding SHALL support defining the value of any Symbolizer property, including members of object properties, using any type of Expression, not only Literal Expressions.
  • A Renderer SHALL support evaluating Expressions used as Parameter Values for each feature or coverage cell being portrayed, and resolving the result to the data type expected by the Symbolizer property.
sample testedsample: Property values from expressions
1 test case: draft renderer 1/1, libCartoSym –

rc-righthand

1-core/requirements/rc-righthand.adoc

RequirementChecked byEvidence
/req/right-hand/operands
text
  • An Encoding SHALL support defining the right-hand operands of RelationExpressions using any type of Expression (e.g., Identifier Expressions or Function call Expressions), not only Literal Expressions.
  • A Renderer SHALL support evaluating RelationExpressions whose right-hand operands are any type of Expression.
tested2 test cases: draft renderer 2/2, libCartoSym 0/1

rc-stipples

1-core/requirements/rc-stipples.adoc

RequirementChecked byEvidence
/req/stipples/ratio
text
  • An Encoding SHALL support defining a ratio property for the stipple fill symbolizer.
  • A Renderer SHALL support stipple fill vector geometry based on a ratio property.
cardcard: What a stipple or dot-pattern dot looks like

rc-text-manipulation

1-core/requirements/rc-text-manipulation.adoc

RequirementChecked byEvidence
/req/text-manipulation/case-insensitize
text
  • An Encoding SHALL support defining a caseInsensitize function that makes a string suitable for case-insensitive comparison.
  • A Renderer SHALL support evaluating the caseInsensitize function such that two strings differing only in letter case compare as equal once both are case-insensitized (equivalent to the CQL2 CASEI function).
tested2 test cases: draft renderer 2/2, libCartoSym 1/2
/req/text-manipulation/accent-insensitize
text
  • An Encoding SHALL support defining an accentInsensitize function that removes accents from a string.
  • A Renderer SHALL support removing accents from a string using the accentInsensitize function (equivalent to the CQL2 ACCENTI function).
tested3 test cases: draft renderer 3/3, libCartoSym 1/3
/req/text-manipulation/lower-case
text
  • An Encoding SHALL support defining a lowerCase function that converts a string to lowercase.
  • A Renderer SHALL support converting a string to lowercase using the lowerCase function.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-manipulation/upper-case
text
  • An Encoding SHALL support defining an upperCase function that converts a string to uppercase.
  • A Renderer SHALL support converting a string to uppercase using the upperCase function.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-manipulation/concatenate
text
  • An Encoding SHALL support defining a concatenate function that concatenates strings.
  • A Renderer SHALL support concatenating strings using the concatenate function.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/text-manipulation/substitute
text
  • An Encoding SHALL support defining a substitute function that replaces a substring with another string.
  • A Renderer SHALL support replacing a substring with another string using the substitute function.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-manipulation/format
text
  • An Encoding SHALL support defining a format function that formats a string.
  • A Renderer SHALL support formatting a string using the format function, whose format string uses the conversion specifiers of the C printf function (ANSI C).
tested1 test case: draft renderer 1/1, libCartoSym 1/1

rc-text-relation

1-core/requirements/rc-text-relation.adoc

RequirementChecked byEvidence
/req/text-relation/like
text
  • An Encoding SHALL support defining a like operation expression taking a text operand and a text pattern operand, where % in the pattern matches any sequence of zero or more characters and _ matches exactly one character.
  • A Renderer SHALL support evaluating a like operation expression to true if and only if the first operand matches the pattern specified by the second operand.
tested4 test cases: draft renderer 4/4, libCartoSym 4/4
/req/text-relation/not-like
text
  • An Encoding SHALL support defining a notLike operation expression taking a text operand and a text pattern operand, using the same pattern syntax as the like operator.
  • A Renderer SHALL support evaluating a notLike operation expression to the logical negation of the equivalent like operation expression.
tested1 test case: draft renderer 1/1, libCartoSym 1/1
/req/text-relation/contains
text
  • An Encoding SHALL support defining a contains operation expression taking two text operands.
  • A Renderer SHALL support evaluating a contains operation expression to true if and only if the second operand occurs as a substring of the first operand.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-relation/starts-with
text
  • An Encoding SHALL support defining a startsWith operation expression taking two text operands.
  • A Renderer SHALL support evaluating a startsWith operation expression to true if and only if the first operand begins with the second operand.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-relation/ends-with
text
  • An Encoding SHALL support defining an endsWith operation expression taking two text operands.
  • A Renderer SHALL support evaluating an endsWith operation expression to true if and only if the first operand ends with the second operand.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-relation/not-contains
text
  • An Encoding SHALL support defining a notContains operation expression taking two text operands.
  • A Renderer SHALL support evaluating a notContains operation expression to the logical negation of the equivalent contains operation expression.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-relation/not-starts-with
text
  • An Encoding SHALL support defining a notStartsWith operation expression taking two text operands.
  • A Renderer SHALL support evaluating a notStartsWith operation expression to the logical negation of the equivalent startsWith operation expression.
tested1 test case: draft renderer 1/1, libCartoSym 0/1
/req/text-relation/not-ends-with
text
  • An Encoding SHALL support defining a notEndsWith operation expression taking two text operands.
  • A Renderer SHALL support evaluating a notEndsWith operation expression to the logical negation of the equivalent endsWith operation expression.
tested1 test case: draft renderer 1/1, libCartoSym 0/1

rc-variables

1-core/requirements/rc-variables.adoc

RequirementChecked byEvidence
/req/variables/definition
text
  • An Encoding SHALL support defining named variables, each associated with an Expression providing its value.
  • A Renderer SHALL support allowing an application to override the value of a defined variable at run time (e.g., from a slider or drop-down control).
tested2 test cases: draft renderer 2/2, libCartoSym –
/req/variables/expression
text
  • An Encoding SHALL support defining a VariableExpression referencing a variable by its name anywhere an Expression is allowed.
  • A Renderer SHALL support resolving a VariableExpression to the current value of the referenced variable.
tested1 test case: draft renderer 1/1, libCartoSym –

rc-vector

1-core/requirements/rc-vector.adoc

RequirementChecked byEvidence
/req/vector/fill
text
  • An Encoding SHALL support defining a fill Symbolizer property as an object including a color and an opacity.
  • A Renderer SHALL support filling vector geometry based on a fill property specifying a color and an opacity.
samplesample: Fill and stroke
/req/vector/stroke
text
  • An Encoding SHALL support defining a stroke Symbolizer property as an object including a color and a units of measure-qualified ("uom-qualified") width.
  • A Renderer SHALL support drawing the stroke of vector geometry based on a stroke property specifying a color and a uom-qualified width.
samplesample: Fill and stroke
/req/vector/units
text
  • An Encoding SHALL support qualifying distance properties identified as "uom-qualified" with a unit of measure (pixel, millimeter, inch, percentage, meter, foot).
  • A Renderer SHALL support applying the appropriate unit transformation when rendering elements specifying a uom-qualified distances.
samplesample: Units of measure
/req/vector/marker
text
  • An Encoding SHALL support defining a marker Symbolizer property as an array of graphical elements (Graphics).
  • A Renderer SHALL support drawing the graphical elements of a marker at the points of vector geometry (for points and line strings) and at the centroid of polygons.
card samplecard: The default marker
sample: Where markers go
/req/vector/graphics
text
  • An Encoding SHALL support defining graphical elements (graphics) specifying a uom-qualified 2D real position offsetting the graphic from its original position.
  • A Renderer SHALL support drawing the Graphics at the specified uom-qualified 2D position offset relative to its original position.
samplesample: Graphic position offset
/req/vector/dot
text
  • An Encoding SHALL support defining a Dot Graphic inheriting from a base Shape class specifying a stroke, with a uom-qualified size property and a color property that are the same values as the width and the color of its stroke.
  • A Renderer SHALL support setting the width and the color of the stroke of a Dot when its size and color are set, and the reverse, so that the value set last applies to both.
  • A Renderer SHALL support drawing a Dot Graphic as a filled circle whose diameter is its size (the width of its stroke), in its color (the color of its stroke).
card samplecard: The default marker
sample: Graphic position offset
/req/vector/image
text
  • An Encoding SHALL support defining an Image Graphic with an image property referencing an image resource, an optional uom-qualified hotSpot position within the image, optional tint and blackTint Colors, and an optional alphaThreshold real number between 0 and 1.
  • A Renderer SHALL support drawing the referenced image so that its hotSpot (by default, its center, { 0.5, 0.5 }) is located at the position of the Graphic.
  • A Renderer SHALL support recoloring the image so that each red, green and blue component _v_ (between 0 and 1) of each pixel becomes tint × _v_ + blackTint × (1 − _v_), using the same component of tint and blackTint.
card samplecard: Default hot spot of an Image
sample: Image tint and black tint
/per/vector/image-alpha-test
text
  • A Renderer MAY use alphaThreshold as the threshold of an alpha test, by not drawing the pixels of the image whose alpha value is below it.
not implementednot implemented: a permission; the draft renderer has no picking and no alpha test
/req/vector/text
text
  • An Encoding SHALL support defining a Text Graphic with a text unicode string content, a font, and an alignment with a horizontal (horzAlignment: left, right or center) and vertical component (vertAlignment: top, middle, bottom).
  • A Renderer SHALL support drawing the text of a Text Graphic using the font and the alignment specified.
samplesample: Text and fonts
/req/vector/fonts
text
  • An Encoding SHALL support defining Fonts with a face property indicating the face name (also known as the font _family_), a size specified in _points_, a bold flag indicating to use a bold weight if true, and an italic flag indicating to use an italic style if true.
  • A Renderer SHALL support drawing text using the fonts specified.
samplesample: Text and fonts

Fill and stroke

/req/vector/fill /req/vector/stroke

Check: Left: a teal fill at opacity 1 with a 2 px black stroke. Right: the same fill at opacity 0.4 over the grey band, with a 6 px crimson stroke at opacity 0.6.

Units of measure

/req/vector/units

Check: At 2 px per metre: 4 px, 2 mm (7.1 px at 0.28 mm per pixel) and 10 m (20 px).

width 4 pxwidth 2 mmwidth 10 m
style.cs.json · Lines.geojson · view.json

Where markers go

/req/vector/marker

Check: A dot at the point, at every vertex of the line, and at the centroid of the polygon.

Graphic position offset

/req/vector/graphics /req/vector/dot

Check: The black cross is the point. A red dot (stroke width 12 px, so 12 px across) is drawn 30 px right of it, and a blue one 20 px above (positive y is up).

Image tint and black tint

/req/vector/image

Check: The same black-and-white icon four times. Left: unchanged (the defaults, tint white and blackTint black). Then tint gold (the white parts turn gold), blackTint darkRed (the black parts turn dark red), and both (lightSkyBlue and navy). The grey door is halfway between black and white, so it takes the colour halfway between blackTint and tint.

defaultstintblackTintboth
style.cs.json · A.geojson · B.geojson · C.geojson · D.geojson · view.json

Text and fonts

/req/vector/text /req/vector/fonts

Check: Three texts at the same point (black cross): serif 16 pt bold, sans-serif 12 pt italic in dark red, monospace 10 pt. Left, centre and right alignment put the cross at the start, middle and end of the text.

Serif boldSans italicMonospace
style.cs.json · POI.geojson · view.json

rc-gradients

2-shapes/requirements/rc-gradients.adoc

RequirementChecked byEvidence
/req/gradients/gradient
text
  • An Encoding SHALL support defining a gradient property within the Fill class, defined as a Gradient class including a type, an angle, a position, a size and an array of color keys.
  • A Renderer SHALL support filling vector geometry with a gradual transition between the colors of the keys of a gradient property.
samplesample: Gradient types and keys
/req/gradients/type
text
  • An Encoding SHALL support defining a type Gradient property with a value of linear, radial, repeating or conic.
  • A Renderer SHALL support filling vector geometry with a linear, radial, repeating or conic gradient according to the type property.
card samplecard: Gradient position and size: per feature or per map
sample: Gradient types and keys
/req/gradients/keys
text
  • An Encoding SHALL support defining a keys Gradient property as an array of ColorKey objects, each including a color, an optional opacity and an optional percent position along the gradient.
  • A Renderer SHALL support interpolating the color and opacity of the gradient between consecutive keys, according to their percent position along the gradient.
card samplecard: Gradient angle convention
sample: Gradient types and keys
/req/gradients/angle
text
  • An Encoding SHALL support defining an angle Gradient property as a float.
  • A Renderer SHALL support orienting the gradient according to the angle property, in degrees, where 0 points to the right and angles turn counter-clockwise as seen on the map.
cardcard: Gradient angle convention
/req/gradients/position
text
  • An Encoding SHALL support defining a position Gradient property.
  • A Renderer SHALL support positioning the origin of the gradient according to the position property, in pixels unless qualified with another unit.
cardcard: Gradient position and size: per feature or per map
/req/gradients/size
text
  • An Encoding SHALL support defining a size Gradient property.
  • A Renderer SHALL support scaling the extent of the gradient according to the size property, in pixels unless qualified with another unit.
cardcard: Gradient position and size: per feature or per map

Gradient types and keys

/req/gradients/gradient /req/gradients/type /req/gradients/keys

Check: Linear, radial, repeating and conic, each from white through orange (at 30 %) to dark red, as their keys say. The conic gradient goes once around its centre, so its end (dark red) meets its start (white) in a sharp edge.

linearradialrepeatingconic
style.cs.json · Parcels.geojson · view.json