lunyi

Questions about how to use IFeature?

Discussion created by lunyi on May 28, 2010
Now I use the FeatureLayer in the ArcGIS Engine 9.3

I add the .shp file (with point geometry) named "point" to the .mxd file.

and then create feature in the FeatureLayer as the following code



[INDENT]IFeatureLayer^ theLayer = GetFeatureLayer("point")  ;  //Get FeautureLayer

m_FeatureClass = theLayer->FeatureClass ;              //Get FeatureClass

IFeatureCursor^ cursor = m_FeatureClass->Insert(true) ;

IFeatureBuffer^ buffer = m_FeatureClass->CreateFeatureBuffer() ;

IPoint^ p = GetPoint(x,y) ;   

buffer->Shape = (IGeometry^)p ;

cursor->InsertFeature(buffer) ;[/INDENT]



I would like to know how to select feautre by x,y (Lon,Lat), then move it , edit it or delete it.

anybody can answer me or provide the related information.

Outcomes