/************************************************************************ * This file has been generated automatically from * * * * src/core/qgscoordinatereferencesystemregistry.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/ class QgsCoordinateReferenceSystemRegistry : QObject { %Docstring A registry for known coordinate reference system (CRS) definitions, including any user-defined CRSes. :py:class:`QgsCoordinateReferenceSystemRegistry` is not usually directly created, but rather accessed through :py:func:`QgsApplication.coordinateReferenceSystemRegistry()`. .. versionadded:: 3.18 %End %TypeHeaderCode #include "qgscoordinatereferencesystemregistry.h" %End public: explicit QgsCoordinateReferenceSystemRegistry( QObject *parent = 0 ); %Docstring Constructor for QgsCoordinateReferenceSystemRegistry, with the specified ``parent`` object. %End class UserCrsDetails { %Docstring Contains details of a custom (user defined) CRS. .. versionadded:: 3.18 %End %TypeHeaderCode #include "qgscoordinatereferencesystemregistry.h" %End public: long id; QString name; QString proj; QString wkt; QgsCoordinateReferenceSystem crs; }; QList< QgsCoordinateReferenceSystemRegistry::UserCrsDetails > userCrsList() const; %Docstring Returns a list containing the details of all registered custom (user-defined) CRSes. %End long addUserCrs( const QgsCoordinateReferenceSystem &crs, const QString &name, QgsCoordinateReferenceSystem::Format nativeFormat = QgsCoordinateReferenceSystem::FormatWkt ); %Docstring Adds a new ``crs`` definition as a custom ("USER") CRS. Returns the new CRS :py:func:`~QgsCoordinateReferenceSystemRegistry.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. .. seealso:: :py:func:`updateUserCrs` .. seealso:: :py:func:`userCrsAdded` %End bool updateUserCrs( long id, const QgsCoordinateReferenceSystem &crs, const QString &name, QgsCoordinateReferenceSystem::Format nativeFormat = QgsCoordinateReferenceSystem::FormatWkt ); %Docstring 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. .. seealso:: :py:func:`addUserCrs` .. seealso:: :py:func:`userCrsChanged` %End bool removeUserCrs( long id ); %Docstring Removes the existing user CRS with matching ``id``. Returns ``False`` if the CRS could not be removed. .. seealso:: :py:func:`userCrsRemoved` %End signals: void userCrsChanged( const QString &id ); %Docstring 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 :py:class:`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. .. seealso:: :py:func:`crsDefinitionsChanged` .. seealso:: :py:func:`userCrsAdded` %End void userCrsAdded( const QString &id ); %Docstring Emitted whenever a new user CRS definition is added. The ``id`` argument specifies the ID of the user CRS which has been changed. .. seealso:: :py:func:`userCrsChanged` .. seealso:: :py:func:`crsDefinitionsChanged` %End void userCrsRemoved( long id ); %Docstring Emitted when the user CRS with matching ``id`` is removed from the database. .. seealso:: :py:func:`removeUserCrs` %End void crsDefinitionsChanged(); %Docstring Emitted whenever an operation has caused any of the known CRS definitions (including user-defined CRS) to change. %End }; /************************************************************************ * This file has been generated automatically from * * * * src/core/qgscoordinatereferencesystemregistry.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/