QGIS API Documentation 3.41.0-Master (25ec5511245)
|
Interface for geocoders. More...
#include <qgsgeocoder.h>
Public Types | |
enum class | Flag { GeocodesStrings = 1 << 0 , GeocodesFeatures = 1 << 1 } |
Capability flags for the geocoder. More... | |
typedef QFlags< Flag > | Flags |
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. | |
virtual Flags | flags () const =0 |
Returns the geocoder's capability flags. | |
virtual QList< QgsGeocoderResult > | geocodeFeature (const QgsFeature &feature, const QgsGeocoderContext &context, QgsFeedback *feedback=nullptr) const |
Geocodes a feature. | |
virtual QList< QgsGeocoderResult > | geocodeString (const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback=nullptr) const |
Geocodes a string. | |
virtual Qgis::WkbType | wkbType () const |
Returns the WKB type of geometries returned by the geocoder. | |
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.
typedef QFlags< Flag > QgsGeocoderInterface::Flags |
Definition at line 47 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 QgsGoogleMapsGeocoder, and QgsNominatimGeocoder.
Definition at line 25 of file qgsgeocoder.cpp.
|
pure virtual |
Returns the geocoder's capability flags.
Implemented in QgsGoogleMapsGeocoder, and QgsNominatimGeocoder.
|
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 QgsGoogleMapsGeocoder, and QgsNominatimGeocoder.
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 QgsGoogleMapsGeocoder, and QgsNominatimGeocoder.
Definition at line 27 of file qgsgeocoder.cpp.