Class: QgsInterpolatedLineSymbolLayer

A symbol layer that represents vector layer line features as interpolated lines.

The interpolation is done between two values defined at the extremities.

Added in version 3.20.

Class Hierarchy

Inheritance diagram of qgis.core.QgsInterpolatedLineSymbolLayer

Base classes

QgsLineSymbolLayer

Abstract base class for line symbol layers.

QgsSymbolLayer

Abstract base class for symbol layers.

Methods

endValueExpressionForColor

Returns the expression related to the end extremity value for width for color

endValueExpressionForWidth

Returns the expression related to the end extremity value for width.

interpolatedColor

Returns the interpolated color used to render the colors of lines, see :py:class:`QgsInterpolatedLineColor`.

interpolatedWidth

Returns the interpolated width used to render the width of lines, see :py:class:`QgsInterpolatedLineWidth`.

setExpressionsStringForColor

Sets the expressions (as string) that define the extremety values af the line feature for color.

setExpressionsStringForWidth

Sets the expressions (as string) that define the extremety values af the line feature for width.

setInterpolatedColor

Sets the interpolated color used to render the colors of lines, see QgsInterpolatedLineColor.

setInterpolatedWidth

Sets the interpolated width used to render the width of lines, see QgsInterpolatedLineWidth.

setWidthUnit

Sets the width unit.

startValueExpressionForColor

Returns the epression related to the start extremity value for width for color

startValueExpressionForWidth

Returns the epression related to the start extremity value for width.

widthUnit

Returns the width unit.

Static Methods

create

Creates the symbol layer

class qgis.core.QgsInterpolatedLineSymbolLayer[source]

Bases: QgsLineSymbolLayer

static create(properties: Dict[str, Any]) QgsSymbolLayer | None[source]

Creates the symbol layer

Parameters:

properties (Dict[str, Any])

Return type:

Optional[QgsSymbolLayer]

endValueExpressionForColor(self) str[source]

Returns the expression related to the end extremity value for width for color

Deprecated since version 3.40: Use dataDefinedProperty( QgsSymbolLayer.PropertyLineEndColorValue ) instead.

Return type:

str

endValueExpressionForWidth(self) str[source]

Returns the expression related to the end extremity value for width.

Deprecated since version 3.40: Use dataDefinedProperty( QgsSymbolLayer.PropertyLineEndWidthValue ) instead.

Return type:

str

interpolatedColor(self) QgsInterpolatedLineColor[source]

Returns the interpolated color used to render the colors of lines, see :py:class:`QgsInterpolatedLineColor`.

Return type:

QgsInterpolatedLineColor

interpolatedWidth(self) QgsInterpolatedLineWidth[source]

Returns the interpolated width used to render the width of lines, see :py:class:`QgsInterpolatedLineWidth`.

Return type:

QgsInterpolatedLineWidth

setExpressionsStringForColor(self, start: str | None, end: str | None)[source]

Sets the expressions (as string) that define the extremety values af the line feature for color.

Deprecated since version 3.40: Use setDataDefinedProperty( QgsSymbolLayer.PropertyLineStartColorValue ) and setDataDefinedProperty( QgsSymbolLayer.PropertyLineEndColorValue ) instead.

Parameters:
  • start (Optional[str])

  • end (Optional[str])

setExpressionsStringForWidth(self, start: str | None, end: str | None)[source]

Sets the expressions (as string) that define the extremety values af the line feature for width.

Deprecated since version 3.40: Use setDataDefinedProperty( QgsSymbolLayer.PropertyLineStartWidthValue ) and setDataDefinedProperty( QgsSymbolLayer.PropertyLineEndWidthValue ) instead.

Parameters:
  • start (Optional[str])

  • end (Optional[str])

setInterpolatedColor(self, interpolatedLineColor: QgsInterpolatedLineColor)[source]

Sets the interpolated color used to render the colors of lines, see QgsInterpolatedLineColor.

Parameters:

interpolatedLineColor (QgsInterpolatedLineColor)

setInterpolatedWidth(self, interpolatedLineWidth: QgsInterpolatedLineWidth)[source]

Sets the interpolated width used to render the width of lines, see QgsInterpolatedLineWidth.

Parameters:

interpolatedLineWidth (QgsInterpolatedLineWidth)

setWidthUnit(self, strokeWidthUnit: Qgis.RenderUnit)[source]

Sets the width unit.

See also

widthUnit()

Parameters:

strokeWidthUnit (Qgis.RenderUnit)

startValueExpressionForColor(self) str[source]

Returns the epression related to the start extremity value for width for color

Deprecated since version 3.40: Use dataDefinedProperty( QgsSymbolLayer.PropertyLineStartColorValue ) instead.

Return type:

str

startValueExpressionForWidth(self) str[source]

Returns the epression related to the start extremity value for width.

Deprecated since version 3.40: Use dataDefinedProperty( QgsSymbolLayer.PropertyLineStartWidthValue ) instead.

Return type:

str

widthUnit(self) Qgis.RenderUnit[source]

Returns the width unit.

See also

setWidthUnit()

Return type:

Qgis.RenderUnit