Re: [gdal-dev] Clarification of OGR write tutorial code

2010-08-24 Thread Even Rouault
Tim, yes you could likely move the OGRFeature::CreateFeature / OGRFeature::DestroyFeature out of the loop. If you do this, depending on the underlying OGR driver, you'll probably need doing a poFeature- >SetFID(OGRNullFID) before poLayer->CreateFeature(), since the previous call to CreateFeatur

Re: [gdal-dev] Clarification of OGR write tutorial code

2010-08-24 Thread Frank Warmerdam
Tim Keitt wrote: I made my first foray into OGR today and want to be sure I understand the following code from the tutorial. In particular, I am wondering why the feature is created and destroyed in each loop. Could one instead create a single feature object and simply update its x and y values

[gdal-dev] Clarification of OGR write tutorial code

2010-08-24 Thread Tim Keitt
I made my first foray into OGR today and want to be sure I understand the following code from the tutorial. In particular, I am wondering why the feature is created and destroyed in each loop. Could one instead create a single feature object and simply update its x and y values repeatedly? Clearly