ARCEngine添加创建线要素
添加线
添加线的⽅法跟添加点⼀样,不同的只是地物类型不⼀样⽽已,我把代码贴出来,⼤家跟添加点的⽅式进⾏对⽐。这样便于记忆。也有利于理解。三角形三条边的关系
信仰自由
public void AddLineByWrite()
{
IFeatureLayer l = _Layer(0) as IFeatureLayer;
IFeatureClass fc = l.FeatureClass ;
IFeatureClassWrite fr = fc as IFeatureClassWrite ;
IWorkspaceEdit w = (fc as IDatat).Workspace as IWorkspaceEdit;
慢性疲劳综合症IFeature f ;
//可选参数的设置
什么是特种设备
object Missing = Type.Missing;
IPoint p=new PointClass();
w.StartEditing (true);
w.StartEditOperation() ;
for (int i = 0 ; i< 100 ; i++ )
{
f = fc.CreateFeature();
//定义⼀个多义线对象
IPolyline PlyLine=new PolylineClass();
//定义⼀个点的集合
IPointCollection ptclo = PlyLine as IPointCollection;
/
/定义⼀系列要添加到多义线上的点对象,并赋初始值
for(int j=0;j<4;j++)
{
p.PutCoords(j,j);
ptclo.AddPoint(p,ref Missing,ref Missing);
}广州天河体育中心
f.Shape = PlyLine;
阿斗寨fr.WriteFeature (f);
制作个人简历
}
w.StopEditOperation();
w.StopEditing(true);
}
长毛金丝熊⾄于添加线的其他两种⽅法,通过修改添加点的代码,就可以得到。可以⾃⼰想想然后测试,这样便于记忆和理解。