Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automatic Turntable Calculation Tool Melissa J Rura CE 508 Dr. Shan 10/29/2004.

Similar presentations


Presentation on theme: "Automatic Turntable Calculation Tool Melissa J Rura CE 508 Dr. Shan 10/29/2004."— Presentation transcript:

1 Automatic Turntable Calculation Tool Melissa J Rura CE 508 Dr. Shan 10/29/2004

2 Introduction What is turntable necessary for? Purpose of the project How to calculate turns? X,Y coordinates Software Two datasets Simplified Actual

3 Methodology Description of input data Simplified dataset Required output

4 Methodology Calculate X,Y coordinates of the nodes '========================= 'polyline_Get_X_FromPoint.cal 'Author: Ianko Tchoukanski 'http://www.ian-ko.com '========================= On Error Resume Next Dim pMxDoc As IMxDocument Dim pMap As IMap Dim pCurve As ICurve Dim pFromPoint As IPoint Dim dXFrom As Double Dim bSrefFromMap As Boolean '======================= 'Adjust the parameter below 'bSrefFromMap = True ==> the coordinates will be calculated in the projection of the Map 'bSrefFromMap = False ==> the coordinates will be calculated in the projection of the data bSrefFromMap = True '======================= If (Not IsNull([Shape])) Then Set pCurve = [Shape] If (Not pCurve.IsEmpty) Then If (bSrefFromMap) Then Set pMxDoc = ThisDocument Set pMap = pMxDoc.FocusMap pCurve.Project pMap.SpatialReference End If Set pFromPoint = pCurve.FromPoint dXFrom = pFromPoint.X End If __esri_field_calculator_splitter__ dXFrom For the Y From point the line “dXFrom = pFromPoint.X” changes to “dYFrom = pFromPointY” For the X and Y To points the lines “ Set pFromPoint = pCurve.FromPoint dXFrom = pFromPoint.X” changes to : “Set pToPoint = pCurve.ToPoint dXTo = pToPoint.X” and “Set pToPoint = pCurve.ToPoint dYTo = pToPoint.Y” respectively. This code can then be directly inputted in to the ArcGIS field calculator and the X and Y coordinates of any line segment can be calculated. Import table into the tool – direct import or link tables through ODBC Open the tool – Switchboard GUI

5 Step 1- intersections table 1. First using the total_records_form the Tool counts the total number of records, i.e. line segments in the attribute table 2. Begin a FOR loop from 1 to total number of records 3. In the table intersection create a new record for node j; where j is the current node number 4. Select all line segments where node j is the beginning node (Fjunction) or ending node (Tjunction) of the line segment and record the number of line segments into the record for node j in the intersection table. 5. Retrieve and record X and Y coordinates for node j. 6. Repeat for each node then exit loop 7. Delete all nodes in the table intersections with less then 3 line segments Note the two attributes

6 Intersections table contd. This table can be exported using the export button under the Step 1 button and imported into ArcGIS as an XY Event point layer to visually check the accuracy of the intersections created back

7 Step 2 – select_nodes form The intersections table serves as the basis for the select_nodes form

8 Once all manual manipulations to the added attributes on the data are finished, clicking the Recalculate turntable button then generates the new turntable and its export variant This is done in a three-step process.

9 Almost table Compute the table of all possible routes through an intersection node Begin FOR Loop from 1 to total number of intersections where node i is the current intersection Using the adjacent_nodes form select the line segment ik from the adjacent_nodes table Write the combinations to table almost Close Loop

10 Output query 1) Compute the interim turntable a. Run a query to select the X and Y values for each node (F_Junction & T_Junction from the Almost table and the Intersection node from the Intersection table) in the possible route combination and the other modeling parameters from the Intersection table. b. Write these values into the query Output c. Using the X,Y coordinates compute the angles for each combination and subtract them and assign the time

11 Final table 1) Compute Final turntable Run a query to select the node identifier, the F_Edge (beginning edge), the T_Edge (ending edge), and the assigned turn time as required by ArcView in order to declare a turntable

12 Conclusion and Future Work generalizing the database to accept any street network attribute table and not to assume consecutive number beginning at 1 for the node identification modeling of a turn with only two segments intersecting should be addressedtwo segments add other intersection attributes to the intersection table


Download ppt "Automatic Turntable Calculation Tool Melissa J Rura CE 508 Dr. Shan 10/29/2004."

Similar presentations


Ads by Google