QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsgeometrycheckcontext.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgeometrycheckcontext.h
3  ---------------------
4  begin : September 2018
5  copyright : (C) 2018 Matthias Kuhn
6  email : [email protected]
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 
17 #include <QThread>
18 
20  : tolerance( std::pow( 10, -precision ) )
21  , reducedTolerance( std::pow( 10, -precision / 2 ) )
22  , mapCrs( mapCrs )
23  , transformContext( transformContext )
24  , mProject( project )
25 {
26 }
27 
29 {
30  Q_ASSERT( qApp->thread() == QThread::currentThread() );
31  return mProject;
32 }
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition: qgscoordinatetransformcontext.h:58
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:95
precision
int precision
Definition: qgswfsgetfeature.cpp:49
qgsgeometrycheckcontext.h
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsGeometryCheckContext::project
const QgsProject * project() const
The project can be used to resolve additional layers.
Definition: qgsgeometrycheckcontext.cpp:28
QgsGeometryCheckContext::QgsGeometryCheckContext
QgsGeometryCheckContext(int precision, const QgsCoordinateReferenceSystem &mapCrs, const QgsCoordinateTransformContext &transformContext, const QgsProject *mProject)
Creates a new QgsGeometryCheckContext.
Definition: qgsgeometrycheckcontext.cpp:19