Class: QgsGcpPoint

Contains properties of a ground control point (GCP).

Added in version 3.26.

class qgis.analysis.QgsGcpPoint[source]

Bases: object

__init__(sourcePoint: QgsPointXY, destinationPoint: QgsPointXY, destinationPointCrs: QgsCoordinateReferenceSystem, enabled: bool = True)

Constructor for QgsGcpPoint.

Parameters:
  • sourcePoint (QgsPointXY) – source coordinates. This may either be in pixels (for completely non-referenced images) OR in the source layer CRS.

  • destinationPoint (QgsPointXY) – destination coordinates

  • destinationPointCrs (QgsCoordinateReferenceSystem) – CRS of destination point

  • enabled (bool = True) – whether the point is currently enabled

__init__(a0: QgsGcpPoint)
Parameters:

a0 (QgsGcpPoint)

class PointType(*values)

Bases: IntEnum

Coordinate point types

  • Source: Source point

  • Destination: Destination point

Destination = 1
Source = 0
destinationPoint(self) QgsPointXY[source]

Returns the destination coordinates.

Return type:

QgsPointXY

destinationPointCrs(self) QgsCoordinateReferenceSystem[source]

Returns the CRS of the destination point.

Return type:

QgsCoordinateReferenceSystem

isEnabled(self) bool[source]

Returns True if the point is currently enabled.

See also

setEnabled()

Return type:

bool

setDestinationPoint(self, point: QgsPointXY)[source]

Sets the destination coordinates.

Parameters:

point (QgsPointXY)

setDestinationPointCrs(self, crs: QgsCoordinateReferenceSystem)[source]

Sets the crs of the destination point.

Parameters:

crs (QgsCoordinateReferenceSystem)

setEnabled(self, enabled: bool)[source]

Sets whether the point is currently enabled.

See also

isEnabled()

Parameters:

enabled (bool)

setSourcePoint(self, point: QgsPointXY)[source]

Sets the source coordinates.

This may either be in pixels (for completely non-referenced images) OR in the source layer CRS.

See also

sourcePoint()

Parameters:

point (QgsPointXY)

sourcePoint(self) QgsPointXY[source]

Returns the source coordinates.

This may either be in pixels (for completely non-referenced images) OR in the source layer CRS.

See also

setSourcePoint()

Return type:

QgsPointXY

transformedDestinationPoint(self, targetCrs: QgsCoordinateReferenceSystem, context: QgsCoordinateTransformContext) QgsPointXY[source]

Returns the destinationPoint() transformed to the given target CRS.

Parameters:
Return type:

QgsPointXY