Book Image

ArcGIS By Example

By : Hussein Nasser
Book Image

ArcGIS By Example

By: Hussein Nasser

Overview of this book

Table of Contents (17 chapters)
ArcGIS By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Drawing the tower range based on the attribute value


Finally, we hit the attributes for the feature and use it to redraw our tower ranges based on the tower attribute value range. We will apply the code that we wrote in the previous section, on all the towers. However, instead of using the hardcoded value of 100 meters, we will use the actual tower range.

Drawing the range attribute

We will use the range attribute to draw the signal buffer for one tower. Follow these steps:

  1. Open your TelZaViBa project from C:\ArcGISByExample\telzaviba\code\.

  2. Change the following code in the onClick event for btnShowTowerRange.vb:

    …
    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 range As Double = pFeature.Value(pFeature.Fields.FindField("TOWER_RANGE_METERS"))
    Dim pTowerRange As IGeometry = pTopo.Buffer(range)
    
    Dim...