mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-06 00:03:16 -05:00
124 lines
3.8 KiB
Plaintext
124 lines
3.8 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/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.18
|
|
%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/core/geocoding/qgsgeocoderresult.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|