QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
Utility functions for working with ArcGIS REST services. More...
#include <qgsarcgisrestutils.h>
Public Types | |
enum class | FeatureToJsonFlag : int { IncludeGeometry = 1 << 0 , IncludeNonObjectIdAttributes = 1 << 1 } |
Flags which control the behavior of converting features to JSON. More... | |
Public Member Functions | |
Q_ENUM (FeatureToJsonFlag) | |
Static Public Member Functions | |
static QColor | convertColor (const QVariant &data) |
Converts ESRI JSON color data to a QColor object. More... | |
static QDateTime | convertDateTime (const QVariant &value) |
Converts a date time value to a QDateTime. More... | |
static QVariant::Type | convertFieldType (const QString &type) |
Converts an ESRI REST field type to a QVariant type. More... | |
static Qt::BrushStyle | convertFillStyle (const QString &style) |
Converts an ESRI fill style to a Qt brush style. More... | |
static QgsAbstractGeometry * | convertGeometry (const QVariantMap &geometry, const QString &esriGeometryType, bool hasM, bool hasZ, QgsCoordinateReferenceSystem *crs=nullptr) |
Converts an ESRI REST geometry JSON definition to a QgsAbstractGeometry. More... | |
static Qgis::WkbType | convertGeometryType (const QString &type) |
Converts an ESRI REST geometry type to a WKB type. More... | |
static QgsAbstractVectorLayerLabeling * | convertLabeling (const QVariantList &data) |
Converts labeling JSON data to an equivalent QGIS vector labeling. More... | |
static QString | convertLabelingExpression (const QString &string) |
Converts an ESRI labeling expression to a QGIS expression string. More... | |
static Qt::PenStyle | convertLineStyle (const QString &style) |
Converts an ESRI line style to a Qt pen style. More... | |
static QgsFeatureRenderer * | convertRenderer (const QVariantMap &rendererData) |
Converts renderer JSON data to an equivalent QgsFeatureRenderer. More... | |
static QgsCoordinateReferenceSystem | convertSpatialReference (const QVariantMap &spatialReferenceMap) |
Converts a spatial reference JSON definition to a QgsCoordinateReferenceSystem value. More... | |
static QgsSymbol * | convertSymbol (const QVariantMap &definition) |
Converts a symbol JSON definition to a QgsSymbol. More... | |
static QVariantMap | crsToJson (const QgsCoordinateReferenceSystem &crs) |
Converts a crs to an ArcGIS REST JSON representation. More... | |
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))) |
Flags which control the behavior of converting features to JSON. More... | |
static QVariantMap | fieldDefinitionToJson (const QgsField &field) |
Converts a field's definition to an ArcGIS REST JSON representation. More... | |
static QVariantMap | geometryToJson (const QgsGeometry &geometry, const QgsArcGisRestContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) |
Converts a geometry to an ArcGIS REST JSON representation. More... | |
static Qgis::ArcGisRestServiceType | serviceTypeFromString (const QString &type) |
Converts a string value to a REST service type. More... | |
static QVariant | variantToAttributeValue (const QVariant &variant, QVariant::Type expectedType, const QgsArcGisRestContext &context) |
Converts a variant to a REST attribute value. More... | |
Friends | |
class | TestQgsArcGisRestUtils |
Utility functions for working with ArcGIS REST services.
Definition at line 114 of file qgsarcgisrestutils.h.
|
strong |
Flags which control the behavior of converting features to JSON.
Enumerator | |
---|---|
IncludeGeometry | Whether to include the geometry definition. |
IncludeNonObjectIdAttributes | Whether to include any non-objectId attributes. |
Definition at line 219 of file qgsarcgisrestutils.h.
|
static |
Converts ESRI JSON color data to a QColor object.
Definition at line 988 of file qgsarcgisrestutils.cpp.
|
static |
Converts a date time value to a QDateTime.
Definition at line 1041 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI REST field type to a QVariant type.
Definition at line 49 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI fill style to a Qt brush style.
Definition at line 1019 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI REST geometry JSON definition to a QgsAbstractGeometry.
Caller takes ownership of the returned object.
geometry | JSON geometry definition |
esriGeometryType | ESRI geometry type string |
hasM | set to true to if geometry includes M values |
hasZ | set to true to if geometry includes Z values |
crs | if specified will be set to the parsed geometry CRS |
Definition at line 464 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI REST geometry type to a WKB type.
Definition at line 80 of file qgsarcgisrestutils.cpp.
|
static |
Converts labeling JSON data to an equivalent QGIS vector labeling.
Caller takes ownership of the returned object.
Definition at line 751 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI labeling expression to a QGIS expression string.
Definition at line 964 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI line style to a Qt pen style.
Definition at line 1001 of file qgsarcgisrestutils.cpp.
|
static |
Converts renderer JSON data to an equivalent QgsFeatureRenderer.
Caller takes ownership of the returned renderer.
Definition at line 886 of file qgsarcgisrestutils.cpp.
|
static |
Converts a spatial reference JSON definition to a QgsCoordinateReferenceSystem value.
Definition at line 503 of file qgsarcgisrestutils.cpp.
|
static |
Converts a symbol JSON definition to a QgsSymbol.
Caller takes ownership of the returned symbol.
Definition at line 537 of file qgsarcgisrestutils.cpp.
|
static |
Converts a crs to an ArcGIS REST JSON representation.
Returns an empty map if the crs is not valid.
Definition at line 1522 of file qgsarcgisrestutils.cpp.
|
static |
Flags which control the behavior of converting features to JSON.
Definition at line 1552 of file qgsarcgisrestutils.cpp.
|
static |
Converts a field's definition to an ArcGIS REST JSON representation.
Definition at line 1609 of file qgsarcgisrestutils.cpp.
|
static |
Converts a geometry to an ArcGIS REST JSON representation.
Returns an empty map if the geometry cannot be converted.
Definition at line 1056 of file qgsarcgisrestutils.cpp.
QgsArcGisRestUtils::Q_ENUM | ( | FeatureToJsonFlag | ) |
|
static |
Converts a string value to a REST service type.
Definition at line 1662 of file qgsarcgisrestutils.cpp.
|
static |
Converts a variant to a REST attribute value.
Definition at line 1574 of file qgsarcgisrestutils.cpp.
|
friend |
Definition at line 332 of file qgsarcgisrestutils.h.