|
| QgsJsonExporter (QgsVectorLayer *vectorLayer=nullptr, int precision=6) |
| Constructor for QgsJsonExporter. More...
|
|
bool | attributeDisplayName () const |
| Returns whether original names of attributes or aliases are printed. More...
|
|
QgsAttributeList | attributes () const |
| Returns the list of attributes which will be included in the JSON exports, or an empty list if all attributes will be included. More...
|
|
QgsAttributeList | excludedAttributes () const |
| Returns a list of attributes which will be specifically excluded from the JSON exports. More...
|
|
QString | exportFeature (const QgsFeature &feature, const QVariantMap &extraProperties=QVariantMap(), const QVariant &id=QVariant(), int indent=-1) const |
| Returns a GeoJSON string representation of a feature. More...
|
|
QString | exportFeatures (const QgsFeatureList &features, int indent=-1) const |
| Returns a GeoJSON string representation of a list of features (feature collection). More...
|
|
json | exportFeaturesToJsonObject (const QgsFeatureList &features) const |
| Returns a JSON object representation of a list of features (feature collection). More...
|
|
json | exportFeatureToJsonObject (const QgsFeature &feature, const QVariantMap &extraProperties=QVariantMap(), const QVariant &id=QVariant()) const |
| Returns a QJsonObject representation of a feature. More...
|
|
bool | includeAttributes () const |
| Returns whether attributes will be included in the JSON exports. More...
|
|
bool | includeGeometry () const |
| Returns whether geometry will be included in the JSON exports. More...
|
|
bool | includeRelated () const |
| Returns whether attributes of related (child) features will be included in the JSON exports. More...
|
|
int | precision () const |
| Returns the maximum number of decimal places to use in geometry coordinates. More...
|
|
void | setAttributeDisplayName (bool displayName) |
| Sets whether to print original names of attributes or aliases if defined. More...
|
|
void | setAttributes (const QgsAttributeList &attributes) |
| Sets the list of attributes to include in the JSON exports. More...
|
|
void | setExcludedAttributes (const QgsAttributeList &attributes) |
| Sets a list of attributes to specifically exclude from the JSON exports. More...
|
|
void | setIncludeAttributes (bool includeAttributes) |
| Sets whether to include attributes in the JSON exports. More...
|
|
void | setIncludeGeometry (bool includeGeometry) |
| Sets whether to include geometry in the JSON exports. More...
|
|
void | setIncludeRelated (bool includeRelated) |
| Sets whether to include attributes of features linked via references in the JSON exports. More...
|
|
void | setPrecision (int precision) |
| Sets the maximum number of decimal places to use in geometry coordinates. More...
|
|
void | setSourceCrs (const QgsCoordinateReferenceSystem &crs) |
| Sets the source CRS for feature geometries. More...
|
|
void | setTransformGeometries (bool activate) |
| Sets whether geometries should be transformed in EPSG 4326 (default behavior) or just keep as it is. More...
|
|
void | setVectorLayer (QgsVectorLayer *vectorLayer) |
| Sets the associated vector layer (required for related attribute export). More...
|
|
QgsCoordinateReferenceSystem | sourceCrs () const |
| Returns the source CRS for feature geometries. More...
|
|
QgsVectorLayer * | vectorLayer () const |
| Returns the associated vector layer, if set. More...
|
|