QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Member Functions | List of all members
QgsRemappingSinkDefinition Class Reference

#include <qgsremappingproxyfeaturesink.h>

Public Member Functions

void addMappedField (const QString &destinationField, const QgsProperty &property)
 Adds a mapping for a destination field. More...
 
QgsCoordinateReferenceSystem destinationCrs () const
 Returns the destination CRS used for reprojecting incoming features to the sink's destination CRS. More...
 
QgsFields destinationFields () const
 Returns the fields for the destination sink. More...
 
QgsWkbTypes::Type destinationWkbType () const
 Returns the WKB geometry type for the destination. More...
 
QMap< QString, QgsPropertyfieldMap () const
 Returns the field mapping, which defines how to map the values from incoming features to destination field values. More...
 
bool loadVariant (const QVariantMap &map)
 Loads this remapping definition from a QVariantMap, wrapped in a QVariant. More...
 
bool operator!= (const QgsRemappingSinkDefinition &other) const
 
bool operator== (const QgsRemappingSinkDefinition &other) const
 
void setDestinationCrs (const QgsCoordinateReferenceSystem &destination)
 Sets the destination crs used for reprojecting incoming features to the sink's destination CRS. More...
 
void setDestinationFields (const QgsFields &fields)
 Sets the fields for the destination sink. More...
 
void setDestinationWkbType (QgsWkbTypes::Type type)
 Sets the WKB geometry type for the destination. More...
 
void setFieldMap (const QMap< QString, QgsProperty > &map)
 Sets the field mapping, which defines how to map the values from incoming features to destination field values. More...
 
void setSourceCrs (const QgsCoordinateReferenceSystem &source)
 Sets the source crs used for reprojecting incoming features to the sink's destination CRS. More...
 
QgsCoordinateReferenceSystem sourceCrs () const
 Returns the source CRS used for reprojecting incoming features to the sink's destination CRS. More...
 
QVariant toVariant () const
 Saves this remapping definition to a QVariantMap, wrapped in a QVariant. More...
 

Detailed Description

Defines the parameters used to remap features when creating a QgsRemappingProxyFeatureSink.

The definition includes parameters required to correctly map incoming features to the structure of the destination sink, e.g. information about how to create output field values and how to transform geometries to match the destination CRS.

Since
QGIS 3.14

Definition at line 37 of file qgsremappingproxyfeaturesink.h.

Member Function Documentation

◆ addMappedField()

void QgsRemappingSinkDefinition::addMappedField ( const QString &  destinationField,
const QgsProperty property 
)
inline

Adds a mapping for a destination field.

Field values are mapped using a QgsProperty source object, which allows either direct field value to field value mapping or use of QgsExpression expressions to transform values to the destination field.

See also
setFieldMap()
fieldMap()

Definition at line 74 of file qgsremappingproxyfeaturesink.h.

◆ destinationCrs()

QgsCoordinateReferenceSystem QgsRemappingSinkDefinition::destinationCrs ( ) const
inline

Returns the destination CRS used for reprojecting incoming features to the sink's destination CRS.

See also
setDestinationCrs()

Definition at line 95 of file qgsremappingproxyfeaturesink.h.

◆ destinationFields()

QgsFields QgsRemappingSinkDefinition::destinationFields ( ) const
inline

Returns the fields for the destination sink.

See also
setDestinationFields()

Definition at line 123 of file qgsremappingproxyfeaturesink.h.

◆ destinationWkbType()

QgsWkbTypes::Type QgsRemappingSinkDefinition::destinationWkbType ( ) const
inline

Returns the WKB geometry type for the destination.

See also
setDestinationWkbType()

Definition at line 109 of file qgsremappingproxyfeaturesink.h.

◆ fieldMap()

QMap< QString, QgsProperty > QgsRemappingSinkDefinition::fieldMap ( ) const
inline

Returns the field mapping, which defines how to map the values from incoming features to destination field values.

Field values are mapped using a QgsProperty source object, which allows either direct field value to field value mapping or use of QgsExpression expressions to transform values to the destination field.

See also
setFieldMap()
addMappedField()

Definition at line 51 of file qgsremappingproxyfeaturesink.h.

◆ loadVariant()

bool QgsRemappingSinkDefinition::loadVariant ( const QVariantMap &  map)

Loads this remapping definition from a QVariantMap, wrapped in a QVariant.

You can use QgsXmlUtils::readVariant to load it from an XML document.

See also
toVariant()

Definition at line 155 of file qgsremappingproxyfeaturesink.cpp.

◆ operator!=()

bool QgsRemappingSinkDefinition::operator!= ( const QgsRemappingSinkDefinition other) const

Definition at line 191 of file qgsremappingproxyfeaturesink.cpp.

◆ operator==()

bool QgsRemappingSinkDefinition::operator== ( const QgsRemappingSinkDefinition other) const

Definition at line 182 of file qgsremappingproxyfeaturesink.cpp.

◆ setDestinationCrs()

void QgsRemappingSinkDefinition::setDestinationCrs ( const QgsCoordinateReferenceSystem destination)
inline

Sets the destination crs used for reprojecting incoming features to the sink's destination CRS.

See also
destinationCrs()

Definition at line 102 of file qgsremappingproxyfeaturesink.h.

◆ setDestinationFields()

void QgsRemappingSinkDefinition::setDestinationFields ( const QgsFields fields)
inline

Sets the fields for the destination sink.

See also
destinationFields()

Definition at line 130 of file qgsremappingproxyfeaturesink.h.

◆ setDestinationWkbType()

void QgsRemappingSinkDefinition::setDestinationWkbType ( QgsWkbTypes::Type  type)
inline

Sets the WKB geometry type for the destination.

See also
setDestinationWkbType()

Definition at line 116 of file qgsremappingproxyfeaturesink.h.

◆ setFieldMap()

void QgsRemappingSinkDefinition::setFieldMap ( const QMap< QString, QgsProperty > &  map)
inline

Sets the field mapping, which defines how to map the values from incoming features to destination field values.

Field values are mapped using a QgsProperty source object, which allows either direct field value to field value mapping or use of QgsExpression expressions to transform values to the destination field.

See also
fieldMap()
addMappedField()

Definition at line 63 of file qgsremappingproxyfeaturesink.h.

◆ setSourceCrs()

void QgsRemappingSinkDefinition::setSourceCrs ( const QgsCoordinateReferenceSystem source)
inline

Sets the source crs used for reprojecting incoming features to the sink's destination CRS.

See also
sourceCrs()

Definition at line 88 of file qgsremappingproxyfeaturesink.h.

◆ sourceCrs()

QgsCoordinateReferenceSystem QgsRemappingSinkDefinition::sourceCrs ( ) const
inline

Returns the source CRS used for reprojecting incoming features to the sink's destination CRS.

See also
setSourceCrs()

Definition at line 81 of file qgsremappingproxyfeaturesink.h.

◆ toVariant()

QVariant QgsRemappingSinkDefinition::toVariant ( ) const

Saves this remapping definition to a QVariantMap, wrapped in a QVariant.

You can use QgsXmlUtils::writeVariant to save it to an XML document.

See also
loadVariant()

Definition at line 133 of file qgsremappingproxyfeaturesink.cpp.


The documentation for this class was generated from the following files: