

workspace = "Database Connections/Connection to Jerry.sde" # Set local variables in_lines = gp. # Author: ESRI # Import system modules import arcpy from arcpy import env # Set workspace env. # The TWO_FIELD option will be used to set the measures. The lines are in an enterprise geodatabase. # Name CreateRoutes_Example5.py # Description: Create routes from lines. Syntax CreateRoutes_lr (in_line_features, route_id_field, out_feature_class, measure_source, ) Parameter The Output Route Feature Class will have M (measure) values. The Output has M Values environment setting will be ignored. (Maybe because at the moment, PE isn’t creating Routes Not sure) This has been discussed in other threads. Tracks and Routes are two different things and they don’t translate from one to the other. For example, C:\Documents and Settings\patrickb\Local Settings\Temp\Create_Output0.txt (where Create_Output is the name of the output route feature class). Sounds to me as though you are correct: Use a trackto create a Route. If any features are rejected by the Create Routes tool, a text file is created in the temporary file path to store information about those features. If you will be using the Output Route Feature Class for dynamic segmentation, it is recommended that you choose to have an attribute index created. When the TWO_FIELDS Measure Source option is used, it is not necessary to specify a coordinate priority because measure direction is implied by the values in the From-Measure Field and the To-Measure Field.Īn attribute index on the route identifier field speeds up the dynamic segmentation process. When the LENGTH or ONE_FIELD Measure Source option is used, the Coordinate Priority is determined by placing the minimum bounding rectangle around the input features that will be merged to create one route. This is because measure values are dictated by the From-Measure Field and To-Measure Field values. The Ignore spatial gaps parameter is not used when the TWO_FIELDS Measure Source option has been specified. Use a Measure Offset in applications where the start measure of each route needs to be a value other than 0. For example, to convert from feet to miles, use a factor of 0.00018939394. Use a Measure Factor to convert between route measure units. If the Output Route Feature Class will be written to a geodatabase, an appropriate M Tolerance, M Resolution, and M Domain environment should be set. Use the Make Feature Layer or Make Query Table tools to effectively reduce the number of lines that will be used to create routes. The unique values in the Route Identifier Field are written to Output Route Feature Class. The input line features that share a common identifier are merged to create a single route.
