QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
|
Utility functions for working with the proj library. More...
#include <qgsprojutils.h>
Classes | |
struct | ProjPJDeleter |
Destroys Proj PJ objects. More... | |
Public Types | |
enum | IdentifyFlag { FlagMatchBoundCrsToUnderlyingSourceCrs = 1 << 0 } |
Flags controlling CRS identification behavior. More... | |
typedef QFlags< IdentifyFlag > | IdentifyFlags |
using | proj_pj_unique_ptr = std::unique_ptr< PJ, ProjPJDeleter > |
Scoped Proj PJ object. More... | |
Static Public Member Functions | |
static bool | axisOrderIsSwapped (const PJ *crs) |
Returns true if the given proj coordinate system uses requires y/x coordinate order instead of x/y. More... | |
static bool | coordinateOperationIsAvailable (const QString &projDef) |
Returns true if a coordinate operation (specified via proj string) is available. More... | |
static proj_pj_unique_ptr | createCompoundCrs (const PJ *horizontalCrs, const PJ *verticalCrs) |
Given a PROJ horizontal and vertical CRS, attempt to create a compound CRS from them. More... | |
static proj_pj_unique_ptr | crsToDatumEnsemble (const PJ *crs) |
Given a PROJ crs, attempt to retrieve the datum ensemble from it. More... | |
static proj_pj_unique_ptr | crsToHorizontalCrs (const PJ *crs) |
Given a PROJ crs (which may be a compound or bound crs, or some other type), extract the horizontal crs from it. More... | |
static proj_pj_unique_ptr | crsToVerticalCrs (const PJ *crs) |
Given a PROJ crs (which may be a compound crs, or some other type), extract the vertical crs from it. More... | |
static QDate | epsgRegistryDate () |
Returns the EPSG registry database release date used by the proj library. More... | |
static QString | epsgRegistryVersion () |
Returns the EPSG registry database version used by the proj library (e.g. More... | |
static QDate | esriDatabaseDate () |
Returns the ESRI projection engine database release date used by the proj library. More... | |
static QString | esriDatabaseVersion () |
Returns the ESRI projection engine database version used by the proj library (e.g. More... | |
static QList< QgsDatumTransform::GridDetails > | gridsUsed (const QString &proj) |
Returns a list of grids used by the given proj string. More... | |
static bool | identifyCrs (const PJ *crs, QString &authName, QString &authCode, IdentifyFlags flags=IdentifyFlags()) |
Attempts to identify a crs, matching it to a known authority and code within an acceptable level of tolerance. More... | |
static QDate | ignfDatabaseDate () |
Returns the IGNF database release date used by the proj library. More... | |
static QString | ignfDatabaseVersion () |
Returns the IGNF database version used by the proj library (e.g. More... | |
static bool | isDynamic (const PJ *crs) |
Returns true if the given proj coordinate system is a dynamic CRS. More... | |
static int | projVersionMajor () |
Returns the proj library major version number. More... | |
static int | projVersionMinor () |
Returns the proj library minor version number. More... | |
static QStringList | searchPaths () |
Returns the current list of Proj file search paths. More... | |
static proj_pj_unique_ptr | unboundCrs (const PJ *crs) |
Given a PROJ crs (which may be a compound or bound crs, or some other type), ensure that it is not a bound CRS object. More... | |
static bool | usesAngularUnit (const QString &projDef) |
Returns true if the given proj coordinate system uses angular units. More... | |
Utility functions for working with the proj library.
Definition at line 44 of file qgsprojutils.h.
typedef QFlags< IdentifyFlag > QgsProjUtils::IdentifyFlags |
Definition at line 123 of file qgsprojutils.h.
using QgsProjUtils::proj_pj_unique_ptr = std::unique_ptr< PJ, ProjPJDeleter > |
Scoped Proj PJ object.
Definition at line 141 of file qgsprojutils.h.
Flags controlling CRS identification behavior.
Enumerator | |
---|---|
FlagMatchBoundCrsToUnderlyingSourceCrs | Allow matching a BoundCRS object to its underlying SourceCRS. |
Definition at line 119 of file qgsprojutils.h.
|
static |
Returns true
if the given proj coordinate system uses requires y/x coordinate order instead of x/y.
Definition at line 112 of file qgsprojutils.cpp.
|
static |
Returns true
if a coordinate operation (specified via proj string) is available.
Definition at line 361 of file qgsprojutils.cpp.
|
static |
Given a PROJ horizontal and vertical CRS, attempt to create a compound CRS from them.
Definition at line 295 of file qgsprojutils.cpp.
|
static |
Given a PROJ crs, attempt to retrieve the datum ensemble from it.
QgsNotSupportedException | on QGIS builds based on PROJ 7 or earlier. |
Definition at line 275 of file qgsprojutils.cpp.
|
static |
Given a PROJ crs (which may be a compound or bound crs, or some other type), extract the horizontal crs from it.
If crs does not contain a horizontal CRS (i.e. it is a vertical CRS) nullptr
will be returned.
Definition at line 187 of file qgsprojutils.cpp.
|
static |
Given a PROJ crs (which may be a compound crs, or some other type), extract the vertical crs from it.
If crs does not contain a vertical CRS (i.e. it is a horizontal CRS) nullptr
will be returned.
Definition at line 221 of file qgsprojutils.cpp.
|
static |
Returns the EPSG registry database release date used by the proj library.
Definition at line 445 of file qgsprojutils.cpp.
|
static |
Returns the EPSG registry database version used by the proj library (e.g.
"v9.8.6").
Definition at line 438 of file qgsprojutils.cpp.
|
static |
Returns the ESRI projection engine database release date used by the proj library.
Definition at line 459 of file qgsprojutils.cpp.
|
static |
Returns the ESRI projection engine database version used by the proj library (e.g.
"ArcMap 10.8.0").
Definition at line 452 of file qgsprojutils.cpp.
|
static |
Returns a list of grids used by the given proj string.
Definition at line 374 of file qgsprojutils.cpp.
|
static |
Attempts to identify a crs, matching it to a known authority and code within an acceptable level of tolerance.
Returns true
if a matching authority and code was found.
Definition at line 307 of file qgsprojutils.cpp.
|
static |
Returns the IGNF database release date used by the proj library.
Definition at line 473 of file qgsprojutils.cpp.
|
static |
Returns the IGNF database version used by the proj library (e.g.
"3.1.0").
Definition at line 466 of file qgsprojutils.cpp.
|
static |
Returns true
if the given proj coordinate system is a dynamic CRS.
A dynamic CRS relies on a dynamic datum, that is a datum that is not plate-fixed.
Definition at line 143 of file qgsprojutils.cpp.
|
static |
Returns the proj library major version number.
Definition at line 428 of file qgsprojutils.cpp.
|
static |
Returns the proj library minor version number.
Definition at line 433 of file qgsprojutils.cpp.
|
static |
Returns the current list of Proj file search paths.
Definition at line 480 of file qgsprojutils.cpp.
|
static |
Given a PROJ crs (which may be a compound or bound crs, or some other type), ensure that it is not a bound CRS object.
Bound CRS objects will be returned as their source CRS, other types will be returned as a direct clone.
Definition at line 253 of file qgsprojutils.cpp.
|
static |
Returns true
if the given proj coordinate system uses angular units.
projDef must be a proj string defining a CRS object.
Definition at line 73 of file qgsprojutils.cpp.