Trace Geoprocessing Model for Custom Tracing on your Geometric Network
Tools Required: Arcmap 10.0 +
Procedure
To start with building geoprocessing Model for Tracing functionality you must first need an Geometric Network
If you doesn't have your own geometric Network with you.Please download a sample network from the Internet.Please refer arcgis site for various geometric network samples
For creating a own geometric Network for representing your own network of real world data.Please follow the steps in this link Create Geometric Network
Once Geometric network is downloaded or Created please add it in to the ArcMap Table of Contents.
To perform a tracing on your network , the network should be ready with the flow directions which help the tracing tool to perform a trace
Setting up a flow direction for a Network can be done in Two ways: 1.Digitized flow direction 2.Flow direction through Source and Sink
Follow the basic python code to setup your network Flow Direction
import arcpy
Water_Net = "C:/testing/GeometricNetworks/Montgomery.gdb/Water/Water_Net"
Set Flow Direction arcpy.SetFlowDirection_management(Water_Net, "WITH_DIGITIZED_DIRECTION")
Once the flow direction is Set. Create a new toolbar with a new model in it named as Trace model Tool
Open the model by right clicking it and select EDIT
Build the model as shown in the Figure.
For creating feature set .Right click and click on CREATE VARIABLE> select FEATURE SET (This features will be generated interactively during the runtime to get the flag and barrier Locations)
Set the Snapping environment as desired.Select the major network element such as Mains in a Water Network as the snapping feature.So that the flag and Barrier will snapping if it is placed within the snapping Tolerance
The Snap model Tool will work only with model builder and not with Python
Set the Trace Results as the Model parameter if you want the Traced Results to placed on the TOC.So that it will appear on the Active S
creen.
creen.
The Model displayed above will select only the junction traced results and add the created feature layer to the map
To access the Traced Results.Please Go to GEOPROCESSING>RESULTS and Current Session will give access to the flags and Barriers Used by the Model Tool
Final Model when opened will look like this.
Traced Results
HAPPY TRACING.,,Please comments your suggestions
No comments:
Post a Comment