ArcObject 要素更新
1 IFeature.Store() 更新要素属性
IFeatureCursor featureCursor = featureClass.Update(null, true);
IFeature feature = featureCursor .NextFeature();
while (feature != null)
{
feature.set_Value(2, i);
feature.Store();
feature = featureCursor.NextFeature();
}
2 IFeatureCursor.UpdateFeature() 更新要素属性
IFeatureCursor featureCursor =featureClass.Update(null, true);
IFeature feature = featureCursor .NextFeature();
while (feature != null)
{
feature.set_Value(2, i + 6);
featureCursor.UpdateRow(feature);
feature = featureCursor.NextFeature();
}
IFeatureCursor.UpdateFeature()的更新效率远远高于IFeature.Store()