Class: QgsRemappingSinkDefinition¶
- class qgis.core.QgsRemappingSinkDefinition¶
Bases:
sip.wrapper
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.
New in version 3.14:
Methods
Adds a mapping for a destination field.
Returns the destination CRS used for reprojecting incoming features to the sink's destination CRS.
Returns the fields for the destination sink.
Returns the WKB geometry type for the destination.
Returns the field mapping, which defines how to map the values from incoming features to destination field values.
Loads this remapping definition from a QVariantMap, wrapped in a QVariant.
Sets the
destination
crs used for reprojecting incoming features to the sink's destination CRS.Sets the
fields
for the destination sink.Sets the WKB geometry
type
for the destination.Sets the field mapping, which defines how to map the values from incoming features to destination field values.
Sets the
source
crs used for reprojecting incoming features to the sink's destination CRS.Returns the source CRS used for reprojecting incoming features to the sink's destination CRS.
Saves this remapping definition to a QVariantMap, wrapped in a QVariant.
- addMappedField(self, destinationField: str, property: QgsProperty)¶
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 ofQgsExpression
expressions to transform values to the destination field.See also
See also
- Parameters
destinationField (str) –
property (QgsProperty) –
- destinationCrs(self) QgsCoordinateReferenceSystem ¶
Returns the destination CRS used for reprojecting incoming features to the sink’s destination CRS.
See also
- Return type
- destinationFields(self) QgsFields ¶
Returns the fields for the destination sink.
See also
- Return type
- destinationWkbType(self) QgsWkbTypes.Type ¶
Returns the WKB geometry type for the destination.
See also
- Return type
- fieldMap(self) Dict[str, QgsProperty] ¶
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 ofQgsExpression
expressions to transform values to the destination field.See also
See also
- Return type
Dict[str, QgsProperty]
- loadVariant(self, map: Dict[str, Any]) bool ¶
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
- Parameters
map (Dict[str) –
- Return type
bool
- setDestinationCrs(self, destination: QgsCoordinateReferenceSystem)¶
Sets the
destination
crs used for reprojecting incoming features to the sink’s destination CRS.See also
- Parameters
destination (QgsCoordinateReferenceSystem) –
- setDestinationFields(self, fields: QgsFields)¶
Sets the
fields
for the destination sink.See also
- Parameters
fields (QgsFields) –
- setDestinationWkbType(self, type: QgsWkbTypes.Type)¶
Sets the WKB geometry
type
for the destination.See also
- Parameters
type (QgsWkbTypes.Type) –
- setFieldMap(self, map: Dict[str, QgsProperty])¶
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 ofQgsExpression
expressions to transform values to the destination field.See also
See also
- Parameters
map (Dict[str) –
- setSourceCrs(self, source: QgsCoordinateReferenceSystem)¶
Sets the
source
crs used for reprojecting incoming features to the sink’s destination CRS.See also
- Parameters
source (QgsCoordinateReferenceSystem) –
- sourceCrs(self) QgsCoordinateReferenceSystem ¶
Returns the source CRS used for reprojecting incoming features to the sink’s destination CRS.
See also
- Return type
- toVariant(self) Any ¶
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
- Return type
Any