Class: QgsGeocoderContext

class qgis.core.QgsGeocoderContext

Bases: sip.wrapper

Encapsulates the context of a geocoding operation.

New in version 3.18.

QgsGeocoderContext(transformContext: QgsCoordinateTransformContext) Constructor for QgsGeocoderContext, with the specified transformContext.

QgsGeocoderContext(QgsGeocoderContext)

Methods

areaOfInterest

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

areaOfInterestCrs

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.

setAreaOfInterest

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

setAreaOfInterestCrs

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

setTransformContext

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

transformContext

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

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