mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Sipify
This commit is contained in:
parent
b2872194df
commit
13d1786265
@ -55,7 +55,7 @@ Default constructor, creates an invalid QgsCoordinateTransform.
|
|||||||
|
|
||||||
The ``context`` argument specifies the context under which the transform
|
The ``context`` argument specifies the context under which the transform
|
||||||
will be applied, and is used for calculating necessary datum transforms
|
will be applied, and is used for calculating necessary datum transforms
|
||||||
to utilise.
|
to utilize.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
%End
|
%End
|
||||||
@ -68,9 +68,21 @@ Default constructor, creates an invalid QgsCoordinateTransform.
|
|||||||
to ``destination`` coordinate reference system, when used with the
|
to ``destination`` coordinate reference system, when used with the
|
||||||
given ``project``.
|
given ``project``.
|
||||||
|
|
||||||
No reference to ``project`` is stored or utilised outside of the constructor,
|
No reference to ``project`` is stored or utilized outside of the constructor,
|
||||||
and it is used to retrieve the project's transform context only.
|
and it is used to retrieve the project's transform context only.
|
||||||
|
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
%End
|
||||||
|
|
||||||
|
explicit QgsCoordinateTransform( const QgsCoordinateReferenceSystem &source,
|
||||||
|
const QgsCoordinateReferenceSystem &destination,
|
||||||
|
int sourceDatumTransformId,
|
||||||
|
int destinationDatumTransformId );
|
||||||
|
%Docstring
|
||||||
|
Constructs a QgsCoordinateTransform to transform from the ``source``
|
||||||
|
to ``destination`` coordinate reference system, with the specified
|
||||||
|
datum transforms.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -226,91 +238,176 @@ Default constructor, creates an invalid QgsCoordinateTransform.
|
|||||||
:rtype: bool
|
:rtype: bool
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
struct TransformPair
|
||||||
|
{
|
||||||
|
|
||||||
static QString datumTransformString( int datumTransform );
|
TransformPair( int sourceTransformId = -1, int destinationTransformId = -1 );
|
||||||
%Docstring
|
%Docstring
|
||||||
|
Constructor for a TransformPair with the specified ``sourceTransformId``
|
||||||
|
and ``destinationTransformId`` transforms.
|
||||||
|
%End
|
||||||
|
|
||||||
|
int sourceTransformId;
|
||||||
|
%Docstring
|
||||||
|
ID for the datum transform to use when projecting from the source CRS.
|
||||||
|
.. seealso:: :py:func:`QgsCoordinateTransform.datumTransformCrsInfo()`
|
||||||
|
%End
|
||||||
|
|
||||||
|
int destinationTransformId;
|
||||||
|
%Docstring
|
||||||
|
ID for the datum transform to use when projecting to the destination CRS.
|
||||||
|
.. seealso:: :py:func:`QgsCoordinateTransform.datumTransformCrsInfo()`
|
||||||
|
%End
|
||||||
|
|
||||||
|
bool operator==( const QgsCoordinateTransform::TransformPair &other ) const;
|
||||||
|
|
||||||
|
bool operator!=( const QgsCoordinateTransform::TransformPair &other ) const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static QList< QgsCoordinateTransform::TransformPair > datumTransformations( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination );
|
||||||
|
%Docstring
|
||||||
|
Returns a list of datum transformations which are available for the given ``source`` and ``destination`` CRS.
|
||||||
|
.. seealso:: :py:func:`datumTransformToProj()`
|
||||||
|
.. seealso:: :py:func:`datumTransformInfo()`
|
||||||
|
:rtype: list of QgsCoordinateTransform.TransformPair
|
||||||
|
%End
|
||||||
|
|
||||||
|
static QString datumTransformToProj( int datumTransformId );
|
||||||
|
%Docstring
|
||||||
|
Returns a proj string representing the specified ``datumTransformId`` datum transform ID.
|
||||||
|
.. seealso:: :py:func:`datumTransformations()`
|
||||||
|
.. seealso:: :py:func:`datumTransformInfo()`
|
||||||
:rtype: str
|
:rtype: str
|
||||||
%End
|
%End
|
||||||
|
|
||||||
static bool datumTransformCrsInfo( int datumTransform, int &epsgNr, QString &srcProjection, QString &dstProjection, QString &remarks, QString &scope, bool &preferred, bool &deprecated );
|
struct TransformInfo
|
||||||
|
{
|
||||||
|
int datumTransformId;
|
||||||
%Docstring
|
%Docstring
|
||||||
Gets name of source and dest geographical CRS (to show in a tooltip)
|
Datum transform ID
|
||||||
:return: epsgNr epsg code of the transformation (or 0 if not in epsg db)*
|
|
||||||
:rtype: bool
|
|
||||||
%End
|
%End
|
||||||
|
|
||||||
int sourceDatumTransform() const;
|
int epsgCode;
|
||||||
%Docstring
|
%Docstring
|
||||||
Returns the index of the datum transform to use when projecting from the source
|
EPSG code for the transform, or 0 if not found in EPSG database
|
||||||
|
%End
|
||||||
|
|
||||||
|
QString sourceCrsAuthId;
|
||||||
|
%Docstring
|
||||||
|
Source CRS auth ID
|
||||||
|
%End
|
||||||
|
|
||||||
|
QString destinationCrsAuthId;
|
||||||
|
%Docstring
|
||||||
|
Destination CRS auth ID
|
||||||
|
%End
|
||||||
|
|
||||||
|
QString sourceCrsDescription;
|
||||||
|
%Docstring
|
||||||
|
Source CRS description
|
||||||
|
%End
|
||||||
|
|
||||||
|
QString destinationCrsDescription;
|
||||||
|
%Docstring
|
||||||
|
Destination CRS description
|
||||||
|
%End
|
||||||
|
|
||||||
|
QString remarks;
|
||||||
|
%Docstring
|
||||||
|
Transform remarks
|
||||||
|
%End
|
||||||
|
|
||||||
|
QString scope;
|
||||||
|
%Docstring
|
||||||
|
Scope of transform
|
||||||
|
%End
|
||||||
|
|
||||||
|
bool preferred;
|
||||||
|
%Docstring
|
||||||
|
True if transform is the preferred transform to use for the source/destination CRS combination
|
||||||
|
%End
|
||||||
|
|
||||||
|
bool deprecated;
|
||||||
|
%Docstring
|
||||||
|
True if transform is deprecated
|
||||||
|
%End
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static QgsCoordinateTransform::TransformInfo datumTransformInfo( int datumTransformId );
|
||||||
|
%Docstring
|
||||||
|
Returns detailed information about the specified ``datumTransformId``.
|
||||||
|
If ``datumTransformId`` was not a valid transform ID, a TransformInfo with TransformInfo.datumTransformId of
|
||||||
|
-1 will be returned.
|
||||||
|
.. seealso:: :py:func:`datumTransformations()`
|
||||||
|
.. seealso:: :py:func:`datumTransformToProj()`
|
||||||
|
:rtype: QgsCoordinateTransform.TransformInfo
|
||||||
|
%End
|
||||||
|
|
||||||
|
int sourceDatumTransformId() const;
|
||||||
|
%Docstring
|
||||||
|
Returns the ID of the datum transform to use when projecting from the source
|
||||||
CRS.
|
CRS.
|
||||||
|
|
||||||
This is usually calculated automatically from the transform's QgsCoordinateTransformContext,
|
This is usually calculated automatically from the transform's QgsCoordinateTransformContext,
|
||||||
but can be manually overwritten by a call to setSourceDatumTransform().
|
but can be manually overwritten by a call to setSourceDatumTransformId().
|
||||||
|
|
||||||
.. seealso:: setSourceDatumTransform()
|
.. seealso:: :py:func:`setSourceDatumTransformId()`
|
||||||
.. seealso:: destinationDatumTransform()
|
.. seealso:: :py:func:`destinationDatumTransformId()`
|
||||||
|
.. seealso:: :py:func:`datumTransformInfo()`
|
||||||
:rtype: int
|
:rtype: int
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void setSourceDatumTransform( int datum );
|
void setSourceDatumTransformId( int datumId );
|
||||||
%Docstring
|
%Docstring
|
||||||
Sets the index of the ``datum`` transform to use when projecting from the source
|
Sets the ``datumId`` ID of the datum transform to use when projecting from the source
|
||||||
CRS.
|
CRS.
|
||||||
|
|
||||||
This is usually calculated automatically from the transform's QgsCoordinateTransformContext.
|
This is usually calculated automatically from the transform's QgsCoordinateTransformContext.
|
||||||
Calling this method will overwrite any automatically calculated datum transform.
|
Calling this method will overwrite any automatically calculated datum transform.
|
||||||
|
|
||||||
.. seealso:: sourceDatumTransform()
|
.. seealso:: :py:func:`sourceDatumTransformId()`
|
||||||
.. seealso:: setDestinationDatumTransform()
|
.. seealso:: :py:func:`setDestinationDatumTransformId()`
|
||||||
|
.. seealso:: :py:func:`datumTransformInfo()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
int destinationDatumTransform() const;
|
int destinationDatumTransformId() const;
|
||||||
%Docstring
|
%Docstring
|
||||||
Returns the index of the datum transform to use when projecting to the destination
|
Returns the ID of the datum transform to use when projecting to the destination
|
||||||
CRS.
|
CRS.
|
||||||
|
|
||||||
This is usually calculated automatically from the transform's QgsCoordinateTransformContext,
|
This is usually calculated automatically from the transform's QgsCoordinateTransformContext,
|
||||||
but can be manually overwritten by a call to setDestinationDatumTransform().
|
but can be manually overwritten by a call to setDestinationDatumTransformId().
|
||||||
|
|
||||||
.. seealso:: setDestinationDatumTransform()
|
.. seealso:: :py:func:`setDestinationDatumTransformId()`
|
||||||
.. seealso:: sourceDatumTransform()
|
.. seealso:: :py:func:`sourceDatumTransformId()`
|
||||||
|
.. seealso:: :py:func:`datumTransformInfo()`
|
||||||
:rtype: int
|
:rtype: int
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void setDestinationDatumTransform( int datum );
|
void setDestinationDatumTransformId( int datumId );
|
||||||
%Docstring
|
%Docstring
|
||||||
Sets the index of the ``datum`` transform to use when projecting to the destination
|
Sets the ``datumId`` ID of the datum transform to use when projecting to the destination
|
||||||
CRS.
|
CRS.
|
||||||
|
|
||||||
This is usually calculated automatically from the transform's QgsCoordinateTransformContext.
|
This is usually calculated automatically from the transform's QgsCoordinateTransformContext.
|
||||||
Calling this method will overwrite any automatically calculated datum transform.
|
Calling this method will overwrite any automatically calculated datum transform.
|
||||||
|
|
||||||
.. seealso:: destinationDatumTransform()
|
.. seealso:: :py:func:`destinationDatumTransformId()`
|
||||||
.. seealso:: setSourceDatumTransform()
|
.. seealso:: :py:func:`setSourceDatumTransformId()`
|
||||||
|
.. seealso:: :py:func:`datumTransformInfo()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void initialize();
|
static void invalidateCache();
|
||||||
%Docstring
|
%Docstring
|
||||||
initialize is used to actually create the Transformer instance
|
Clears the internal cache used to initialize QgsCoordinateTransform objects.
|
||||||
%End
|
This should be called whenever the srs database has
|
||||||
|
been modified in order to ensure that outdated CRS transforms are not created.
|
||||||
bool readXml( const QDomNode &node );
|
.. versionadded:: 3.0
|
||||||
%Docstring
|
|
||||||
Restores state from the given Dom node.
|
|
||||||
\param node The node from which state will be restored
|
|
||||||
:return: bool True on success, False on failure
|
|
||||||
.. seealso:: :py:func:`writeXml()`
|
|
||||||
:rtype: bool
|
|
||||||
%End
|
|
||||||
|
|
||||||
bool writeXml( QDomNode &node, QDomDocument &document ) const;
|
|
||||||
%Docstring
|
|
||||||
Stores state to the given Dom node in the given document
|
|
||||||
\param node The node in which state will be restored
|
|
||||||
\param document The document in which state will be stored
|
|
||||||
:return: bool True on success, False on failure
|
|
||||||
.. seealso:: :py:func:`readXml()`
|
|
||||||
:rtype: bool
|
|
||||||
%End
|
%End
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -76,7 +76,7 @@ class QgsCoordinateTransformContext
|
|||||||
to use for a coordinate transform. Instead, always use calculateDatumTransforms()
|
to use for a coordinate transform. Instead, always use calculateDatumTransforms()
|
||||||
to determine this.
|
to determine this.
|
||||||
|
|
||||||
.. seealso:: addSourceDestinationDatumTransform()
|
.. seealso:: :py:func:`addSourceDestinationDatumTransform()`
|
||||||
:rtype: QMap< QPair< str, QString>, QgsCoordinateTransform.TransformPair >
|
:rtype: QMap< QPair< str, QString>, QgsCoordinateTransform.TransformPair >
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -98,8 +98,8 @@ class QgsCoordinateTransformContext
|
|||||||
Transforms set using this method will override any specific source or destination
|
Transforms set using this method will override any specific source or destination
|
||||||
transforms set by addSourceDatumTransform() or addDestinationDatumTransform().
|
transforms set by addSourceDatumTransform() or addDestinationDatumTransform().
|
||||||
|
|
||||||
.. seealso:: sourceDestinationDatumTransforms()
|
.. seealso:: :py:func:`sourceDestinationDatumTransforms()`
|
||||||
.. seealso:: removeSourceDestinationDatumTransform()
|
.. seealso:: :py:func:`removeSourceDestinationDatumTransform()`
|
||||||
:rtype: bool
|
:rtype: bool
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ class QgsCoordinateTransformContext
|
|||||||
%Docstring
|
%Docstring
|
||||||
Removes the source to destination datum transform pair for the specified ``sourceCrs`` and
|
Removes the source to destination datum transform pair for the specified ``sourceCrs`` and
|
||||||
``destinationCrs``.
|
``destinationCrs``.
|
||||||
.. seealso:: addSourceDestinationDatumTransform()
|
.. seealso:: :py:func:`addSourceDestinationDatumTransform()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
bool hasTransform( const QgsCoordinateReferenceSystem &source,
|
bool hasTransform( const QgsCoordinateReferenceSystem &source,
|
||||||
@ -140,26 +140,26 @@ class QgsCoordinateTransformContext
|
|||||||
void readXml( const QDomElement &element, const QgsReadWriteContext &context );
|
void readXml( const QDomElement &element, const QgsReadWriteContext &context );
|
||||||
%Docstring
|
%Docstring
|
||||||
Reads the context's state from a DOM ``element``.
|
Reads the context's state from a DOM ``element``.
|
||||||
.. seealso:: writeXml()
|
.. seealso:: :py:func:`writeXml()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const;
|
void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const;
|
||||||
%Docstring
|
%Docstring
|
||||||
Writes the context's state to a DOM ``element``.
|
Writes the context's state to a DOM ``element``.
|
||||||
.. seealso:: readXml()
|
.. seealso:: :py:func:`readXml()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
|
||||||
void readSettings();
|
void readSettings();
|
||||||
%Docstring
|
%Docstring
|
||||||
Reads the context's state from application settings.
|
Reads the context's state from application settings.
|
||||||
.. seealso:: readSettings()
|
.. seealso:: :py:func:`readSettings()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void writeSettings();
|
void writeSettings();
|
||||||
%Docstring
|
%Docstring
|
||||||
Write the context's state to application settings.
|
Write the context's state to application settings.
|
||||||
.. seealso:: writeSettings()
|
.. seealso:: :py:func:`writeSettings()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ Return the distance in geographical coordinates that equals to one pixel in the
|
|||||||
from a source to destination coordinate reference system.
|
from a source to destination coordinate reference system.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: setTransformContext()
|
.. seealso:: :py:func:`setTransformContext()`
|
||||||
:rtype: QgsCoordinateTransformContext
|
:rtype: QgsCoordinateTransformContext
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ Return the distance in geographical coordinates that equals to one pixel in the
|
|||||||
from a source to destination coordinate reference system.
|
from a source to destination coordinate reference system.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: transformContext()
|
.. seealso:: :py:func:`transformContext()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
const QgsMapToPixel &mapToPixel() const;
|
const QgsMapToPixel &mapToPixel() const;
|
||||||
|
@ -135,8 +135,8 @@ Returns the QgsProject singleton instance
|
|||||||
from a source to destination coordinate reference system.
|
from a source to destination coordinate reference system.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: setTransformContext()
|
.. seealso:: :py:func:`setTransformContext()`
|
||||||
.. seealso:: transformContextChanged()
|
.. seealso:: :py:func:`transformContextChanged()`
|
||||||
:rtype: QgsCoordinateTransformContext
|
:rtype: QgsCoordinateTransformContext
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -147,8 +147,8 @@ Returns the QgsProject singleton instance
|
|||||||
from a source to destination coordinate reference system.
|
from a source to destination coordinate reference system.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: transformContext()
|
.. seealso:: :py:func:`transformContext()`
|
||||||
.. seealso:: transformContextChanged()
|
.. seealso:: :py:func:`transformContextChanged()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
@ -942,7 +942,7 @@ emitted whenever the configuration for snapping has changed
|
|||||||
Emitted when the project transformContext() is changed.
|
Emitted when the project transformContext() is changed.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: transformContext()
|
.. seealso:: :py:func:`transformContext()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
void transactionGroupsChanged();
|
void transactionGroupsChanged();
|
||||||
|
@ -117,7 +117,7 @@ class QgsRenderContext
|
|||||||
from a source to destination coordinate reference system.
|
from a source to destination coordinate reference system.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: setTransformContext()
|
.. seealso:: :py:func:`setTransformContext()`
|
||||||
:rtype: QgsCoordinateTransformContext
|
:rtype: QgsCoordinateTransformContext
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ class QgsRenderContext
|
|||||||
from a source to destination coordinate reference system.
|
from a source to destination coordinate reference system.
|
||||||
|
|
||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
.. seealso:: transformContext()
|
.. seealso:: :py:func:`transformContext()`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
const QgsRectangle &extent() const;
|
const QgsRectangle &extent() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user