mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
[processing] Use MultiPolygon as output wkb type for multi ring buffer (constant)
This commit is contained in:
parent
1072ebb621
commit
4d5edb2380
File diff suppressed because one or more lines are too long
@ -15,7 +15,7 @@
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
|
@ -138,6 +138,7 @@ QgsFeatureList QgsMultiRingConstantBufferAlgorithm::processFeature( const QgsFea
|
||||
QgsFeature out;
|
||||
currentDistance = i * distance;
|
||||
outputGeometry = feature.geometry().buffer( currentDistance, 40 );
|
||||
outputGeometry.convertToMultiType();
|
||||
if ( outputGeometry.isNull() )
|
||||
{
|
||||
feedback->reportError( QObject::tr( "Error calculating buffer for feature %1" ).arg( feature.id() ) );
|
||||
|
@ -50,7 +50,7 @@ class QgsMultiRingConstantBufferAlgorithm : public QgsProcessingFeatureBasedAlgo
|
||||
QgsFields outputFields( const QgsFields &inputFields ) const override;
|
||||
QgsProcessing::SourceType outputLayerType() const override { return QgsProcessing::TypeVectorPolygon; }
|
||||
QgsProcessingFeatureSource::Flag sourceFlags() const override;
|
||||
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override { Q_UNUSED( inputWkbType ); return QgsWkbTypes::Polygon; }
|
||||
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override { Q_UNUSED( inputWkbType ); return QgsWkbTypes::MultiPolygon; }
|
||||
bool prepareAlgorithm( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
|
||||
QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user