mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
97 lines
3.1 KiB
Plaintext
97 lines
3.1 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/geocoding/qgsgeocoder.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsGeocoderInterface
|
|
{
|
|
%Docstring(signature="appended")
|
|
Interface for geocoders.
|
|
|
|
:py:class:`QgsGeocoderInterface` implementations are able to take either
|
|
a :py:class:`QgsFeature` or a free-form string and calculate the
|
|
corresponding geometry of the feature.
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsgeocoder.h"
|
|
%End
|
|
public:
|
|
|
|
enum class Flag
|
|
{
|
|
GeocodesStrings,
|
|
GeocodesFeatures,
|
|
};
|
|
typedef QFlags<QgsGeocoderInterface::Flag> Flags;
|
|
|
|
|
|
virtual ~QgsGeocoderInterface();
|
|
|
|
virtual Flags flags() const = 0;
|
|
%Docstring
|
|
Returns the geocoder's capability flags.
|
|
%End
|
|
|
|
virtual QList< QgsGeocoderResult > geocodeFeature( const QgsFeature &feature, const QgsGeocoderContext &context, QgsFeedback *feedback = 0 ) const;
|
|
%Docstring
|
|
Geocodes a ``feature``.
|
|
|
|
If implemented by the geocoder (i.e.
|
|
:py:func:`~QgsGeocoderInterface.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.
|
|
%End
|
|
|
|
virtual QgsFields appendedFields() const;
|
|
%Docstring
|
|
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.
|
|
%End
|
|
|
|
virtual Qgis::WkbType wkbType() const;
|
|
%Docstring
|
|
Returns the WKB type of geometries returned by the geocoder.
|
|
|
|
If this is not known in advance then :py:class:`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).
|
|
%End
|
|
|
|
virtual QList< QgsGeocoderResult > geocodeString( const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback = 0 ) const;
|
|
%Docstring
|
|
Geocodes a ``string``.
|
|
|
|
If implemented by the geocoder (i.e.
|
|
:py:func:`~QgsGeocoderInterface.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.
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/geocoding/qgsgeocoder.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|