Skip to content

Commit

Permalink
Merge pull request #37074 from alexbruy/fix-servicearea
Browse files Browse the repository at this point in the history
fix saving attributes in the service area algorithm
  • Loading branch information
elpaso committed Jun 10, 2020
2 parents 013f682 + 18195e2 commit 954ab15
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 164 deletions.
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.

Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/analysis/processing/qgsalgorithmserviceareafromlayer.cpp
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down

0 comments on commit 954ab15

Please sign in to comment.