/// <summary>
/// 向要素集中插入新要素
/// </summary>
/// <param name="pFeaClass">要素集</param>
/// <param name="pGeo">图形</param>
/// <returns></returns>
private IFeatureBuffer CreateNewFeature(IFeatureClass pFeaClass, IFeature pFea, IGeometry pGeo)
{
IFeatureBuffer pFeaBuffer = null;
try
{
IFeatureCursor pFeaCursor = pFeaClass.Insert(true);
pFeaBuffer = pFeaClass.CreateFeatureBuffer();
pFeaBuffer.Shape = pGeo;
拷贝字段属性值
bool bResult = GtMap.GxAEHelper.Feature.CopyFieldValue(pFea, ref pFeaBuffer);
pFeaCursor.InsertFeature(pFeaBuffer);
pFeaCursor.Flush();
}
catch (Exception ex)
{
GtMap.GxComHelper.LogWriter.WriteLog("创建新要素失败", ex);
pFeaBuffer = null;
}
return pFeaBuffer;
}
向要素集中插入新要素
最新推荐文章于 2022-06-21 10:49:03 发布