QGIS API Documentation
2.14.0-Essen
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
core
qgscrscache.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscrscache.h
3
--------------
4
begin : September 6th, 2011
5
copyright : (C) 2011 by Marco Hugentobler
6
email : marco dot hugentobler at sourcepole dot ch
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSCRSCACHE_H
19
#define QGSCRSCACHE_H
20
21
#include "
qgscoordinatereferencesystem.h
"
22
#include <QHash>
23
24
class
QgsCoordinateTransform
;
25
28
class
CORE_EXPORT
QgsCoordinateTransformCache
29
{
30
public
:
31
static
QgsCoordinateTransformCache
* instance();
32
33
~
QgsCoordinateTransformCache
();
40
const
QgsCoordinateTransform
* transform(
const
QString
& srcAuthId,
const
QString
& destAuthId,
int
srcDatumTransform = -1,
int
destDatumTransform = -1 );
42
void
invalidateCrs(
const
QString
& crsAuthId );
43
44
private
:
45
static
QgsCoordinateTransformCache
* mInstance;
46
QMultiHash< QPair< QString, QString >
,
QgsCoordinateTransform
* > mTransforms;
//same auth_id pairs might have different datum transformations
47
48
QgsCoordinateTransformCache
();
49
QgsCoordinateTransformCache
(
const
QgsCoordinateTransformCache
& rh );
50
QgsCoordinateTransformCache
& operator=(
const
QgsCoordinateTransformCache
& rh );
51
};
52
53
class
CORE_EXPORT
QgsCRSCache
54
{
55
public
:
56
static
QgsCRSCache
* instance();
57
59
const
QgsCoordinateReferenceSystem
& crsByAuthId(
const
QString
& authid );
60
const
QgsCoordinateReferenceSystem
& crsByEpsgId(
long
epsg );
61
62
void
updateCRSCache(
const
QString
&authid );
63
64
protected
:
65
QgsCRSCache
();
66
67
private
:
68
QHash< QString, QgsCoordinateReferenceSystem >
mCRS;
70
QgsCoordinateReferenceSystem
mInvalidCRS;
71
};
72
73
#endif // QGSCRSCACHE_H
QHash< QString, QgsCoordinateReferenceSystem >
QString
QgsCRSCache
Definition:
qgscrscache.h:53
QgsCoordinateReferenceSystem
Class for storing a coordinate reference system (CRS)
Definition:
qgscoordinatereferencesystem.h:50
QgsCoordinateTransform
Class for doing transforms between two map coordinate systems.
Definition:
qgscoordinatetransform.h:52
qgscoordinatereferencesystem.h
QMultiHash
QgsCoordinateTransformCache
Cache coordinate transform by authid of source/dest transformation to avoid the overhead of initializ...
Definition:
qgscrscache.h:28
Generated on Sat Feb 27 2016 18:33:25 for QGIS API Documentation by
1.8.11