A registry for known coordinate reference system (CRS) definitions, including any user-defined CRSes.
More...
#include <qgscoordinatereferencesystemregistry.h>
|
void | crsDefinitionsChanged () |
| Emitted whenever an operation has caused any of the known CRS definitions (including user-defined CRS) to change. More...
|
|
void | userCrsAdded (const QString &id) |
| Emitted whenever a new user CRS definition is added. More...
|
|
void | userCrsChanged (const QString &id) |
| Emitted whenever an existing user CRS definition is changed. More...
|
|
void | userCrsRemoved (long id) |
| Emitted when the user CRS with matching id is removed from the database. More...
|
|
A registry for known coordinate reference system (CRS) definitions, including any user-defined CRSes.
QgsCoordinateReferenceSystemRegistry is not usually directly created, but rather accessed through QgsApplication::coordinateReferenceSystemRegistry().
- Since
- QGIS 3.18
Definition at line 39 of file qgscoordinatereferencesystemregistry.h.
◆ QgsCoordinateReferenceSystemRegistry()
QgsCoordinateReferenceSystemRegistry::QgsCoordinateReferenceSystemRegistry |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ ~QgsCoordinateReferenceSystemRegistry()
QgsCoordinateReferenceSystemRegistry::~QgsCoordinateReferenceSystemRegistry |
( |
| ) |
|
|
default |
◆ addUserCrs()
Adds a new crs definition as a custom ("USER") CRS.
Returns the new CRS srsid(), or -1 if the CRS could not be saved.
The nativeFormat argument specifies the format to use when saving the CRS definition. FormatWkt is recommended as it is a lossless format.
- Warning
- Not all CRS definitions can be represented as a Proj string, so take care when using the FormatProj option.
- See also
- updateUserCrs()
-
userCrsAdded()
Definition at line 82 of file qgscoordinatereferencesystemregistry.cpp.
◆ celestialBodies()
QList< QgsCelestialBody > QgsCoordinateReferenceSystemRegistry::celestialBodies |
( |
| ) |
const |
◆ crsDefinitionsChanged
void QgsCoordinateReferenceSystemRegistry::crsDefinitionsChanged |
( |
| ) |
|
|
signal |
Emitted whenever an operation has caused any of the known CRS definitions (including user-defined CRS) to change.
◆ projOperations()
QMap< QString, QgsProjOperation > QgsCoordinateReferenceSystemRegistry::projOperations |
( |
| ) |
const |
◆ removeUserCrs()
bool QgsCoordinateReferenceSystemRegistry::removeUserCrs |
( |
long |
id | ) |
|
◆ updateUserCrs()
Updates the definition of the existing user CRS with matching id.
The crs argument specifies a CRS with the desired new definition.
Returns false
if the new CRS definition could not be saved.
The nativeFormat argument specifies the format to use when saving the CRS definition. FormatWkt is recommended as it is a lossless format.
- Warning
- Not all CRS definitions can be represented as a Proj string, so take care when using the FormatProj option.
- See also
- addUserCrs()
-
userCrsChanged()
Definition at line 174 of file qgscoordinatereferencesystemregistry.cpp.
◆ userCrsAdded
void QgsCoordinateReferenceSystemRegistry::userCrsAdded |
( |
const QString & |
id | ) |
|
|
signal |
◆ userCrsChanged
void QgsCoordinateReferenceSystemRegistry::userCrsChanged |
( |
const QString & |
id | ) |
|
|
signal |
Emitted whenever an existing user CRS definition is changed.
The id argument specifies the ID of the user CRS which has been changed.
Objects which store QgsCoordinateReferenceSystem members should connect to this signal and update any stored CRS definitions to ensure that they always use the current definition of any user defined CRSes.
- See also
- crsDefinitionsChanged()
-
userCrsAdded()
◆ userCrsList()
◆ userCrsRemoved
void QgsCoordinateReferenceSystemRegistry::userCrsRemoved |
( |
long |
id | ) |
|
|
signal |
Emitted when the user CRS with matching id is removed from the database.
- See also
- removeUserCrs()
The documentation for this class was generated from the following files: