<div dir="ltr"><div><div><div>Hello,<br></div><div><br>I have a shape file which consists of many polygons (say 56). Programmatically I wish to select (say, one poly.) from them. I proceeded something like this.<br><br>OGRLayer *clippingshp; unsigned int NumPolygons;<br><br>while((tempfeature=inlayer->GetNextFeature( ))!=NULL)<br>{<br>  clippingshp->CreateFeature(tempfeature); clippingshp->SetFeature(tempfeature); <br>  <br><br>  NumPolygons=clippingshp->GetFeatureCount( ); /* After this NumPolygons should be 1 */<br><br></div><div>  /* But NumPolygons = 56, that is the whole file is selected */<br></div><div>  .<br>  .<br>  .<br>}<br><br></div><div>Can anyone tell me please how to select a feature (polygon in this context) and copy it into an OGRLayer.<br></div><div><br><br></div>With many thanks,<br><br></div>Yours sincerely,<br></div>  B. Ramesh<br></div>