@@ -174,7 +174,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
174174 }
175175
176176 // save clipped baseline to file
177- QgsFeature blFeature;
177+ QgsFeature blFeature ( usedBaselineFields ) ;
178178 blFeature.setGeometry ( *clippedBaseline );
179179 blFeature.setAttribute ( " stratum_id" , strataId );
180180 blFeature.setAttribute ( " ok" , " f" );
@@ -201,7 +201,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
201201 QgsPoint sampleQgsPoint = samplePoint->asPoint ();
202202 QgsPoint latLongSamplePoint = toLatLongTransform.transform ( sampleQgsPoint );
203203
204- QgsFeature samplePointFeature;
204+ QgsFeature samplePointFeature ( outputPointFields ) ;
205205 samplePointFeature.setGeometry ( samplePoint );
206206 samplePointFeature.setAttribute ( " id" , nTotalTransects + 1 );
207207 samplePointFeature.setAttribute ( " station_id" , nCreatedTransects + 1 );
@@ -274,7 +274,7 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
274274 }
275275
276276 QgsFeatureId fid ( nCreatedTransects );
277- QgsFeature sampleLineFeature ( fid );
277+ QgsFeature sampleLineFeature ( outputPointFields, fid );
278278 sampleLineFeature.setGeometry ( lineClipStratum );
279279 sampleLineFeature.setAttribute ( " id" , nTotalTransects + 1 );
280280 sampleLineFeature.setAttribute ( " station_id" , nCreatedTransects + 1 );
0 commit comments