17 #ifndef QGSCOORDINATETRANSFORM_H 18 #define QGSCOORDINATETRANSFORM_H 20 #include <QExplicitlySharedDataPointer> 22 #include "qgsconfig.h" 23 #include "qgis_core.h" 28 class QgsCoordinateTransformPrivate;
124 int sourceDatumTransformId,
125 int destinationDatumTransformId );
144 bool isValid()
const;
241 void transformInPlace(
double &x,
double &y,
double &z,
TransformDirection direction = ForwardTransform ) const
SIP_THROW( QgsCsException );
269 void transformInPlace(
float &x,
float &y,
float &z,
TransformDirection direction = ForwardTransform ) const SIP_SKIP;
283 void transformInPlace( QVector<
float> &x, QVector<
float> &y, QVector<
float> &z,
298 void transformInPlace( QVector<
double> &x, QVector<
double> &y, QVector<
double> &z,
328 void transformCoords(
int numPoint,
double *x,
double *y,
double *z,
TransformDirection direction = ForwardTransform ) const
SIP_THROW( QgsCsException );
333 bool isShortCircuited() const;
345 QString coordinateOperation() const;
360 void setCoordinateOperation( const QString &operation ) const;
375 Q_DECL_DEPRECATED
int sourceDatumTransformId() const
SIP_DEPRECATED;
390 Q_DECL_DEPRECATED
void setSourceDatumTransformId(
int datumId ) SIP_DEPRECATED;
405 Q_DECL_DEPRECATED
int destinationDatumTransformId() const SIP_DEPRECATED;
420 Q_DECL_DEPRECATED
void setDestinationDatumTransformId(
int datumId ) SIP_DEPRECATED;
428 static
void invalidateCache();
439 double scaleFactor( const
QgsRectangle &referenceExtent ) const;
494 const QString &error )> &handler );
515 mutable QExplicitlySharedDataPointer<QgsCoordinateTransformPrivate> d;
521 bool mHasContext =
false;
524 #if PROJ_VERSION_MAJOR>=6 527 const QString &coordinateOperationProj );
531 int srcDatumTransform,
532 int destDatumTransform );
537 static QReadWriteLock sCacheLock;
546 QString mySummary( QStringLiteral(
"\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" ) );
547 mySummary += QLatin1String(
"\n\tInitialized? : " );
563 mySummary +=
"\n\tShort Circuit? : ";
573 mySummary +=
"\n\tSource Spatial Ref Sys : ";
580 mySummary +=
"Undefined";
583 mySummary +=
"\n\tDest Spatial Ref Sys : ";
586 mySummary << r.destCRS();
590 mySummary +=
"Undefined";
594 mySummary += QLatin1String(
"\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
595 return os << mySummary.toLocal8Bit().data() << std::endl;
600 #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.