File: qgsarcgisrestutils.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 (235 lines) | stat: -rw-r--r-- 7,113 bytes parent folder | download | duplicates (5)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/providers/arcgis/qgsarcgisrestutils.h                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsArcGisRestContext
{
%Docstring(signature="appended")
Contains the context of a ArcGIS REST service operation.

.. seealso:: :py:class:`QgsArcGisRestUtils`

.. versionadded:: 3.28
%End

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

    void setTimeZone( const QTimeZone &zone );
%Docstring
Sets the time ``zone`` for datetime values.

.. seealso:: :py:func:`timeZone`
%End

    QTimeZone timeZone() const;
%Docstring
Returns the time zone for datetime values.

.. seealso:: :py:func:`setTimeZone`
%End

    void setObjectIdFieldName( const QString &name );
%Docstring
Sets the name of the objectId field.

.. seealso:: :py:func:`objectIdFieldName`
%End

    QString objectIdFieldName() const;
%Docstring
Returns the name of the objectId field.

.. seealso:: :py:func:`setObjectIdFieldName`
%End

};

class QgsArcGisRestUtils
{
%Docstring(signature="appended")
Utility functions for working with ArcGIS REST services.

.. seealso:: :py:class:`QgsArcGisPortalUtils`

.. versionadded:: 3.18
%End

%TypeHeaderCode
#include "qgsarcgisrestutils.h"
%End
  public:
    static const QMetaObject staticMetaObject;

  public:

    static QMetaType::Type convertFieldType( const QString &type );
%Docstring
Converts an ESRI REST field ``type`` to a QVariant type.
%End

    static Qgis::WkbType convertGeometryType( const QString &type );
%Docstring
Converts an ESRI REST geometry ``type`` to a WKB type.
%End

    static QgsAbstractGeometry *convertGeometry( const QVariantMap &geometry, const QString &esriGeometryType, bool hasM, bool hasZ, QgsCoordinateReferenceSystem *crs /Out/ = 0 ) /Factory/;
%Docstring
Converts an ESRI REST ``geometry`` JSON definition to a
:py:class:`QgsAbstractGeometry`.

Caller takes ownership of the returned object.

:param geometry: JSON geometry definition
:param esriGeometryType: ESRI geometry type string
:param hasM: set to ``True`` to if geometry includes M values
:param hasZ: set to ``True`` to if geometry includes Z values

:return: - converted geometry
         - crs: the parsed geometry CRS
%End

    static QgsCoordinateReferenceSystem convertSpatialReference( const QVariantMap &spatialReferenceMap );
%Docstring
Converts a spatial reference JSON definition to a
:py:class:`QgsCoordinateReferenceSystem` value.
%End

    static QgsSymbol *convertSymbol( const QVariantMap &definition ) /Factory/;
%Docstring
Converts a symbol JSON ``definition`` to a :py:class:`QgsSymbol`.

Caller takes ownership of the returned symbol.
%End

    static QgsFeatureRenderer *convertRenderer( const QVariantMap &rendererData ) /Factory/;
%Docstring
Converts renderer JSON ``data`` to an equivalent
:py:class:`QgsFeatureRenderer`.

Caller takes ownership of the returned renderer.
%End

    static QgsAbstractVectorLayerLabeling *convertLabeling( const QVariantList &data ) /Factory/;
%Docstring
Converts labeling JSON ``data`` to an equivalent QGIS vector labeling.

Caller takes ownership of the returned object.
%End

    static QString convertLabelingExpression( const QString &string );
%Docstring
Converts an ESRI labeling expression to a QGIS expression string.
%End

    static QColor convertColor( const QVariant &data );
%Docstring
Converts ESRI JSON color data to a QColor object.
%End

    static Qt::PenStyle convertLineStyle( const QString &style );
%Docstring
Converts an ESRI line ``style`` to a Qt pen style.
%End

    static Qt::BrushStyle convertFillStyle( const QString &style );
%Docstring
Converts an ESRI fill ``style`` to a Qt brush style.
%End

    static QDateTime convertDateTime( const QVariant &value );
%Docstring
Converts a date time ``value`` to a QDateTime.
%End

    static QVariantMap geometryToJson( const QgsGeometry &geometry, const QgsArcGisRestContext &context, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
%Docstring
Converts a ``geometry`` to an ArcGIS REST JSON representation.

Returns an empty map if the geometry cannot be converted.

.. versionadded:: 3.28
%End

    static QVariantMap crsToJson( const QgsCoordinateReferenceSystem &crs );
%Docstring
Converts a ``crs`` to an ArcGIS REST JSON representation.

Returns an empty map if the ``crs`` is not valid.

.. versionadded:: 3.28
%End

    static QgsRectangle convertRectangle( const QVariant &value );
%Docstring
Converts a rectangle ``value`` to a :py:class:`QgsRectangle`.

Returns a null rectangle if the value cannot be converted.

.. versionadded:: 3.34
%End

    enum class FeatureToJsonFlag /BaseType=IntFlag/
    {
      IncludeGeometry,
      IncludeNonObjectIdAttributes,
      SkipUnsetAttributes,
    };

    typedef QFlags<QgsArcGisRestUtils::FeatureToJsonFlag> FeatureToJsonFlags;


    static QVariantMap featureToJson( const QgsFeature &feature,
                                      const QgsArcGisRestContext &context,
                                      const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(),
                                      QgsArcGisRestUtils::FeatureToJsonFlags flags = QgsArcGisRestUtils::FeatureToJsonFlags( static_cast< int >( QgsArcGisRestUtils::FeatureToJsonFlag::IncludeGeometry ) | static_cast< int >( QgsArcGisRestUtils::FeatureToJsonFlag::IncludeNonObjectIdAttributes ) ) );
%Docstring
Converts a ``feature`` to an ArcGIS REST JSON representation.

.. versionadded:: 3.28
%End

    static QVariant variantToAttributeValue( const QVariant &variant, QMetaType::Type expectedType, const QgsArcGisRestContext &context );
%Docstring
Converts a variant to a REST attribute value.

.. versionadded:: 3.28
%End

    static QVariantMap fieldDefinitionToJson( const QgsField &field );
%Docstring
Converts a ``field``'s definition to an ArcGIS REST JSON representation.

.. versionadded:: 3.28
%End

    static Qgis::ArcGisRestServiceType serviceTypeFromString( const QString &type );
%Docstring
Converts a string value to a REST service type.

.. versionadded:: 3.28
%End

};

QFlags<QgsArcGisRestUtils::FeatureToJsonFlag> operator|(QgsArcGisRestUtils::FeatureToJsonFlag f1, QFlags<QgsArcGisRestUtils::FeatureToJsonFlag> f2);


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