@@ -174,7 +174,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
174
174
}
175
175
176
176
// save clipped baseline to file
177
- QgsFeature blFeature;
177
+ QgsFeature blFeature ( usedBaselineFields ) ;
178
178
blFeature.setGeometry ( *clippedBaseline );
179
179
blFeature.setAttribute ( " stratum_id" , strataId );
180
180
blFeature.setAttribute ( " ok" , " f" );
@@ -201,7 +201,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
201
201
QgsPoint sampleQgsPoint = samplePoint->asPoint ();
202
202
QgsPoint latLongSamplePoint = toLatLongTransform.transform ( sampleQgsPoint );
203
203
204
- QgsFeature samplePointFeature;
204
+ QgsFeature samplePointFeature ( outputPointFields ) ;
205
205
samplePointFeature.setGeometry ( samplePoint );
206
206
samplePointFeature.setAttribute ( " id" , nTotalTransects + 1 );
207
207
samplePointFeature.setAttribute ( " station_id" , nCreatedTransects + 1 );
@@ -274,7 +274,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
274
274
}
275
275
276
276
QgsFeatureId fid ( nCreatedTransects );
277
- QgsFeature sampleLineFeature ( fid );
277
+ QgsFeature sampleLineFeature ( outputPointFields, fid );
278
278
sampleLineFeature.setGeometry ( lineClipStratum );
279
279
sampleLineFeature.setAttribute ( " id" , nTotalTransects + 1 );
280
280
sampleLineFeature.setAttribute ( " station_id" , nCreatedTransects + 1 );
0 commit comments