18 #ifndef QGSCOORDINATEREFERENCESYSTEM_PRIVATE_H 19 #define QGSCOORDINATEREFERENCESYSTEM_PRIVATE_H 34 #if PROJ_VERSION_MAJOR>=6 38 #include <ogr_srs_api.h> 47 class QgsCoordinateReferenceSystemPrivate :
public QSharedData
51 explicit QgsCoordinateReferenceSystemPrivate()
52 #if PROJ_VERSION_MAJOR<6 53 : mCRS( OSRNewSpatialReference(
nullptr ) )
58 QgsCoordinateReferenceSystemPrivate(
const QgsCoordinateReferenceSystemPrivate &other )
59 : QSharedData( other )
60 , mSrsId( other.mSrsId )
61 , mDescription( other.mDescription )
62 , mProjectionAcronym( other.mProjectionAcronym )
63 , mEllipsoidAcronym( other.mEllipsoidAcronym )
64 , mIsGeographic( other.mIsGeographic )
65 , mMapUnits( other.mMapUnits )
66 , mSRID( other.mSRID )
67 , mAuthId( other.mAuthId )
68 , mIsValid( other.mIsValid )
69 #if PROJ_VERSION_MAJOR<6
72 , mValidationHint( other.mValidationHint )
74 , mProj4( other.mProj4 )
75 , mAxisInvertedDirty( other.mAxisInvertedDirty )
76 , mAxisInverted( other.mAxisInverted )
78 #if PROJ_VERSION_MAJOR>=6 79 if ( mIsValid && other.mPj )
84 mCRS = OSRClone( other.mCRS );
88 mCRS = OSRNewSpatialReference(
nullptr );
93 ~QgsCoordinateReferenceSystemPrivate()
95 #if PROJ_VERSION_MAJOR<6 96 OSRDestroySpatialReference( mCRS );
104 QString mDescription;
107 QString mProjectionAcronym;
110 QString mEllipsoidAcronym;
113 bool mIsGeographic =
false;
125 bool mIsValid =
false;
127 #if PROJ_VERSION_MAJOR>=6 128 QgsProjUtils::proj_pj_unique_ptr mPj;
133 QString mValidationHint;
134 mutable QString mWkt;
135 mutable QString mProj4;
138 mutable bool mAxisInvertedDirty =
false;
141 mutable bool mAxisInverted =
false;
147 #endif //QGSCOORDINATEREFERENCESYSTEM_PRIVATE_H
DistanceUnit
Units of distance.
static PJ_CONTEXT * get()
Returns a thread local instance of a proj context, safe for use in the current thread.
void * OGRSpatialReferenceH