17 #ifndef QGSCOORDINATETRANSFORM_H 18 #define QGSCOORDINATETRANSFORM_H 20 #include <QExplicitlySharedDataPointer> 22 #include "qgsconfig.h" 23 #include "qgis_core.h" 28 class QgsCoordinateTransformPrivate;
137 int sourceDatumTransformId,
138 int destinationDatumTransformId );
157 bool isValid()
const;
254 void transformInPlace(
double &x,
double &y,
double &z,
TransformDirection direction = ForwardTransform ) const
SIP_THROW( QgsCsException );
268 void transformInPlace(
float &x,
float &y,
double &z,
TransformDirection direction = ForwardTransform ) const SIP_SKIP;
282 void transformInPlace(
float &x,
float &y,
float &z,
TransformDirection direction = ForwardTransform ) const SIP_SKIP;
296 void transformInPlace( QVector<
float> &x, QVector<
float> &y, QVector<
float> &z,
311 void transformInPlace( QVector<
double> &x, QVector<
double> &y, QVector<
double> &z,
341 void transformCoords(
int numPoint,
double *x,
double *y,
double *z,
TransformDirection direction = ForwardTransform ) const
SIP_THROW( QgsCsException );
346 bool isShortCircuited() const;
359 int sourceDatumTransformId() const;
372 void setSourceDatumTransformId(
int datumId );
385 int destinationDatumTransformId() const;
398 void setDestinationDatumTransformId(
int datumId );
412 static void invalidateCache(
bool disableCache =
false );
422 static void invalidateCache(
bool disableCache
SIP_PYARGREMOVE =
false );
434 double scaleFactor(
const QgsRectangle &referenceExtent )
const;
438 mutable QExplicitlySharedDataPointer<QgsCoordinateTransformPrivate> d;
444 bool mHasContext =
false;
449 int srcDatumTransform,
450 int destDatumTransform );
454 static QReadWriteLock sCacheLock;
456 static bool sDisableCache;
464 QString mySummary( QStringLiteral(
"\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" ) );
465 mySummary += QLatin1String(
"\n\tInitialized? : " );
481 mySummary +=
"\n\tShort Circuit? : ";
491 mySummary +=
"\n\tSource Spatial Ref Sys : ";
498 mySummary +=
"Undefined";
501 mySummary +=
"\n\tDest Spatial Ref Sys : ";
504 mySummary << r.destCRS();
508 mySummary +=
"Undefined";
512 mySummary += QLatin1String(
"\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
513 return os << mySummary.toLocal8Bit().data() << std::endl;
518 #endif // QGSCOORDINATETRANSFORM_H A rectangle specified with double values.
A class to represent a 2D point.
const QgsCoordinateReferenceSystem & crs
Reads and writes project states.
Contains information about the context in which a coordinate transform is executed.
This class represents a coordinate reference system (CRS).
Custom exception class for Coordinate Reference System related exceptions.