English

How To: Create a Dynamic Segmentation demo No. 1

Procedure

Instructions provided are designed to walk the user through creating a route, displaying it in Arcplot, and relating it with three types of event data: point, linear and continuous.

The user builds his or her own data set as he or she follows the commands.

Start up ArcInfo and create a workspace named demo.

arc>cw demo
w demo

Generate a line cover named C. It consists of only one line segment.

arc>generate c
line
1000
0,0
10,10
end
end
q

Build the coverage:

arc>build c line
list c.aat
&term 9999
display 9999
arcplot
mape c
arcs c
arctext c c-id
q

Create a route across this arc and give it a route-id of 50. The starting point needs to have a milepost of 500 and the ending point needs to have a milepost of 900. Three items need to be added to C.AAT.

ROUTENUM contains a unique number defining the route
BEGIN contains a value for the beginning of the arc
END contains a value for the ending of the arc.

additem c.aat c.aat routenum 3 3 i
additem c.aat c.aat begin 3 3 i
additem c.aat c.aat end 3 3 i
list c.aat
tables
sel c.aat
calc routenum = 50
calc begin = 500
calc end = 900
list
q stop
list c.aat

This is how the c.aat should appear:
1
FNODE# = 0
TNODE# = 0
LPOLY# = 0
RPOLY# = 0
LENGTH = 14.142
C# = 1
C-ID = 1000
ROUTENUM = 50
BEGIN = 500
END = 900

Convert this arc into a route. Use the arcsection command:

arcsection
arcsection c bus routenum routenum begin end
list c.secbus
list c.ratbus

Notice how the arc begins at 500 and ends at 900.

To recalibrate these points, use the calibrateroutes command. If, for example, the new start point is at 505 and the new end point is at 910, it is necessary to create a point cover containing these calibration points before using the calibrateroutes command.

arc>
generate p
point
1,0,0
2,10,10

q
build p point

Add an item named MILEPOST that holds the new values.
Add an item called ROUTENUM. Enter a value of 50 so it recognizes that these points relate to route number 50.

additem p.pat p.pat milepost 4 4 i
additem p.pat p.pat routenum 3 3 i
list p.pat
tables
sel p.pat
list
calc routenum = 50
res p-id = 1
calc milepost = 505
nsel
calc milepost = 910
list
q stop
list p.pat
The P.PAT should look like the following:
Record AREA PERIMETER P# P-ID MILEPOST ROUTENUM
1 0.000 0.000 1 1 505 50
2 0.000 0.000 2 2 910 50

calibrateroutes
calibrateroutes c bus p routenum milepost
list c.aat
list c.ratbus
list c.secbus

Notice how the from and to values have changed to 505 and 910.

Go into Arcplot and see how the routehatch can be used to view what has been done.

ap
mape c
routes c bus
routehatch c bus .1 10 5 3 left ends

The above information commands Arcplot to use hatches .1 inch long. A hatch line is drawn at every tenth value. A text is drawn at every fifth hatch. The text appears to the left of the route. The end points also have text values.

Turn STRIPMAP ON and see the results:

clear
stripmap on
mape c
routes c bus
routehatch c bus .1 10 5 3 left ends

Define an event table with POINT data. For example, if two accidents have occured on routenum 50, six people were killed at milepost 600, and eight people were killed at milepost 800, summarize this information as follows:

ACCIDENT
=========================================
ROUTENUM POSITION KILLED
50 600 6
50 800 8

Define a second event table with LINEAR data. For example, if the pavement condition from milepost 575 to 650 is poor and the pavement condition from milepost 750 to 825 is bad, summarize this information in a PAVEMENT table as follows:

PAVEMENT
==========================================
ROUTENUM FROM TO CONDITION
50 575 650 POOR
50 750 825 BAD

Define a third event table with CONTINOUS LINEAR data. For example, there is a speed limit of 35 mph from beginning to 600, and at milepost 600 the speed limit changes. It is now 45 mph from 600 to 750. At milepost 750, the speed limit changes once again and the limit is 65 mph between 750 and 910.

SPEED
==========================================
ROUTENUM FROM TO MPH
50 505 600 35
50 600 750 45
50 750 910 65
Notice that there is redundant data. For continuous data of this type, the from is implied. Specify just the change point (e.g., 600, 750, 910).

Rewrite the speed table:

SPEED
==========================================
ROUTENUM CHANGEPOINT MPH
50 600 35
50 750 45
50 910 65

Go into tables and define ACCIDENT, PAVEMENT, and SPEED.

tables
DEFINE ACCIDENT
ROUTENUM
3
3
I
POSITION
3
3
I
KILLED
3
3
I
~
ADD
50
600
6
50
800
8
~
list
DEFINE SPEED
ROUTENUM
3
3
I
CHANGEPOINT
3
3
I
MPH
3
3
I
~
ADD
50
600
35
50
750
45
50
910
65
~
LIST
DEFINE PAVEMENT
ROUTENUM
3
3
I
FROM
3
3
I
TO
3
3
I
CONDITION
5
5
C
~
add
50
575
650
POOR
50
750
825
BAD


Q STOP
LIST ACCIDENT
LIST SPEED
LIST PAVEMENT

Go into Arcplot and establish relates between the route table C.RATBUS and the event tables ACCIDENT, SPEED, and PAVEMENT. Set up three relates with the eventsource command.

ap
routes
mape c
routes c bus

eventsource
eventsource add point relate1 accident info linear routenum routenum position
eventsource list relate1
eventmarkers c bus relate1 33
eventlist c bus relate1

eventsource
eventsource add continuous relate2 speed info linear routenum routenum ~
changepoint
eventsource list relate2
eventlines c bus relate2
eventlist
eventlist c bus relate2

eventsource
eventsource add linear relate3 pavement info linear routenum routenum from to
eventsource list relate3
eventlines c bus relate3 12
eventhatch
eventhatch c bus relate1 .1 25 2 7 left ends
q