darren02
路人甲
路人甲
  • 注册日期2007-09-17
  • 发帖数5
  • QQ
  • 铜币129枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1292回复:1

[求助]缓冲区分析

楼主#
更多 发布于:2007-10-29 10:52
在缓冲区分析中有三种方法,其中属性权值缓冲区(以分析对象的属性值作为权值建立缓冲区),分级缓冲区(建立一个给定环个数和间距的分级缓冲区)怎么在vc中实现,函数是怎样的?
喜欢0 评分0
追风浪子
路人甲
路人甲
  • 注册日期2004-06-08
  • 发帖数166
  • QQ
  • 铜币782枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2007-11-02 17:24
<P>Sub exampleITopologicalOperator_Buffer()<BR>Dim ptc As IPointCollection, i As Long, pa As IArea, ptopo As ITopologicalOperator<BR>Dim pt(4) As IPoint, poutPoly As IPolygon<BR>Set ptc = New Polygon<BR>'The spatial reference should be set here using IGeometry::SpatialReference (Code skipped here)<BR>For i = 0 To 4<BR>   Set pt(i) = New Point<BR>Next<BR>pt(0).PutCoords 0, 0<BR>pt(1).PutCoords 0, 10<BR>pt(2).PutCoords 10, 10<BR>pt(3).PutCoords 10, 0<BR>pt(4).PutCoords 0, 0<BR>ptc.AddPoints 5, pt(0)<BR>Set pa = ptc<BR>Debug.Print "Area original polygon : " ; pa.Area<BR>Set ptopo = ptc<BR>Set poutPoly = ptopo.Buffer(1) 'Outside buffer<BR>Set pa = poutPoly<BR>Debug.Print "Area polygon positive distance : " ; pa.Area<BR>Set poutPoly = ptopo.Buffer(-1) 'Inside buffer<BR>Set pa = poutPoly<BR>Debug.Print "Area polygon negative distance : " ; pa.Area<BR>End Sub</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部