Skip to content

Commit

Permalink
Fix attribute creation in transect sample
Browse files Browse the repository at this point in the history
(cherry picked from commit 90e0cb9)
  • Loading branch information
mhugent authored and jef-n committed Mar 23, 2016
1 parent 31c914d commit 1f57745
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/analysis/vector/qgstransectsample.cpp
Expand Up @@ -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" );
Expand All @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 1f57745

Please sign in to comment.