Class: QgsArcGisRestUtils

class qgis.core.QgsArcGisRestUtils

Bases: sip.wrapper

Utility functions for working with ArcGIS REST services.

Methods

convertColor

Converts ESRI JSON color data to a QColor object.

convertDateTime

Converts a date time value to a QDateTime.

convertFieldType

Converts an ESRI REST field type to a QVariant type.

convertFillStyle

Converts an ESRI fill style to a Qt brush style.

convertGeometry

Converts an ESRI REST geometry JSON definition to a QgsAbstractGeometry.

convertGeometryType

Converts an ESRI REST geometry type to a WKB type.

convertLabeling

Converts labeling JSON data to an equivalent QGIS vector labeling.

convertLabelingExpression

Converts an ESRI labeling expression to a QGIS expression string.

convertLineStyle

Converts an ESRI line style to a Qt pen style.

convertRenderer

Converts renderer JSON data to an equivalent QgsFeatureRenderer.

convertSpatialReference

Converts a spatial reference JSON definition to a QgsCoordinateReferenceSystem value.

convertSymbol

Converts a symbol JSON definition to a QgsSymbol.

convertColor(data: Any) → QColor

Converts ESRI JSON color data to a QColor object.

Parameters

data (Any) –

Return type

QColor

convertDateTime(value: Any) → QDateTime

Converts a date time value to a QDateTime.

Parameters

value (Any) –

Return type

QDateTime

convertFieldType(type: str) → QVariant.Type

Converts an ESRI REST field type to a QVariant type.

Parameters

type (str) –

Return type

QVariant.Type

convertFillStyle(style: str) → Qt.BrushStyle

Converts an ESRI fill style to a Qt brush style.

Parameters

style (str) –

Return type

Qt.BrushStyle

convertGeometry(geometry: Dict[str, Any], esriGeometryType: str, hasM: bool, hasZ: bool) → Tuple[QgsAbstractGeometry, QgsCoordinateReferenceSystem]

Converts an ESRI REST geometry JSON definition to a QgsAbstractGeometry.

Caller takes ownership of the returned object.

Parameters
  • geometry (Dict[str) – JSON geometry definition

  • esriGeometryType (str) – ESRI geometry type string

  • hasM (bool) – set to True to if geometry includes M values

  • hasZ (bool) – set to True to if geometry includes Z values

Return type

Tuple[QgsAbstractGeometry, QgsCoordinateReferenceSystem]

Returns

  • converted geometry

  • crs: will be set to the parsed geometry CRS

convertGeometryType(type: str)QgsWkbTypes.Type

Converts an ESRI REST geometry type to a WKB type.

Parameters

type (str) –

Return type

QgsWkbTypes.Type

convertLabeling(data: Iterable[Any])QgsAbstractVectorLayerLabeling

Converts labeling JSON data to an equivalent QGIS vector labeling.

Caller takes ownership of the returned object.

Parameters

data (Iterable[Any]) –

Return type

QgsAbstractVectorLayerLabeling

convertLabelingExpression(string: str) → str

Converts an ESRI labeling expression to a QGIS expression string.

Parameters

string (str) –

Return type

str

convertLineStyle(style: str) → Qt.PenStyle

Converts an ESRI line style to a Qt pen style.

Parameters

style (str) –

Return type

Qt.PenStyle

convertRenderer(rendererData: Dict[str, Any])QgsFeatureRenderer

Converts renderer JSON data to an equivalent QgsFeatureRenderer.

Caller takes ownership of the returned renderer.

Parameters

rendererData (Dict[str) –

Return type

QgsFeatureRenderer

convertSpatialReference(spatialReferenceMap: Dict[str, Any])QgsCoordinateReferenceSystem

Converts a spatial reference JSON definition to a QgsCoordinateReferenceSystem value.

Parameters

spatialReferenceMap (Dict[str) –

Return type

QgsCoordinateReferenceSystem

convertSymbol(definition: Dict[str, Any])QgsSymbol

Converts a symbol JSON definition to a QgsSymbol.

Caller takes ownership of the returned symbol.

Parameters

definition (Dict[str) –

Return type

QgsSymbol