QGIS API Documentation
2.0.1-Dufour
|
Cache coordinate transform by authid of source/dest transformation to avoid the overhead of initialisation for each redraw. More...
#include <qgscrscache.h>
Public Member Functions | |
~QgsCoordinateTransformCache () | |
const QgsCoordinateTransform * | transform (const QString &srcAuthId, const QString &destAuthId) |
Returns coordinate transformation. | |
void | invalidateCrs (const QString &crsAuthId) |
Removes transformations where a changed crs is involved from the cache. |
Static Public Member Functions | |
static QgsCoordinateTransformCache * | instance () |
Private Attributes | |
QHash< QPair< QString, QString > , QgsCoordinateTransform * > | mTransforms |
Static Private Attributes | |
static QgsCoordinateTransformCache * | mInstance = 0 |
Cache coordinate transform by authid of source/dest transformation to avoid the overhead of initialisation for each redraw.
Definition at line 28 of file qgscrscache.h.
QgsCoordinateTransformCache::~QgsCoordinateTransformCache | ( | ) |
Definition at line 32 of file qgscrscache.cpp.
References mInstance, and mTransforms.
|
static |
Definition at line 23 of file qgscrscache.cpp.
References mInstance.
Referenced by QgsMapRenderer::render(), QgsMapRenderer::tr(), and transform().
void QgsCoordinateTransformCache::invalidateCrs | ( | const QString & | crsAuthId | ) |
Removes transformations where a changed crs is involved from the cache.
Definition at line 60 of file qgscrscache.cpp.
References mTransforms.
const QgsCoordinateTransform * QgsCoordinateTransformCache::transform | ( | const QString & | srcAuthId, |
const QString & | destAuthId | ||
) |
Returns coordinate transformation.
Cache keeps ownership
srcAuthId | auth id string of source crs |
destAuthId | auth id string of dest crs |
Definition at line 42 of file qgscrscache.cpp.
References instance(), and mTransforms.
Referenced by QgsMapRenderer::render(), and QgsMapRenderer::tr().
|
staticprivate |
Definition at line 41 of file qgscrscache.h.
Referenced by instance(), and ~QgsCoordinateTransformCache().
|
private |
Definition at line 42 of file qgscrscache.h.
Referenced by invalidateCrs(), transform(), and ~QgsCoordinateTransformCache().