15#ifndef QGSARCGISRESTUTILS_H
16#define QGSARCGISRESTUTILS_H
75 void setTimeZone(
const QTimeZone &zone ) { mTimeZone = zone; }
82 QTimeZone
timeZone()
const {
return mTimeZone; }
102 QString mObjectIdFieldName;
123 static QVariant::Type convertFieldType(
const QString &type );
128 static Qgis::WkbType convertGeometryType(
const QString &type );
174 static QString convertLabelingExpression(
const QString &
string );
179 static QColor convertColor(
const QVariant &data );
184 static Qt::PenStyle convertLineStyle(
const QString &style );
189 static Qt::BrushStyle convertFillStyle(
const QString &style );
194 static QDateTime convertDateTime(
const QVariant &value );
221 IncludeGeometry = 1 << 0,
222 IncludeNonObjectIdAttributes = 1 << 1,
232 Q_FLAG( FeatureToJsonFlags )
239 static QVariantMap featureToJson(
const QgsFeature &feature,
249 static QVariant variantToAttributeValue(
const QVariant &variant, QVariant::Type expectedType,
const QgsArcGisRestContext &context );
256 static QVariantMap fieldDefinitionToJson(
const QgsField &
field );
270 static std::unique_ptr< QgsPoint > convertPoint(
const QVariantList &list,
Qgis::WkbType type );
277 static std::unique_ptr< QgsCircularString > convertCircularString(
const QVariantMap &data,
Qgis::WkbType type,
const QgsPoint &startPoint );
282 static std::unique_ptr< QgsCompoundCurve > convertCompoundCurve(
const QVariantList &list,
Qgis::WkbType type );
287 static std::unique_ptr< QgsPoint > convertGeometryPoint(
const QVariantMap &data,
Qgis::WkbType pointType );
292 static std::unique_ptr< QgsMultiPoint > convertMultiPoint(
const QVariantMap &geometryData,
Qgis::WkbType pointType );
297 static std::unique_ptr< QgsMultiCurve > convertGeometryPolyline(
const QVariantMap &data,
Qgis::WkbType pointType );
302 static std::unique_ptr< QgsMultiSurface > convertGeometryPolygon(
const QVariantMap &data,
Qgis::WkbType pointType );
307 static std::unique_ptr< QgsPolygon > convertEnvelope(
const QVariantMap &data );
309 static std::unique_ptr< QgsLineSymbol > parseEsriLineSymbolJson(
const QVariantMap &symbolData );
310 static std::unique_ptr< QgsFillSymbol > parseEsriFillSymbolJson(
const QVariantMap &symbolData );
311 static std::unique_ptr< QgsFillSymbol > parseEsriPictureFillSymbolJson(
const QVariantMap &symbolData );
312 static std::unique_ptr< QgsMarkerSymbol > parseEsriMarkerSymbolJson(
const QVariantMap &symbolData );
313 static std::unique_ptr< QgsMarkerSymbol > parseEsriPictureMarkerSymbolJson(
const QVariantMap &symbolData );
317 static QVariantMap pointToJson(
const QgsPoint *point );
318 static QVariantMap multiPointToJson(
const QgsMultiPoint *multiPoint );
319 static QVariantList lineStringToJsonPath(
const QgsLineString *line );
320 static QVariantList curveToJsonCurve(
const QgsCurve *curve,
bool includeStart );
321 static QVariantMap lineStringToJson(
const QgsLineString *line );
322 static QVariantMap curveToJson(
const QgsCurve *curve );
324 static QVariantMap multiCurveToJson(
const QgsMultiCurve *multiCurve );
325 static QVariantList polygonToJsonRings(
const QgsPolygon *polygon );
326 static QVariantList curvePolygonToJsonRings(
const QgsCurvePolygon *polygon );
327 static QVariantMap polygonToJson(
const QgsPolygon *polygon );
328 static QVariantMap curvePolygonToJson(
const QgsCurvePolygon *polygon );
329 static QVariantMap multiPolygonToJson(
const QgsMultiPolygon *polygon );
330 static QVariantMap multiSurfaceToJson(
const QgsMultiSurface *multiSurface );
332 friend class TestQgsArcGisRestUtils;
ArcGisRestServiceType
Available ArcGIS REST service types.
MarkerShape
Marker shapes.
WkbType
The WKB type describes the number of dimensions a geometry has.
Abstract base class for all geometries.
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
Contains the context of a ArcGIS REST service operation.
void setTimeZone(const QTimeZone &zone)
Sets the time zone for datetime values.
QTimeZone timeZone() const
Returns the time zone for datetime values.
QString objectIdFieldName() const
Returns the name of the objectId field.
void setObjectIdFieldName(const QString &name)
Sets the name of the objectId field.
Utility functions for working with ArcGIS REST services.
Q_ENUM(FeatureToJsonFlag)
FeatureToJsonFlag
Flags which control the behavior of converting features to JSON.
@ IncludeGeometry
Whether to include the geometry definition.
@ IncludeNonObjectIdAttributes
Whether to include any non-objectId attributes.
Circular string geometry type.
Compound curve geometry type.
This class represents a coordinate reference system (CRS).
Curve polygon geometry type.
Abstract base class for curved geometry type.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Encapsulate a field in an attribute table or data source.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A geometry is the spatial representation of a feature.
Line string geometry type, with support for z-dimension and m-values.
A line symbol type, for rendering LineString and MultiLineString geometries.
A marker symbol type, for rendering Point and MultiPoint geometries.
Multi curve geometry collection.
Multi line string geometry collection.
Multi point geometry collection.
Multi polygon geometry collection.
Multi surface geometry collection.
network access manager for QGIS
Point geometry type, with support for z-dimension and m-values.
Abstract base class for all rendered symbols.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
const QgsCoordinateReferenceSystem & crs