Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ccad91
commit 94f3ea0
Showing
14 changed files
with
769 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# The following has been generated automatically from src/analysis/geocoding/qgsgeocoder.h | ||
# monkey patching scoped based enum | ||
QgsGeocoderInterface.Flag.GeocodesStrings.__doc__ = "Can geocode string input values" | ||
QgsGeocoderInterface.Flag.GeocodesFeatures.__doc__ = "Can geocode QgsFeature input values" | ||
QgsGeocoderInterface.Flag.__doc__ = 'Capability flags for the geocoder.\n\n' + '* ``GeocodesStrings``: ' + QgsGeocoderInterface.Flag.GeocodesStrings.__doc__ + '\n' + '* ``GeocodesFeatures``: ' + QgsGeocoderInterface.Flag.GeocodesFeatures.__doc__ | ||
# -- |
87 changes: 87 additions & 0 deletions
87
python/analysis/auto_generated/geocoding/qgsgeocoder.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/geocoding/qgsgeocoder.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsGeocoderInterface | ||
{ | ||
%Docstring | ||
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. | ||
|
||
.. versionadded:: 3.16 | ||
%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 cancelation 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 QgsWkbTypes::Type wkbType() const; | ||
%Docstring | ||
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). | ||
%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 cancelation support. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/geocoding/qgsgeocoder.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
108 changes: 108 additions & 0 deletions
108
python/analysis/auto_generated/geocoding/qgsgeocodercontext.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/geocoding/qgsgeocodercontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsGeocoderContext | ||
{ | ||
%Docstring | ||
Encapsulates the context of a geocoding operation. | ||
|
||
.. versionadded:: 3.16 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsgeocodercontext.h" | ||
%End | ||
public: | ||
|
||
QgsGeocoderContext( const QgsCoordinateTransformContext &transformContext ); | ||
%Docstring | ||
Constructor for QgsGeocoderContext, with the specified ``transformContext``. | ||
%End | ||
|
||
QgsCoordinateTransformContext transformContext() const; | ||
%Docstring | ||
Returns the coordinate transform context, which should be used whenever the | ||
geocoder constructs a coordinate transform. | ||
|
||
.. seealso:: :py:func:`setTransformContext` | ||
%End | ||
|
||
void setTransformContext( const QgsCoordinateTransformContext &context ); | ||
%Docstring | ||
Sets the coordinate transform ``context``, which should be used whenever the | ||
geocoder constructs a coordinate transform. | ||
|
||
.. seealso:: :py:func:`transformContext` | ||
%End | ||
|
||
QgsGeometry areaOfInterest() const; | ||
%Docstring | ||
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 prioritising closer results. | ||
|
||
The coordinate reference system for the area of interest can be retrieved via | ||
:py:func:`~QgsGeocoderContext.areaOfInterestCrs`. | ||
|
||
.. seealso:: :py:func:`setAreaOfInterest` | ||
|
||
.. seealso:: :py:func:`areaOfInterestCrs` | ||
%End | ||
|
||
void setAreaOfInterest( const QgsGeometry &area ); | ||
%Docstring | ||
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 prioritising closer results. | ||
|
||
The coordinate reference system for the area of interest can be set via | ||
:py:func:`~QgsGeocoderContext.setAreaOfInterestCrs`. | ||
|
||
.. seealso:: :py:func:`areaOfInterest` | ||
|
||
.. seealso:: :py:func:`setAreaOfInterestCrs` | ||
%End | ||
|
||
QgsCoordinateReferenceSystem areaOfInterestCrs() const; | ||
%Docstring | ||
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. | ||
|
||
.. seealso:: :py:func:`areaOfInterest` | ||
|
||
.. seealso:: :py:func:`setAreaOfInterestCrs` | ||
%End | ||
|
||
void setAreaOfInterestCrs( const QgsCoordinateReferenceSystem &crs ); | ||
%Docstring | ||
Sets the ``crs`` for the area of interest, which can be used to indicate the desired | ||
geographic area where geocoding results are desired. | ||
|
||
.. seealso:: :py:func:`areaOfInterestCrs` | ||
|
||
.. seealso:: :py:func:`setAreaOfInterest` | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/geocoding/qgsgeocodercontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
123 changes: 123 additions & 0 deletions
123
python/analysis/auto_generated/geocoding/qgsgeocoderresult.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/geocoding/qgsgeocoderresult.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsGeocoderResult | ||
{ | ||
%Docstring | ||
Represents a matching result from a geocoder search. | ||
|
||
QgsGeocoderResult objects may represent valid matches, or an invalid | ||
error result. This can be checked by testing :py:func:`~isValid`. An invalid | ||
result represents that an error was encountered while geocoding, in which case the | ||
error message can be retrieved by calling :py:func:`~error`. | ||
|
||
Valid geocoding results will have a :py:func:`~geometry` and :py:func:`~crs`, along with a set | ||
of optional :py:func:`~additionalAttributes` which may contain information such as the | ||
accuracy of the geocoding result. | ||
|
||
.. versionadded:: 3.16 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsgeocoderresult.h" | ||
%End | ||
public: | ||
|
||
static QgsGeocoderResult errorResult( const QString &errorMessage ); | ||
%Docstring | ||
Creates an invalid error result, with the specified ``errorMessage`` string. | ||
%End | ||
|
||
QgsGeocoderResult( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs ); | ||
%Docstring | ||
Constructor for a valid QgsGeocoderResult, with the specified ``geometry`` and ``crs``. | ||
%End | ||
|
||
bool isValid() const; | ||
%Docstring | ||
Returns ``True`` if the result is a valid result. | ||
|
||
If the result is invalid, the error message can be retrieved by calling :py:func:`~QgsGeocoderResult.error`. | ||
%End | ||
|
||
QString error() const; | ||
%Docstring | ||
Returns the error string, if the result is invalid. | ||
%End | ||
|
||
QgsGeometry geometry() const; | ||
%Docstring | ||
Returns the resultant geometry resulting from the geocoding operation. | ||
|
||
The coordinate reference system for the geometry can be retrieved | ||
via :py:func:`~QgsGeocoderResult.crs`. | ||
|
||
.. seealso:: :py:func:`setGeometry` | ||
|
||
.. seealso:: :py:func:`crs` | ||
%End | ||
|
||
void setGeometry( const QgsGeometry &geometry ); | ||
%Docstring | ||
Sets the resultant ``geometry`` resulting from the geocoding operation. | ||
|
||
The coordinate reference system for the geometry should also be set | ||
via :py:func:`~QgsGeocoderResult.setCrs`. | ||
|
||
.. seealso:: :py:func:`geometry` | ||
|
||
.. seealso:: :py:func:`setCrs` | ||
%End | ||
|
||
QgsCoordinateReferenceSystem crs() const; | ||
%Docstring | ||
Returns the coordinate reference system for the calculated :py:func:`~QgsGeocoderResult.geometry`. | ||
|
||
.. seealso:: :py:func:`setCrs` | ||
|
||
.. seealso:: :py:func:`geometry` | ||
%End | ||
|
||
void setCrs( const QgsCoordinateReferenceSystem &crs ); | ||
%Docstring | ||
Sets the coordinate reference system for the calculated :py:func:`~QgsGeocoderResult.geometry`. | ||
|
||
.. seealso:: :py:func:`crs` | ||
|
||
.. seealso:: :py:func:`geometry` | ||
%End | ||
|
||
QVariantMap additionalAttributes() const; | ||
%Docstring | ||
Contains additional attributes generated during the geocode, | ||
which may be added to features being geocoded. | ||
|
||
.. seealso:: :py:func:`setAdditionalAttributes` | ||
%End | ||
|
||
void setAdditionalAttributes( const QVariantMap &attributes ); | ||
%Docstring | ||
Setss additional attributes generated during the geocode, | ||
which may be added to features being geocoded. | ||
|
||
.. seealso:: :py:func:`additionalAttributes` | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/geocoding/qgsgeocoderresult.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.