Skip to content
Permalink
Browse files

Fix attribute creation in transect sample

(cherry picked from commit 90e0cb9)
  • Loading branch information
mhugent authored and jef-n committed Mar 23, 2016
1 parent 31c914d commit 1f57745d50e1bdef14bc49039e03e710e35987cc
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 );

0 comments on commit 1f57745

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