QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgsgeocoder.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsgeocoder.h
3 ---------------
4 Date : August 2020
5 Copyright : (C) 2020 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSGEOCODER_H
17#define QGSGEOCODER_H
18
19#include "qgis_core.h"
20#include "qgsgeocoderresult.h"
21#include "qgsgeometry.h"
22#include "qgsfields.h"
23
24class QgsFeature;
26
36class CORE_EXPORT QgsGeocoderInterface
37{
38
39 public:
40
42 enum class Flag SIP_ENUM_BASETYPE( IntFlag )
43 {
44 GeocodesStrings = 1 << 0,
45 GeocodesFeatures = 1 << 1,
46 };
47 Q_DECLARE_FLAGS( Flags, Flag )
48
49 virtual ~QgsGeocoderInterface() = default;
50
54 virtual Flags flags() const = 0;
55
63 virtual QList< QgsGeocoderResult > geocodeFeature( const QgsFeature &feature, const QgsGeocoderContext &context, QgsFeedback *feedback = nullptr ) const;
64
72 virtual QgsFields appendedFields() const;
73
81 virtual Qgis::WkbType wkbType() const;
82
90 virtual QList< QgsGeocoderResult > geocodeString( const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback = nullptr ) const;
91
92};
93
94#endif // QGSGEOCODER_H
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Container of fields for a vector layer.
Definition qgsfields.h:46
Encapsulates the context of a geocoding operation.
Interface for geocoders.
Definition qgsgeocoder.h:37
Flag
Capability flags for the geocoder.
Definition qgsgeocoder.h:43
QFlags< Flag > Flags
Definition qgsgeocoder.h:47
Represents a matching result from a geocoder search.
#define SIP_ENUM_BASETYPE(type)
Definition qgis_sip.h:278