QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsgeometrycheckcontext.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsgeometrycheckcontext.h
3 ---------------------
4 begin : September 2018
5 copyright : (C) 2018 Matthias Kuhn
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
18#include <QThread>
19
21 : tolerance( std::pow( 10, -precision ) )
22 , reducedTolerance( std::pow( 10, -precision / 2 ) )
23 , mapCrs( mapCrs )
26 , mProject( project )
27{
28}
29
31{
32 Q_ASSERT( qApp->thread() == QThread::currentThread() );
33 return mProject;
34}
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
const QgsProject * project() const
The project can be used to resolve additional layers.
const double reducedTolerance
The tolerance to allow for in geometry checks.
const QgsCoordinateTransformContext transformContext
The coordinate transform context with which transformations will be done.
QgsGeometryCheckContext(int precision, const QgsCoordinateReferenceSystem &mapCrs, const QgsCoordinateTransformContext &transformContext, const QgsProject *mProject=nullptr, const int uniqueIdFieldIndex=-1)
Creates a new QgsGeometryCheckContext.
const int uniqueIdFieldIndex
The index of the unique ID field used to identify features.
const QgsCoordinateReferenceSystem mapCrs
The coordinate system in which calculations should be done.
const double tolerance
The tolerance to allow for in geometry checks.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:109