Class: QgsProfilePoint

Encapsulates a point on a distance-elevation profile.

Added in version 3.26.

Methods

distance

Returns the distance of the point.

elevation

Returns the elevation of the point.

isEmpty

Returns True if the point is empty.

setDistance

Sets the distance of the point.

setElevation

Sets the elevation of the point.

class qgis.core.QgsProfilePoint[source]

Bases: object

__init__()

Constructor for an empty point.

__init__(distance: float, elevation: float)

Create a point at the specified distance and elevation coordinates

Parameters:
  • distance (float)

  • elevation (float)

__init__(a0: QgsProfilePoint)
Parameters:

a0 (QgsProfilePoint)

distance(self) float[source]

Returns the distance of the point.

See also

setDistance()

Return type:

float

elevation(self) float[source]

Returns the elevation of the point.

See also

setElevation()

Return type:

float

isEmpty(self) bool[source]

Returns True if the point is empty.

A QgsProfilePoint is considered empty when the coordinates have not been explicitly filled in.

Return type:

bool

setDistance(self, distance: float)[source]

Sets the distance of the point.

See also

distance()

Parameters:

distance (float)

setElevation(self, elevation: float)[source]

Sets the elevation of the point.

See also

elevation()

Parameters:

elevation (float)