Skip to content
Permalink
Browse files

fix saving attributes in the service area algorithm

  • Loading branch information
alexbruy committed Jun 9, 2020
1 parent ce9f519 commit 18195e2ad0af3a0f55346c4b5be7f726a5b2e4e1
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

This file was deleted.

@@ -0,0 +1 @@
PROJCS["WGS_1984_UTM_Zone_33S",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Binary file not shown.
Binary file not shown.

This file was deleted.

@@ -2004,7 +2004,7 @@ tests:
VALUE_FORWARD: ''
results:
OUTPUT:
name: expected/service_area_from_layer_nodes_bounds.gml
name: expected/service_area_from_layer_nodes_bounds.shp
type: vector

- algorithm: native:serviceareafromlayer
@@ -245,13 +245,13 @@ QVariantMap QgsServiceAreaFromLayerAlgorithm::processAlgorithm( const QVariantMa
QgsGeometry geomLower = QgsGeometry::fromMultiPointXY( lowerBoundary );

feat.setGeometry( geomUpper );
attributes = sourceAttributes.value( i );
attributes = sourceAttributes.value( i + 1 );
attributes << QStringLiteral( "upper" ) << origPoint;
feat.setAttributes( attributes );
pointsSink->addFeature( feat, QgsFeatureSink::FastInsert );

feat.setGeometry( geomLower );
attributes = sourceAttributes.value( i );
attributes = sourceAttributes.value( i + 1 );
attributes << QStringLiteral( "lower" ) << origPoint;
feat.setAttributes( attributes );
pointsSink->addFeature( feat, QgsFeatureSink::FastInsert );
@@ -262,7 +262,7 @@ QVariantMap QgsServiceAreaFromLayerAlgorithm::processAlgorithm( const QVariantMa
{
QgsGeometry geomLines = QgsGeometry::fromMultiPolylineXY( lines );
feat.setGeometry( geomLines );
attributes = sourceAttributes.value( i );
attributes = sourceAttributes.value( i + 1 );
attributes << QStringLiteral( "lines" ) << origPoint;
feat.setAttributes( attributes );
linesSink->addFeature( feat, QgsFeatureSink::FastInsert );

0 comments on commit 18195e2

Please sign in to comment.
You can’t perform that action at this time.