QGIS API Documentation  2.99.0-Master (ae4d26a)
Public Member Functions | Static Public Member Functions | List of all members
QgsCoordinateTransformCache Class Reference

Cache coordinate transform by authid of source/dest transformation to avoid the overhead of initialization for each redraw. More...

#include <qgscrscache.h>

Public Member Functions

 QgsCoordinateTransformCache (const QgsCoordinateTransformCache &rh)=delete
 QgsCoordinateTransformCache cannot be copied. More...
 
void invalidateCrs (const QString &crsAuthId)
 Removes transformations where a changed crs is involved from the cache. More...
 
QgsCoordinateTransformCacheoperator= (const QgsCoordinateTransformCache &rh)=delete
 QgsCoordinateTransformCache cannot be copied. More...
 
QgsCoordinateTransform transform (const QString &srcAuthId, const QString &destAuthId, int srcDatumTransform=-1, int destDatumTransform=-1)
 Returns coordinate transformation. More...
 

Static Public Member Functions

static QgsCoordinateTransformCacheinstance ()
 

Detailed Description

Cache coordinate transform by authid of source/dest transformation to avoid the overhead of initialization for each redraw.

Definition at line 32 of file qgscrscache.h.

Constructor & Destructor Documentation

◆ QgsCoordinateTransformCache()

QgsCoordinateTransformCache::QgsCoordinateTransformCache ( const QgsCoordinateTransformCache rh)
delete

QgsCoordinateTransformCache cannot be copied.

Member Function Documentation

◆ instance()

QgsCoordinateTransformCache * QgsCoordinateTransformCache::instance ( )
static

Definition at line 22 of file qgscrscache.cpp.

◆ invalidateCrs()

void QgsCoordinateTransformCache::invalidateCrs ( const QString &  crsAuthId)

Removes transformations where a changed crs is involved from the cache.

Definition at line 55 of file qgscrscache.cpp.

◆ operator=()

QgsCoordinateTransformCache& QgsCoordinateTransformCache::operator= ( const QgsCoordinateTransformCache rh)
delete

QgsCoordinateTransformCache cannot be copied.

◆ transform()

QgsCoordinateTransform QgsCoordinateTransformCache::transform ( const QString &  srcAuthId,
const QString &  destAuthId,
int  srcDatumTransform = -1,
int  destDatumTransform = -1 
)

Returns coordinate transformation.

Cache keeps ownership

Parameters
srcAuthIdauth id string of source crs
destAuthIdauth id string of dest crs
srcDatumTransformid of source's datum transform
destDatumTransformid of destinations's datum transform
Returns
matching transform, or an invalid transform if none could be created

Definition at line 28 of file qgscrscache.cpp.


The documentation for this class was generated from the following files: