geoview-core
    Preparing search index...

    Class GeoviewRendererAbstract

    Index

    Constructors

    Properties

    FillPatternSettings: FillPatternSettings = ...

    Table used to define line symbology to use when drawing polygon fill

    lineDashSettings: Record<TypeLineStyle, number[] | undefined> = ...

    Table used to define line symbology to use when drawing lineString and polygon perimeters

    processStyle: Record<
        TypeLayerStyleConfigType,
        Record<TypeStyleGeometry, TypeStyleProcessor>,
    > = ...

    Table of function to process the style settings based on the feature geometry and the kind of style settings.

    Methods

    • Decodes a base64-encoded SVG string and replaces parameterized placeholders (e.g., param(fill) or param(outline)) with actual values provided as query parameters appended to the base64 string. This is particularly useful for decoding and normalizing SVG symbols exported from QGIS, which may include dynamic styling parameters such as fill, stroke, or outline values. The method also applies various cleanup steps to improve SVG compatibility:

      • Fixes QGIS-specific attribute spacing (e.g. "stroke=" issues)
      • Corrects malformed opacity or width attributes
      • Removes extraneous <title>, <desc>, <defs> tags
      • Removes XML headers that can cause encoding errors

      Parameters

      • base64: string

        The base64-encoded SVG string, optionally including query parameters (e.g. "base64:...?...fill=%23ff0000&outline=%23000000").

      Returns string

      The decoded, cleaned, and parameter-substituted SVG XML string.

    • Classify the remaining nodes to complete the classification. The plus and minus can be a unary or a binary operator. It is only at the end that we can determine there node type. Nodes that start with a number are numbers, otherwise they are variables. If a problem is detected, an error object is thrown with an explanatory message.

      Parameters

      Returns FilterNodeType[]

      The new keywords array with all nodes classified.

    • Create a default style to use with a vector feature that has no style configuration.

      Parameters

      • geometryType:
            | "Point"
            | "MultiPoint"
            | "LineString"
            | "MultiLineString"
            | "Polygon"
            | "MultiPolygon"

        Type of geometry (Point, LineString, Polygon).

      • label: string

        Label for the style.

      Returns TypeLayerStyleSettings | undefined

      The Style configuration created. Undefined if unable to create it.

    • This method creates a canvas with the image of an icon that is defined in the point style.

      Parameters

      • OptionalpointStyle: Style

        Style associated to the point symbol.

      Returns Promise<HTMLCanvasElement | null>

      A promise that the canvas is created.

    • This method creates a canvas with the lineString settings that are defined in the style.

      Parameters

      • OptionallineStringStyle: Style

        Style associated to the lineString.

      Returns HTMLCanvasElement

      A promise that the canvas is created.

    • This method creates a canvas with the vector point settings that are defined in the point style.

      Parameters

      • OptionalpointStyle: Style

        Style associated to the point symbol.

      Returns HTMLCanvasElement

      A promise that the canvas is created.

    • This method creates a canvas with the polygon settings that are defined in the style.

      Parameters

      • OptionalpolygonStyle: Style

        Style associated to the polygon.

      Returns HTMLCanvasElement

      A promise that the canvas is created.

    • Create the stroke options using the specified settings.

      Parameters

      • settings:
            | TypeLineStringVectorConfig
            | TypePolygonVectorConfig
            | TypeSimpleSymbolVectorConfig

        Settings to use for the stroke options creation.

      Returns Options

      The stroke options created.

    • Use the filter equation and the feature fields to determine if the feature is visible.

      Parameters

      • feature: Feature

        Feature used to find the visibility value to return.

      • filterEquation: FilterNodeType[]

        Filter used to find the visibility value to return.

      Returns boolean | undefined

      The visibility flag for the feature specified.

    • This method gets the style of the feature using the layer entry config. If the style does not exist for the geometryType, create it using the default style strategy.

      Parameters

      • feature: FeatureLike

        Feature that need its style to be defined.

      • style: TypeLayerStyleConfig

        The style to use

      • label: string

        The style label when one has to be created

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      • OptionalcallbackWhenCreatingStyle: (
            geometryType:
                | "Point"
                | "MultiPoint"
                | "LineString"
                | "MultiLineString"
                | "Polygon"
                | "MultiPolygon",
            style: TypeLayerStyleConfigInfo,
        ) => void

        An optional callback to execute when a new style had to be created

      Returns Style | undefined

      The style applied to the feature or undefined if not found.

    • Get the default color using the default color index.

      Parameters

      • alpha: number

        Alpha value to associate to the color.

      • increment: boolean = false

        True, if we want to skip to next color

      Returns string

      The current default color string.

    • This method gets the image source from the style of the feature using the layer entry config.

      Parameters

      • feature: Feature

        The feature that need its icon to be defined.

      • style: TypeLayerStyleConfig

        The style to use

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns string | undefined

      The icon associated to the feature or a default empty one.

    • This method returns the type of geometry. It removes the Multi prefix because for the geoviewRenderer, a MultiPoint has the same behaviour than a Point.

      Parameters

      • feature: FeatureLike

        The feature to check

      Returns
          | "Point"
          | "MultiPoint"
          | "LineString"
          | "MultiLineString"
          | "Polygon"
          | "MultiPolygon"

      The type of geometry (Point, LineString, Polygon).

    • This method gets the legend styles used by the the layer as specified by the style configuration.

      Parameters

      • styleConfig:
            | Partial<
                Record<
                    | "Point"
                    | "MultiPoint"
                    | "LineString"
                    | "MultiLineString"
                    | "Polygon"
                    | "MultiPolygon",
                    TypeLayerStyleSettings,
                >,
            >
            | undefined

        The style configuration.

      Returns Promise<
          Partial<
              Record<
                  | "Point"
                  | "MultiPoint"
                  | "LineString"
                  | "MultiLineString"
                  | "Polygon"
                  | "MultiPolygon",
                  TypeStyleRepresentation,
              >,
          >,
      >

      A promise that the layer styles are processed.

    • This method is a private sub routine used by the getLegendStyles method to gets the style of the layer as specified by the style configuration.

      Parameters

      • OptionaldefaultSettings: TypeKindOfVectorSettings

        Settings associated to simple styles or default style of unique value and class break styles. When this parameter is undefined, no defaultCanvas is created.

      • OptionalarrayOfPointStyleConfig: TypeLayerStyleConfigInfo[]

        Array of point style configuration associated to unique value and class break styles. When this parameter is undefined, no arrayOfCanvas is created.

      Returns Promise<
          Partial<
              Record<
                  | "Point"
                  | "MultiPoint"
                  | "LineString"
                  | "MultiLineString"
                  | "Polygon"
                  | "MultiPolygon",
                  TypeStyleRepresentation,
              >,
          >,
      >

      A promise that the layer styles are processed.

    • This method loads the image of an icon that compose the legend.

      Parameters

      • src: string

        Source information (base64 image) of the image to load.

      Returns Promise<HTMLImageElement | null>

      A promise that the image is loaded.

    • This method is used to process the array of point styles as described in the pointStyleConfig.

      Parameters

      • layerStyles: TypeVectorLayerStyles
      • arrayOfPointStyleConfig: TypeLayerStyleConfigInfo[]

        Array of point style configuration.

      Returns Promise<
          Partial<
              Record<
                  | "Point"
                  | "MultiPoint"
                  | "LineString"
                  | "MultiLineString"
                  | "Polygon"
                  | "MultiPolygon",
                  TypeStyleRepresentation,
              >,
          >,
      >

      A promise that the vector layer style is created.

    • Process a backward diagonal fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a circle symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process the class break settings using a lineString feature to get its Style.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Style settings to use.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process the class break settings using a Point feature to get its Style.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Style settings to use.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process the class break settings using a Polygon feature to get its Style.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Style settings to use.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a cross fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a diagonal cross fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a Diamond symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a dot fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a forward diagonal fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a horizontal fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process an icon symbol using the settings.

      Parameters

      • settings: TypeIconSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a null fill (polygon with fill opacity = 0) using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a pattern fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • FillPatternLines: FillPatternLine[]

        Fill pattern lines needed to create the fill.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a + symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a regular shape using the settings, the number of points, the angle and the scale.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      • points: number

        Number of points needed to create the symbol.

      • angle: number

        Angle to use for the symbol creation.

      • scale: [number, number]

        Scale to use for the symbol creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a simple lineString using the settings.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Settings to use for the Style creation.

      • Optionalfeature: Feature<Geometry>

        Optional feature. This method does not use it, it is there to have a homogeneous signature.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a simple point symbol using the settings. Simple point symbol may be an icon or a vector symbol.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Settings to use for the Style creation.

      • Optionalfeature: Feature<Geometry>

        Optional feature. This method does not use it, it is there to have a homogeneous signature.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a simple polygon using the settings.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Settings to use for the Style creation.

      • Optionalfeature: Feature<Geometry>

        Optional feature. This method does not use it, it is there to have a homogeneous signature.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a simple solid fill (polygon) using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a square symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a star shape symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      • points: number

        Number of points needed to create the symbol.

      • angle: number

        Angle to use for the symbol creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a star symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a triangle symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process the unique value settings using a lineString feature to get its Style.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Style settings to use.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process the unique value settings using a polygon feature to get its Style.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Style settings to use.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process the unique value settings using a point feature to get its Style.

      Parameters

      • styleSettings: TypeLayerStyleSettings | TypeKindOfVectorSettings

        Style settings to use.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionalfilterEquation: FilterNodeType[]

        Filter equation associated to the layer.

      • OptionallegendFilterIsOff: boolean

        When true, do not apply legend filter.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a vertical fill using the settings.

      Parameters

      • settings: TypePolygonVectorConfig

        Settings to use for the Style creation.

      • Optionalgeometry: Geometry

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Process a X symbol using the settings.

      Parameters

      • settings: TypeSimpleSymbolVectorConfig

        Settings to use for the Style creation.

      Returns Style | undefined

      The Style created. Undefined if unable to create it.

    • Search the class breakentry using the field value stored in the feature.

      Parameters

      • field: string

        Field involved in the class break definition.

      • classBreakStyleInfo: TypeLayerStyleConfigInfo[]

        Class break configuration.

      • feature: Feature

        Feature used to test the class break conditions.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns TypeLayerStyleConfigInfo | undefined

      The index of the entry. Undefined if unable to find it.

    • Check whether a numeric value falls within a class-break interval using provided boundary conditions. The conditions parameter is expected to be a two-element array where:

      • conditions[0] is the lower-bound operator: 'gt' (>) or 'gte' (>=)
      • conditions[1] is the upper-bound operator: 'lt' (<) or 'lte' (<=) Examples:
      • ['gte','lte'] => min <= value <= max
      • ['gt','lte'] => min < value <= max

      Parameters

      • value: number

        The numeric value to test.

      • min: number

        The lower bound of the interval.

      • max: number

        The upper bound of the interval.

      • conditions: TypeLayerStyleValueCondition[]

        Two-element array describing the boundary operators.

      Returns boolean

      True if the value satisfies the interval according to the conditions, false otherwise.

      If conditions contains an unsupported combination of operators.

    • Search the unique value entry using the field values stored in the feature.

      Parameters

      • fields: string[]

        Fields involved in the unique value definition.

      • uniqueValueStyleInfo: TypeLayerStyleConfigInfo[]

        Unique value configuration.

      • Optionalfeature: Feature<Geometry>

        Feature used to test the unique value conditions.

      • OptionaldomainsLookup: TypeLayerMetadataFields[]

        An optional lookup table to handle coded value domains.

      • OptionalaliasLookup: TypeAliasLookup

        An optional lookup table to handle field name aliases.

      Returns TypeLayerStyleConfigInfo | undefined

      The Style created. Undefined if unable to create it.

    • Encodes an SVG XML string into a base64-encoded string. This is the inverse of base64ToSVGString, allowing you to safely embed or transmit SVG data in formats where raw XML is not permitted.

      Parameters

      • svgXML: string

        The raw SVG XML string to encode.

      Returns string

      A base64-encoded representation of the SVG string.