File: qgsgeometrytransformer.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (65 lines) | stat: -rw-r--r-- 2,343 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/geometry/qgsgeometrytransformer.h                           *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsAbstractGeometryTransformer
{
%Docstring(signature="appended")
An abstract base class for classes which transform geometries by
transforming input points to output points.

.. versionadded:: 3.18
%End

%TypeHeaderCode
#include "qgsgeometrytransformer.h"
%End
  public:

    virtual ~QgsAbstractGeometryTransformer();

    virtual bool transformPoint( double &x /In,Out/, double &y /In,Out/, double &z /In,Out/, double &m  /In,Out/ ) = 0;
%Docstring
Transforms the point defined by the coordinates (``x``, ``y``, ``z``)
and the specified ``m`` value.

:param x: point x coordinate
:param y: point y coordinate
:param z: point z coordinate, or NaN if the input point is 2D only
:param m: point m value, or NaN if not available

:return: ``True`` if point was transformed (or no transformation was
         required), or ``False`` if point could not be transformed
         successfully.

Example
-------------------------------------

A transformer which multiples the x coordinate by 3 and adds 10 to the y
coordinate:

.. code-block:: python

       class MyTransformer(QgsAbstractGeometryTransformer):

         def transformPoint(self, x, y, z, m):
           # returns a tuple of True to indicate success, then the modified x/y/z/m values
           return True, x*3, y+10, z, m
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/geometry/qgsgeometrytransformer.h                           *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/