The topological operators and graphic
elements
The topological operators allows us to work and manipulate the feature geometries
and change, expand or shrink the shape. We will use the Buffer method to make the
point tower feature into a circle and then we will draw this circle on the map. Follow
these steps:
1. If you have closed it, open your TelZaViBa project again from C:\
ArcGISByExample\telzaviba\code\.
2. Double-click to edit btnShowTowerRange.vb and add the following code in
the onClick event:
Dim pDocument As IMxDocument = My.ArcMap.Application.Document
Dim pTowerLayer As IFeatureLayer = pDocument.FocusMap.Layer(0)
Dim pFeature As IFeature = pTowerLayer.FeatureClass.GetFeature(1)
Dim pTopo As ITopologicalOperator = pFeature.Shape
Dim pTowerRange As IGeometry = pTopo.Buffer(100)
MsgBox("Feature with objectid " & pFeature.OID &
" - with class name " & pFeature.Class.AliasName &
" has been fetched")
3. This has created a new polygon geometry of type circle with a radius of 100
meters. Now we need to draw that on the map using the ArcGIS graphics.
elements
The topological operators allows us to work and manipulate the feature geometries
and change, expand or shrink the shape. We will use the Buffer method to make the
point tower feature into a circle and then we will draw this circle on the map. Follow
these steps:
1. If you have closed it, open your TelZaViBa project again from C:\
ArcGISByExample\telzaviba\code\.
2. Double-click to edit btnShowTowerRange.vb and add the following code in
the onClick event:
Dim pDocument As IMxDocument = My.ArcMap.Application.Document
Dim pTowerLayer As IFeatureLayer = pDocument.FocusMap.Layer(0)
Dim pFeature As IFeature = pTowerLayer.FeatureClass.GetFeature(1)
Dim pTopo As ITopologicalOperator = pFeature.Shape
Dim pTowerRange As IGeometry = pTopo.Buffer(100)
MsgBox("Feature with objectid " & pFeature.OID &
" - with class name " & pFeature.Class.AliasName &
" has been fetched")
3. This has created a new polygon geometry of type circle with a radius of 100
meters. Now we need to draw that on the map using the ArcGIS graphics.
ليست هناك تعليقات:
إرسال تعليق