Class: QgsGeocoderContext

class qgis.core.QgsGeocoderContext(transformContext: QgsCoordinateTransformContext)

Bases: sip.wrapper

Constructor for QgsGeocoderContext, with the specified transformContext.

QgsGeocoderContext(QgsGeocoderContext)

Encapsulates the context of a geocoding operation.

New in version 3.18.

Parameters

transformContext

areaOfInterest(self)QgsGeometry

Returns the optional area of interest, which can be used to indicate the desired geographic area where geocoding results are desired.

The area of interest can be a polygon geometry, in which case it represents the extent to use for filtering candidate results, or a point geometry, in which case it represents a “target point” for prioritizing closer results.

The coordinate reference system for the area of interest can be retrieved via areaOfInterestCrs().

Return type

QgsGeometry

areaOfInterestCrs(self)QgsCoordinateReferenceSystem

Returns the coordinate reference system for the area of interest, which can be used to indicate the desired geographic area where geocoding results are desired.

See also

areaOfInterest()

Return type

QgsCoordinateReferenceSystem

setAreaOfInterest(self, area: QgsGeometry)

Sets the optional area of interest, which can be used to indicate the desired geographic area where geocoding results are desired.

The area of interest can be a polygon geometry, in which case it represents the extent to use for filtering candidate results, or a point geometry, in which case it represents a “target point” for prioritizing closer results.

The coordinate reference system for the area of interest can be set via setAreaOfInterestCrs().

See also

areaOfInterest()

Parameters

area (QgsGeometry) –

setAreaOfInterestCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the crs for the area of interest, which can be used to indicate the desired geographic area where geocoding results are desired.

Parameters

crs (QgsCoordinateReferenceSystem) –

setTransformContext(self, context: QgsCoordinateTransformContext)

Sets the coordinate transform context, which should be used whenever the geocoder constructs a coordinate transform.

Parameters

context (QgsCoordinateTransformContext) –

transformContext(self)QgsCoordinateTransformContext

Returns the coordinate transform context, which should be used whenever the geocoder constructs a coordinate transform.

Return type

QgsCoordinateTransformContext