Skip to content
Permalink
Browse files

Fix attribute creation in transect sample

  • Loading branch information
mhugent committed Mar 14, 2016
1 parent 627815d commit 90e0cb995fd887db7042fc2e811b685004f0cbbd
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/analysis/vector/qgstransectsample.cpp
@@ -174,7 +174,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
}

//save clipped baseline to file
QgsFeature blFeature;
QgsFeature blFeature( usedBaselineFields );
blFeature.setGeometry( *clippedBaseline );
blFeature.setAttribute( "stratum_id", strataId );
blFeature.setAttribute( "ok", "f" );
@@ -201,7 +201,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
QgsPoint sampleQgsPoint = samplePoint->asPoint();
QgsPoint latLongSamplePoint = toLatLongTransform.transform( sampleQgsPoint );

QgsFeature samplePointFeature;
QgsFeature samplePointFeature( outputPointFields );
samplePointFeature.setGeometry( samplePoint );
samplePointFeature.setAttribute( "id", nTotalTransects + 1 );
samplePointFeature.setAttribute( "station_id", nCreatedTransects + 1 );
@@ -274,7 +274,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
}

QgsFeatureId fid( nCreatedTransects );
QgsFeature sampleLineFeature( fid );
QgsFeature sampleLineFeature( outputPointFields, fid );
sampleLineFeature.setGeometry( lineClipStratum );
sampleLineFeature.setAttribute( "id", nTotalTransects + 1 );
sampleLineFeature.setAttribute( "station_id", nCreatedTransects + 1 );

1 comment on commit 90e0cb9

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson commented on 90e0cb9 Mar 15, 2016

@mhugent is this safe for me to backport?

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