QGIS/python/core/auto_generated/geocoding/qgsnominatimgeocoder.sip.in
2024-08-13 20:28:55 +10:00

120 lines
3.8 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geocoding/qgsnominatimgeocoder.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsNominatimGeocoder : QgsGeocoderInterface
{
%Docstring(signature="appended")
A geocoder which uses the Nominatim geocoding API to retrieve results.
This geocoder utilizes the Nominatim geocoding API in order to geocode
strings.
.. warning::
The user is responsible for respecting the usage policy when
using the default OpenStreetMap-run server.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgsnominatimgeocoder.h"
%End
public:
QgsNominatimGeocoder( const QString &countryCodes = QString(), const QString &endpoint = QString() );
%Docstring
Constructor for QgsNominatimGeocoder.
Optionally, ``countryCodes`` can be specified to restrict results to one or more countries. The codes
must be in ISO 3166-1alpha2 code and comma-separated.
The optional ``endpoint`` argument can be used to specify a non-default endpoint to use for request.
%End
virtual Flags flags() const;
virtual QgsFields appendedFields() const;
virtual Qgis::WkbType wkbType() const;
virtual QList< QgsGeocoderResult > geocodeString( const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback = 0 ) const;
QUrl requestUrl( const QString &address, const QgsRectangle &bounds = QgsRectangle() ) const;
%Docstring
Returns the URL generated for geocoding the specified ``address``.
%End
QgsGeocoderResult jsonToResult( const QVariantMap &json ) const;
%Docstring
Converts a JSON result returned from the Nominatim service to a geocoder result object.
%End
QString endpoint() const;
%Docstring
Returns the API endpoint used for requests.
.. seealso:: :py:func:`setEndpoint`
%End
void setEndpoint( const QString &endpoint );
%Docstring
Sets a specific API ``endpoint`` to use for requests. This is for internal testing purposes only.
.. seealso:: :py:func:`endpoint`
%End
double requestsPerSecond() const;
%Docstring
Returns the number of requests per seconds to the endpoint.
.. seealso:: :py:func:`setRequestsPerSecond`
%End
void setRequestsPerSecond( double number );
%Docstring
Sets the ``number`` of request per seconds to the endpoint.
.. seealso:: :py:func:`requestsPerSecond`
.. warning::
Setting this to a value > 1 violates the nomatim terms of service. Only change this value if you are using a self-hosted nomatim service.
%End
QString countryCodes() const;
%Docstring
Returns the optional region bias which will be used to prioritize results in a certain region.
.. seealso:: :py:func:`setCountryCodes`
%End
void setCountryCodes( const QString &countryCodes );
%Docstring
Sets the optional ``region`` bias which will be used to prioritize results in a certain region.
The ``region`` argument must be set to a two letter country code top-level domain value,
e.g. "gb" for Great Britain.
.. seealso:: :py:func:`countryCodes`
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geocoding/qgsnominatimgeocoder.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/