-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
qgscoordinatetransformcontext_p.h
83 lines (59 loc) · 2.85 KB
/
qgscoordinatetransformcontext_p.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/***************************************************************************
qgscoordinatetransformcontext_p.h
-------------------------------
begin : November 2017
copyright : (C) 2017 by Nyall Dawson
email : nyall dot dawson at gmail dot com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSCOORDINATETRANSFORMCONTEXT_PRIVATE_H
#define QGSCOORDINATETRANSFORMCONTEXT_PRIVATE_H
/// @cond PRIVATE
//
// W A R N I N G
// -------------
//
// This file is not part of the QGIS API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
/***************************************************************************
* This class is considered CRITICAL and any change MUST be accompanied with
* full unit tests in testqgsfeature.cpp.
* See details in QEP #17
****************************************************************************/
#include "qgscoordinatereferencesystem.h"
class QgsCoordinateTransformContextPrivate : public QSharedData
{
public:
QgsCoordinateTransformContextPrivate() = default;
QgsCoordinateTransformContextPrivate( const QgsCoordinateTransformContextPrivate &other )
: QSharedData( other )
{
other.mLock.lockForRead();
mSourceDestDatumTransforms = other.mSourceDestDatumTransforms;
mSourceDatumTransforms = other.mSourceDatumTransforms;
mDestDatumTransforms = other.mDestDatumTransforms;
other.mLock.unlock();
}
/**
* Mapping for datum transforms to use for source/destination CRS pairs.
* Matching records from this map will take precedence over other transform maps.
*/
QMap< QPair< QString, QString >, QPair< int, int > > mSourceDestDatumTransforms;
//! Mapping for datum transforms to use for source CRS
QMap< QString, int > mSourceDatumTransforms;
//! Mapping for datum transforms to use for destination CRS
QMap< QString, int > mDestDatumTransforms;
//! Mutex for making QgsCoordinateTransformContextPrivate thread safe
mutable QReadWriteLock mLock;
};
/// @endcond
#endif // QGSCOORDINATETRANSFORMCONTEXT_PRIVATE_H