Utility functions for working with the proj library.
More...
#include <qgsprojutils.h>
Utility functions for working with the proj library.
- Since
- QGIS 3.8
Definition at line 44 of file qgsprojutils.h.
◆ proj_pj_unique_ptr
◆ IdentifyFlag
Flags controlling CRS identification behavior.
Enumerator |
---|
FlagMatchBoundCrsToUnderlyingSourceCrs | Allow matching a BoundCRS object to its underlying SourceCRS.
|
Definition at line 119 of file qgsprojutils.h.
◆ axisOrderIsSwapped()
bool QgsProjUtils::axisOrderIsSwapped |
( |
const PJ * |
crs | ) |
|
|
static |
Returns true
if the given proj coordinate system uses requires y/x coordinate order instead of x/y.
Definition at line 111 of file qgsprojutils.cpp.
◆ coordinateOperationIsAvailable()
bool QgsProjUtils::coordinateOperationIsAvailable |
( |
const QString & |
projDef | ) |
|
|
static |
Returns true
if a coordinate operation (specified via proj string) is available.
Definition at line 288 of file qgsprojutils.cpp.
◆ crsToDatumEnsemble()
Given a PROJ crs, attempt to retrieve the datum ensemble from it.
- Warning
- This method requires PROJ 8.0 or later
- Exceptions
-
- Since
- QGIS 3.20
Definition at line 217 of file qgsprojutils.cpp.
◆ crsToSingleCrs()
Given a PROJ crs (which may be a compound or bound crs, or some other type), extract a single crs from it.
Definition at line 183 of file qgsprojutils.cpp.
◆ epsgRegistryDate()
QDate QgsProjUtils::epsgRegistryDate |
( |
| ) |
|
|
static |
◆ epsgRegistryVersion()
QString QgsProjUtils::epsgRegistryVersion |
( |
| ) |
|
|
static |
◆ esriDatabaseDate()
QDate QgsProjUtils::esriDatabaseDate |
( |
| ) |
|
|
static |
◆ esriDatabaseVersion()
QString QgsProjUtils::esriDatabaseVersion |
( |
| ) |
|
|
static |
Returns the ESRI projection engine database version used by the proj library (e.g.
"ArcMap 10.8.0").
- See also
- esriDatabaseDate()
- Since
- QGIS 3.20
Definition at line 379 of file qgsprojutils.cpp.
◆ gridsUsed()
Returns a list of grids used by the given proj string.
Definition at line 301 of file qgsprojutils.cpp.
◆ identifyCrs()
bool QgsProjUtils::identifyCrs |
( |
const PJ * |
crs, |
|
|
QString & |
authName, |
|
|
QString & |
authCode, |
|
|
IdentifyFlags |
flags = IdentifyFlags() |
|
) |
| |
|
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 234 of file qgsprojutils.cpp.
◆ ignfDatabaseDate()
QDate QgsProjUtils::ignfDatabaseDate |
( |
| ) |
|
|
static |
◆ ignfDatabaseVersion()
QString QgsProjUtils::ignfDatabaseVersion |
( |
| ) |
|
|
static |
◆ isDynamic()
bool QgsProjUtils::isDynamic |
( |
const PJ * |
crs | ) |
|
|
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.
- Since
- QGIS 3.20
Definition at line 142 of file qgsprojutils.cpp.
◆ projVersionMajor()
int QgsProjUtils::projVersionMajor |
( |
| ) |
|
|
static |
Returns the proj library major version number.
Definition at line 355 of file qgsprojutils.cpp.
◆ projVersionMinor()
int QgsProjUtils::projVersionMinor |
( |
| ) |
|
|
static |
Returns the proj library minor version number.
- Since
- QGIS 3.20
Definition at line 360 of file qgsprojutils.cpp.
◆ searchPaths()
QStringList QgsProjUtils::searchPaths |
( |
| ) |
|
|
static |
Returns the current list of Proj file search paths.
- Note
- Only available on builds based on Proj >= 6.0. Builds based on earlier Proj versions will always return an empty list.
Definition at line 407 of file qgsprojutils.cpp.
◆ usesAngularUnit()
bool QgsProjUtils::usesAngularUnit |
( |
const QString & |
projDef | ) |
|
|
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 72 of file qgsprojutils.cpp.
The documentation for this class was generated from the following files: