QGIS API Documentation
2.0.1-Dufour
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
~
QgsCoordinateTransformCache
();
36
const
QgsCoordinateTransform
* transform(
const
QString& srcAuthId,
const
QString& destAuthId );
38
void
invalidateCrs(
const
QString& crsAuthId );
39
40
private
:
41
static
QgsCoordinateTransformCache
*
mInstance
;
42
QHash< QPair< QString, QString >,
QgsCoordinateTransform
* >
mTransforms
;
43
};
44
45
class
CORE_EXPORT
QgsCRSCache
46
{
47
public
:
48
static
QgsCRSCache
* instance();
49
~
QgsCRSCache
();
51
const
QgsCoordinateReferenceSystem
& crsByAuthId(
const
QString& authid );
52
const
QgsCoordinateReferenceSystem
& crsByEpsgId(
long
epsg );
53
54
void
updateCRSCache(
const
QString &authid );
55
56
protected
:
57
QgsCRSCache
();
58
59
private
:
60
static
QgsCRSCache
*
mInstance
;
61
QHash< QString, QgsCoordinateReferenceSystem >
mCRS
;
63
QgsCoordinateReferenceSystem
mInvalidCRS
;
64
};
65
66
#endif // QGSCRSCACHE_H
Generated on Tue Sep 24 2013 14:41:46 for QGIS API Documentation by
1.8.1.2