QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
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... | |
typedef QFlags< FeatureToJsonFlag > | FeatureToJsonFlags |
Flags which control the behavior of converting features to JSON. | |
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. | |
static QDateTime | convertDateTime (const QVariant &value) |
Converts a date time value to a QDateTime. | |
static QMetaType::Type | convertFieldType (const QString &type) |
Converts an ESRI REST field type to a QVariant type. | |
static Qt::BrushStyle | convertFillStyle (const QString &style) |
Converts an ESRI fill style to a Qt brush style. | |
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. | |
static Qgis::WkbType | convertGeometryType (const QString &type) |
Converts an ESRI REST geometry type to a WKB type. | |
static QgsAbstractVectorLayerLabeling * | convertLabeling (const QVariantList &data) |
Converts labeling JSON data to an equivalent QGIS vector labeling. | |
static QString | convertLabelingExpression (const QString &string) |
Converts an ESRI labeling expression to a QGIS expression string. | |
static Qt::PenStyle | convertLineStyle (const QString &style) |
Converts an ESRI line style to a Qt pen style. | |
static QgsRectangle | convertRectangle (const QVariant &value) |
Converts a rectangle value to a QgsRectangle. | |
static QgsFeatureRenderer * | convertRenderer (const QVariantMap &rendererData) |
Converts renderer JSON data to an equivalent QgsFeatureRenderer. | |
static QgsCoordinateReferenceSystem | convertSpatialReference (const QVariantMap &spatialReferenceMap) |
Converts a spatial reference JSON definition to a QgsCoordinateReferenceSystem value. | |
static QgsSymbol * | convertSymbol (const QVariantMap &definition) |
Converts a symbol JSON definition to a QgsSymbol. | |
static QVariantMap | crsToJson (const QgsCoordinateReferenceSystem &crs) |
Converts a crs to an ArcGIS REST JSON representation. | |
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))) |
Converts a feature to an ArcGIS REST JSON representation. | |
static QVariantMap | fieldDefinitionToJson (const QgsField &field) |
Converts a field's definition to an ArcGIS REST JSON representation. | |
static QVariantMap | geometryToJson (const QgsGeometry &geometry, const QgsArcGisRestContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) |
Converts a geometry to an ArcGIS REST JSON representation. | |
static Qgis::ArcGisRestServiceType | serviceTypeFromString (const QString &type) |
Converts a string value to a REST service type. | |
static QVariant | variantToAttributeValue (const QVariant &variant, QMetaType::Type expectedType, const QgsArcGisRestContext &context) |
Converts a variant to a REST attribute value. | |
Friends | |
class | TestQgsArcGisRestUtils |
Utility functions for working with ArcGIS REST services.
Definition at line 114 of file qgsarcgisrestutils.h.
typedef QFlags< FeatureToJsonFlag > QgsArcGisRestUtils::FeatureToJsonFlags |
Flags which control the behavior of converting features to JSON.
Definition at line 240 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 228 of file qgsarcgisrestutils.h.
|
static |
Converts ESRI JSON color data to a QColor object.
Definition at line 1222 of file qgsarcgisrestutils.cpp.
|
static |
Converts a date time value to a QDateTime.
Definition at line 1275 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI REST field type to a QVariant type.
Definition at line 58 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI fill style to a Qt brush style.
Definition at line 1253 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 473 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI REST geometry type to a WKB type.
Definition at line 89 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 836 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI labeling expression to a QGIS expression string.
Definition at line 1198 of file qgsarcgisrestutils.cpp.
|
static |
Converts an ESRI line style to a Qt pen style.
Definition at line 1235 of file qgsarcgisrestutils.cpp.
|
static |
Converts a rectangle value to a QgsRectangle.
Returns a null rectangle if the value cannot be converted.
Definition at line 1290 of file qgsarcgisrestutils.cpp.
|
static |
Converts renderer JSON data to an equivalent QgsFeatureRenderer.
Caller takes ownership of the returned renderer.
Definition at line 971 of file qgsarcgisrestutils.cpp.
|
static |
Converts a spatial reference JSON definition to a QgsCoordinateReferenceSystem value.
Definition at line 512 of file qgsarcgisrestutils.cpp.
|
static |
Converts a symbol JSON definition to a QgsSymbol.
Caller takes ownership of the returned symbol.
Definition at line 546 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 1791 of file qgsarcgisrestutils.cpp.
|
static |
Converts a feature to an ArcGIS REST JSON representation.
Definition at line 1821 of file qgsarcgisrestutils.cpp.
|
static |
Converts a field's definition to an ArcGIS REST JSON representation.
Definition at line 1881 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 1317 of file qgsarcgisrestutils.cpp.
QgsArcGisRestUtils::Q_ENUM | ( | FeatureToJsonFlag | ) |
|
static |
Converts a string value to a REST service type.
Definition at line 1934 of file qgsarcgisrestutils.cpp.
|
static |
Converts a variant to a REST attribute value.
Definition at line 1843 of file qgsarcgisrestutils.cpp.
|
friend |
Definition at line 342 of file qgsarcgisrestutils.h.