zhaojie2008
路人甲
路人甲
  • 注册日期2007-06-04
  • 发帖数30
  • QQ
  • 铜币21枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1453回复:2

多条线的存储问题

楼主#
更多 发布于:2007-08-07 20:10
<P>我要用IGeometryCollection接口实现对多条线的存储,请问怎么做?</P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15947
  • QQ554730525
  • 铜币25339枚
  • 威望15364点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2007-08-10 11:29
<P>代码可以这样写</P>
<P>Dim istriceFeat As IFeature <BR>Set istriceFeat = pFeatClass.CreateFeature <BR>Dim linea As ILine <BR><BR>Dim punto1 As IPoint <BR>Set punto1 = New Point <BR>punto1.PutCoords x1,y1 <BR>Dim punto2 As IPoint <BR>Set punto2 = New Point <BR>punto2.PutCoords x2,y2 <BR>Set linea = New Line <BR>linea.PutCoords punto1, punto2 <BR><BR>Dim geomColl As IGeometryCollection <BR>Set geomColl = New Polyline <BR>Dim segmentColl As ISegmentCollection <BR>Set segmentColl = New Path <BR>segmentColl.AddSegment linea <BR>geomColl.AddGeometry segmentColl <BR><BR>Set istriceFeat.Shape = geomColl </P>
举报 回复(0) 喜欢(0)     评分
zhaojie2008
路人甲
路人甲
  • 注册日期2007-06-04
  • 发帖数30
  • QQ
  • 铜币21枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2007-08-10 21:11
<P>多谢</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部