QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
vector
geometry_checker
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 : matthias@opengis.ch
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
#include "
qgsgeometrycheckcontext.h
"
17
18
#include <QThread>
19
20
QgsGeometryCheckContext::QgsGeometryCheckContext
(
21
int
precision,
const
QgsCoordinateReferenceSystem
&
mapCrs
,
const
QgsCoordinateTransformContext
&
transformContext
,
const
QgsProject
*
project
,
const
int
uniqueIdFieldIndex
22
)
23
:
tolerance
( std::pow( 10, -precision ) )
24
,
reducedTolerance
( std::pow( 10, -precision / 2 ) )
25
,
mapCrs
(
mapCrs
)
26
,
transformContext
(
transformContext
)
27
,
uniqueIdFieldIndex
(
uniqueIdFieldIndex
)
28
, mProject(
project
)
29
{}
30
31
const
QgsProject
*
QgsGeometryCheckContext::project
()
const
32
{
33
Q_ASSERT( qApp->thread() == QThread::currentThread() );
34
return
mProject;
35
}
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsGeometryCheckContext::project
const QgsProject * project() const
The project can be used to resolve additional layers.
Definition
qgsgeometrycheckcontext.cpp:31
QgsGeometryCheckContext::reducedTolerance
const double reducedTolerance
The tolerance to allow for in geometry checks.
Definition
qgsgeometrycheckcontext.h:61
QgsGeometryCheckContext::transformContext
const QgsCoordinateTransformContext transformContext
The coordinate transform context with which transformations will be done.
Definition
qgsgeometrycheckcontext.h:71
QgsGeometryCheckContext::QgsGeometryCheckContext
QgsGeometryCheckContext(int precision, const QgsCoordinateReferenceSystem &mapCrs, const QgsCoordinateTransformContext &transformContext, const QgsProject *mProject=nullptr, const int uniqueIdFieldIndex=-1)
Creates a new QgsGeometryCheckContext.
Definition
qgsgeometrycheckcontext.cpp:20
QgsGeometryCheckContext::uniqueIdFieldIndex
const int uniqueIdFieldIndex
The index of the unique ID field used to identify features.
Definition
qgsgeometrycheckcontext.h:78
QgsGeometryCheckContext::mapCrs
const QgsCoordinateReferenceSystem mapCrs
The coordinate system in which calculations should be done.
Definition
qgsgeometrycheckcontext.h:66
QgsGeometryCheckContext::tolerance
const double tolerance
The tolerance to allow for in geometry checks.
Definition
qgsgeometrycheckcontext.h:53
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
qgsgeometrycheckcontext.h
Generated on
for QGIS API Documentation by
1.17.0