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 );
406 static
void invalidateCache();
417 double scaleFactor( const
QgsRectangle &referenceExtent ) const;
421 mutable QExplicitlySharedDataPointer<QgsCoordinateTransformPrivate> d;
427 bool mHasContext =
false;
432 int srcDatumTransform,
433 int destDatumTransform );
437 static QReadWriteLock sCacheLock;
446 QString mySummary( QStringLiteral(
"\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" ) );
447 mySummary += QLatin1String(
"\n\tInitialized? : " );
463 mySummary +=
"\n\tShort Circuit? : ";
473 mySummary +=
"\n\tSource Spatial Ref Sys : ";
480 mySummary +=
"Undefined";
483 mySummary +=
"\n\tDest Spatial Ref Sys : ";
486 mySummary << r.destCRS();
490 mySummary +=
"Undefined";
494 mySummary += QLatin1String(
"\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
495 return os << mySummary.toLocal8Bit().data() << std::endl;
500 #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.