17 #ifndef QGSPROJUTILS_H
18 #define QGSPROJUTILS_H
22 #include "qgis_core.h"
24 #include "qgsconfig.h"
27 #include <QStringList>
29 #if !defined(USE_THREAD_LOCAL) || defined(Q_OS_WIN)
30 #include <QThreadStorage>
35 typedef struct PJconsts
PJ;
51 static int projVersionMajor();
58 static int projVersionMinor();
66 static QString epsgRegistryVersion();
74 static QDate epsgRegistryDate();
82 static QString esriDatabaseVersion();
90 static QDate esriDatabaseDate();
98 static QString ignfDatabaseVersion();
106 static QDate ignfDatabaseDate();
114 static QStringList searchPaths();
121 FlagMatchBoundCrsToUnderlyingSourceCrs = 1 << 0,
123 Q_DECLARE_FLAGS( IdentifyFlags, IdentifyFlag )
134 void CORE_EXPORT operator()(
PJ *
object );
147 static bool usesAngularUnit(
const QString &projDef );
155 static bool axisOrderIsSwapped(
const PJ *
crs );
165 static bool isDynamic(
const PJ *
crs );
190 static bool identifyCrs(
const PJ *
crs, QString &authName, QString &authCode, IdentifyFlags flags = IdentifyFlags() );
195 static bool coordinateOperationIsAvailable(
const QString &projDef );
200 static QList< QgsDatumTransform::GridDetails > gridsUsed(
const QString &proj );
208 static QStringList nonAvailableGrids(
const QString &projDef );
215 #if PROJ_VERSION_MAJOR>=8
249 #if defined(USE_THREAD_LOCAL) && !defined(Q_OS_WIN)
252 static QThreadStorage< QgsProjContext * > sProjContext;
Used to create and store a proj context object, correctly freeing the context upon destruction.
Utility functions for working with the proj library.
IdentifyFlag
Flags controlling CRS identification behavior.
std::unique_ptr< PJ, ProjPJDeleter > proj_pj_unique_ptr
Scoped Proj PJ object.
struct projCtx_t PJ_CONTEXT
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
const QgsCoordinateReferenceSystem & crs
Destroys Proj PJ objects.