QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsgeocodercontext.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsgeocodercontext.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 QGSGEOCODERCONTEXT_H
17#define QGSGEOCODERCONTEXT_H
18
19#include "qgis_core.h"
22#include "qgsgeometry.h"
23
30class CORE_EXPORT QgsGeocoderContext
31{
32
33 public:
34
39
46 QgsCoordinateTransformContext transformContext() const { return mTransformContext; }
47
54 void setTransformContext( const QgsCoordinateTransformContext &context ) { mTransformContext = context; }
55
70 QgsGeometry areaOfInterest() const { return mAreaOfInterest; }
71
86 void setAreaOfInterest( const QgsGeometry &area ) { mAreaOfInterest = area; }
87
95 QgsCoordinateReferenceSystem areaOfInterestCrs() const { return mAreaOfInterestCrs; }
96
104 void setAreaOfInterestCrs( const QgsCoordinateReferenceSystem &crs ) { mAreaOfInterestCrs = crs; }
105
106 private:
107
108 QgsCoordinateTransformContext mTransformContext;
109 QgsGeometry mAreaOfInterest;
110 QgsCoordinateReferenceSystem mAreaOfInterestCrs;
111};
112
113#endif // QGSGEOCODERCONTEXT_H
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
void setAreaOfInterestCrs(const QgsCoordinateReferenceSystem &crs)
Sets the crs for the area of interest, which can be used to indicate the desired geographic area wher...
QgsGeocoderContext(const QgsCoordinateTransformContext &transformContext)
Constructor for QgsGeocoderContext, with the specified transformContext.
void setAreaOfInterest(const QgsGeometry &area)
Sets the optional area of interest, which can be used to indicate the desired geographic area where g...
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which should be used whenever the geocoder constructs a coo...
void setTransformContext(const QgsCoordinateTransformContext &context)
Sets the coordinate transform context, which should be used whenever the geocoder constructs a coordi...
QgsCoordinateReferenceSystem areaOfInterestCrs() const
Returns the coordinate reference system for the area of interest, which can be used to indicate the d...
QgsGeometry areaOfInterest() const
Returns the optional area of interest, which can be used to indicate the desired geographic area wher...
A geometry is the spatial representation of a feature.