QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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"
20
23#include "qgsgeometry.h"
24
31class CORE_EXPORT QgsGeocoderContext
32{
33
34 public:
35
39 QgsGeocoderContext( const QgsCoordinateTransformContext &transformContext );
40
47 QgsCoordinateTransformContext transformContext() const { return mTransformContext; }
48
55 void setTransformContext( const QgsCoordinateTransformContext &context ) { mTransformContext = context; }
56
71 QgsGeometry areaOfInterest() const { return mAreaOfInterest; }
72
87 void setAreaOfInterest( const QgsGeometry &area ) { mAreaOfInterest = area; }
88
96 QgsCoordinateReferenceSystem areaOfInterestCrs() const { return mAreaOfInterestCrs; }
97
105 void setAreaOfInterestCrs( const QgsCoordinateReferenceSystem &crs ) { mAreaOfInterestCrs = crs; }
106
107 private:
108
109 QgsCoordinateTransformContext mTransformContext;
110 QgsGeometry mAreaOfInterest;
111 QgsCoordinateReferenceSystem mAreaOfInterestCrs;
112};
113
114#endif // QGSGEOCODERCONTEXT_H
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Encapsulates the context of a geocoding operation.
void setAreaOfInterestCrs(const QgsCoordinateReferenceSystem &crs)
Sets the crs for the area of interest, which can be used to indicate the desired geographic area wher...
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.
Definition: qgsgeometry.h:164
const QgsCoordinateReferenceSystem & crs