QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Interface for geocoders. More...
#include <qgsgeocoder.h>
Public Types | |
enum class | Flag { GeocodesStrings = 1 << 0 , GeocodesFeatures = 1 << 1 } |
Capability flags for the geocoder. More... | |
Public Member Functions | |
virtual | ~QgsGeocoderInterface ()=default |
virtual QgsFields | appendedFields () const |
Returns a set of newly created fields which will be appended to existing features during the geocode operation. More... | |
virtual Flags | flags () const =0 |
Returns the geocoder's capability flags. More... | |
virtual QList< QgsGeocoderResult > | geocodeFeature (const QgsFeature &feature, const QgsGeocoderContext &context, QgsFeedback *feedback=nullptr) const |
Geocodes a feature. More... | |
virtual QList< QgsGeocoderResult > | geocodeString (const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback=nullptr) const |
Geocodes a string. More... | |
virtual QgsWkbTypes::Type | wkbType () const |
Returns the WKB type of geometries returned by the geocoder. More... | |
Interface for geocoders.
QgsGeocoderInterface implementations are able to take either a QgsFeature or a free-form string and calculate the corresponding geometry of the feature.
Definition at line 36 of file qgsgeocoder.h.
|
strong |
Capability flags for the geocoder.
Enumerator | |
---|---|
GeocodesStrings | Can geocode string input values. |
GeocodesFeatures | Can geocode QgsFeature input values. |
Definition at line 42 of file qgsgeocoder.h.
|
virtualdefault |
|
virtual |
Returns a set of newly created fields which will be appended to existing features during the geocode operation.
These fields will include any extra content returned by the geocoder, such as fields for accuracy of the match or correct attribute values.
Reimplemented in QgsNominatimGeocoder, and QgsGoogleMapsGeocoder.
Definition at line 25 of file qgsgeocoder.cpp.
|
pure virtual |
Returns the geocoder's capability flags.
Implemented in QgsNominatimGeocoder, and QgsGoogleMapsGeocoder.
|
virtual |
Geocodes a feature.
If implemented by the geocoder (i.e. flags() returns the QgsGeocoderInterface::Flag::GeocodesFeatures flag), a list of matching results will be returned.
The optional feedback argument can be used to provider cancellation support.
Definition at line 18 of file qgsgeocoder.cpp.
|
virtual |
Geocodes a string.
If implemented by the geocoder (i.e. flags() returns the QgsGeocoderInterface::Flag::GeocodesStrings flag), a list of matching results will be returned.
The optional feedback argument can be used to provider cancellation support.
Reimplemented in QgsNominatimGeocoder, and QgsGoogleMapsGeocoder.
Definition at line 29 of file qgsgeocoder.cpp.
|
virtual |
Returns the WKB type of geometries returned by the geocoder.
If this is not known in advance then QgsWkbTypes::Unknown should be returned (e.g. in the case that a geocoder may return different geometry types depending on the quality of the match).
Reimplemented in QgsNominatimGeocoder, and QgsGoogleMapsGeocoder.
Definition at line 27 of file qgsgeocoder.cpp.