17#ifndef QGSCOORDINATETRANSFORM_H
18#define QGSCOORDINATETRANSFORM_H
20#include <QExplicitlySharedDataPointer>
28class QgsCoordinateTransformPrivate;
95 Qgis::CoordinateTransformationFlags flags = Qgis::CoordinateTransformationFlags() );
126 Qgis::CoordinateTransformationFlags flags = Qgis::CoordinateTransformationFlags() );
138 int sourceDatumTransformId,
172 bool isValid()
const;
322 void transformInPlace( QVector<float> &x, QVector<float> &y, QVector<float> &z,
337 void transformInPlace( QVector<double> &x, QVector<double> &y, QVector<double> &z,
372 bool isShortCircuited()
const;
390 QString coordinateOperation()
const;
420 void setCoordinateOperation(
const QString &operation )
const;
436 void setAllowFallbackTransforms(
bool allowed );
449 bool allowFallbackTransforms()
const;
482 void setBallparkTransformsAreAppropriate(
bool appropriate );
498 void disableFallbackOperationHandler(
bool disabled );
508 bool fallbackOperationOccurred()
const;
523 Q_DECL_DEPRECATED
int sourceDatumTransformId()
const SIP_DEPRECATED;
538 Q_DECL_DEPRECATED
void setSourceDatumTransformId(
int datumId )
SIP_DEPRECATED;
553 Q_DECL_DEPRECATED
int destinationDatumTransformId()
const SIP_DEPRECATED;
568 Q_DECL_DEPRECATED
void setDestinationDatumTransformId(
int datumId )
SIP_DEPRECATED;
582 static void invalidateCache(
bool disableCache =
false );
592 static void invalidateCache(
bool disableCache
SIP_PYARGREMOVE =
false );
604 double scaleFactor(
const QgsRectangle &referenceExtent )
const;
607 SIP_PYOBJECT __repr__();
609 QString
str = QStringLiteral(
"<QgsCoordinateTransform: %1 to %2>" ).arg( sipCpp->sourceCrs().isValid() ? sipCpp->sourceCrs().authid() : QStringLiteral(
"NULL" ),
610 sipCpp->destinationCrs().isValid() ? sipCpp->destinationCrs().authid() : QStringLiteral(
"NULL" ) );
611 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
668 const QString &error )> &handler );
695 const QString &desiredOperation )> &handler );
714 static void removeFromCacheObjectsBelongingToCurrentThread(
void *pj_context );
717 mutable QExplicitlySharedDataPointer<QgsCoordinateTransformPrivate> d;
723 bool mHasContext =
false;
726 mutable QString mLastError;
727 bool mIgnoreImpossible =
false;
728 bool mBallparkTransformsAreAppropriate =
false;
729 bool mDisableFallbackHandler =
false;
730 mutable bool mFallbackOperationOccurred =
false;
734 const QString &coordinateOperationProj,
bool allowFallback );
739 static QReadWriteLock sCacheLock;
749 static bool sDisableCache;
754 const QString &desiredOperation )> sFallbackOperationOccurredHandler;
756 friend class TestQgsCoordinateTransform;
764 QString mySummary( QStringLiteral(
"\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" ) );
765 mySummary += QLatin1String(
"\n\tInitialized? : " );
781 mySummary +=
"\n\tShort Circuit? : ";
791 mySummary +=
"\n\tSource Spatial Ref Sys : ";
798 mySummary +=
"Undefined";
801 mySummary +=
"\n\tDest Spatial Ref Sys : ";
804 mySummary << r.destCRS();
808 mySummary +=
"Undefined";
812 mySummary += QLatin1String(
"\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
813 return os << mySummary.toLocal8Bit().data() << std::endl;
TransformDirection
Flags for raster layer temporal capabilities.
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Custom exception class for Coordinate Reference System related exceptions.
A class to represent a 2D point.
Used to create and store a proj context object, correctly freeing the context upon destruction.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A rectangle specified with double values.
#define SIP_THROW(name,...)
const QgsCoordinateReferenceSystem & crs