Skip to content
Permalink
Browse files

Merge pull request #37074 from alexbruy/fix-servicearea

fix saving attributes in the service area algorithm
  • Loading branch information
elpaso committed Jun 10, 2020
2 parents 013f682 + 18195e2 commit 954ab15276bdf3f9dc3b3689f71565aab9ce2d4b
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 954ab15

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