likey_ding
路人甲
路人甲
  • 注册日期2007-03-20
  • 发帖数18
  • QQ
  • 铜币179枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1255回复:1

如何在AO中将椭圆弧转换成椭圆面

楼主#
更多 发布于:2007-05-14 14:24
<P>本人需要在程序中实现,添加新的图层,并画一个椭圆,可以填充的,我的想法是先画一个椭圆弧,然后获得椭圆弧的点集,将其转换成polygon格式,不知道可行麽?因为初接触gis,可能很多想法比较幼稚,希望有大侠不吝赐教。下面是我写的转换函数</P>
<P>但是每次执行到红色部分就会显示无效的类型转换,geometry是已经画好的椭圆弧</P>
<P> Private Function createPolygon(ByVal geometry As IEllipticArc) As Polygon<BR>        Dim pGonColl As IGeometryCollection<BR>        Dim pPointColl As IPointCollection<BR>        Dim i As Integer<BR>        pGonColl = New Polygon<BR>        <FONT color=#f73809>pPointColl = geometry</FONT><BR>        pGonColl.AddGeometry(pPointColl)<BR>        Return pGonColl<BR>    End Function</P>
喜欢0 评分0
likey_ding
路人甲
路人甲
  • 注册日期2007-03-20
  • 发帖数18
  • QQ
  • 铜币179枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2007-05-14 15:46
<P> Private Function createPolygon(ByVal geometry As IEllipticArc) As Polygon<BR>        Dim pGonColl As IPointCollection<BR>        pGonColl = New Polygon<BR>        Dim pPointColl As IPointCollection<BR>        pPointColl = New Polygon<BR>        Dim i As Integer<BR>        Dim pSeg As ISegment<BR>        pSeg = geometry<BR>        Dim pPolyline As ISegmentCollection<BR>        pPolyline = New Polyline<BR>        pPolyline.AddSegment(pSeg)<BR>        pPointColl = pPolyline</P>
<P><BR>        For i = 0 To pPointColl.PointCount - 1<BR>            pGonColl.AddPoint(pPointColl.Point(i))<BR>        Next<BR>        Return pGonColl<BR>    End Function<BR>我修改成如上</P>
<P>发现椭圆弧的点集里只有一个点,起点和终点重合,没有其他描述信息了,这可怎么办啊?</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部