English

How To: Create a Dynamic Segmentation demo No. 5

Procedure

This demo provides all the dynamic segmentation commands in Arcplot.

Arcplot commands that work on routes:

ROUTES
ROUTELINES
ROUTEENDS
ROUTEHATCH
ROUTEERRORS
ROUTETEXT
ROUTESPOT

Arcplot commands that work on sections:

SECTIONS
SECTIONLINES
SECTIONENDS
SECTIONHATCH
SECTIONTEXT
SECTIONSPOT

Arcplot commands that work on event databases:

EVENTSOURCE
EVENTLIST
EVENTMARKERS
EVENTPOINTTEXT
EVENTLINES
EVENTLINETEXT
EVENTHATCH
EVENTENDS

IDENTIFY

Instructions provided describe how to use all the above commands by working on a simple line cover named C.
| |
| |
| start end |
| ******************************* |
| bus-id = 10 |
| |
| |

arc60>cw demo5
w demo5
w
generate c
line
1
100,0
1000,0
end
2
0,-200
0,200
end
3
1100,-200
1100,200
end
end
quit
clean c # # # line
list c.aat

Go into arcedit and create a route named BUS. Give it a BUS-ID = 10

&term 9999
display 9999 3
ae
editc c
de arc ids node section.bus route.bus arrows
setdrawsym 11 2
draw
createf section.bus
add Select the horizontal line with option 1
Hit 3 to make the full arc a section
Hit 9 to quit
Leave the vertical lines alone.

makeroute 10 * Enter left end of horizontal line as start point.
sel all
list $all
res $routeid = 0
delete
nsel
draw
drawsel
list arclink# f-meas t-meas
save
q
describe c
list c.ratbus
list c.secbus

Go into tables and define a point event database named ACCIDENT and a linear event database named PAVEMENT:

TABLES
DEFINE ACCIDENT
BUS-ID
3
3
I
POSITION
3
3
I
KILLED
3
3
I
~
ADD
10
300
2
10
500
3
10
800
6
~
LIST

DEFINE PAVEMENT
BUS-ID
3
3
I
FROM
3
3
I
TO
3
3
I
CONDITION
6
6
C
~
ADD
10
200
400
FAIR
10
600
850
POOR
~
LIST
Q STOP
LIST ACCIDENT

BUS-ID POSITION KILLED
10 300 2
10 500 3
10 800 6

LIST PAVEMENT

BUS-ID FROM TO CONDITION
10 200 400 FAIR
10 600 850 POOR

LIST C.RATBUS

BUS# BUS-ID
1 10

Note:
The link item between these three tables is BUS-ID.

Go into Arcplot and setup a map composition named TEST.MAP. Try each command with a different option and use MDELETE to clear up any work throughout the procedure.

ap
map test.map
pagesize 20 14
box 0 0 20 14
mape c
mappos cen cen
arcs c
linecolor 2
routes c bus
mdelete
linecolor 5
routes c bus
mdelete

The ROUTELINES command may be used to change the symbol for drawing routes:

routelines
routelines c bus 23
mdelete
mfresh

Experiment by drawing the routelines at an offset of one page units:

routelines c bus 23 # 1

Try again with a negative offset and a different line symbol:

routelines c bus 25 # -1
routelines c bus 22 # 1.5
routelines c bus 22 # -1.5
mdelete
mdelete
mdelete
mdelete
mdelete
mfresh

The SECTION and SECTIONLINES commands behave similarly:

sections
sections c bus
linesym 33
sections c bus
sectionlines
sectionlines c bus 33 # 1
sectionlines c bus 33 # -1
sectionlines c bus 31 # 1.5
mdelete
mdelete
mdelete
mdelete

The ROUTEERRORS command is useful in highlighting errors in routes:

routeerrors
routeerrors c bus positions
routeerrors c bus measures

Errors are not displayed, because there are none. Try the ROUTEENDS command to designate the start and end point of routes:

**** SET UP TEXTFONT, TEXTSIZE, TEXTPRECISION *******

Before bringing up any text, the following must be set up; otherwise, they would show up in varying sizes with a long string of decimal places.

textfont 93726
textcolor 2
textsize .5
textprecision 2
routeends
routeends c bus .3
mdelete
routeends c bus .3 2
mdelete
routeends c bus .3 3
mdelete
routeends c bus .3 5
mdelete
routeends c bus .3 3 center
mdelete
mfresh
routeends c bus .5 2 right
mdelete
routeends c bus .5 2 center
mdelete
mfresh

The SECTIONENDS command works in the same manner. In the example, the route is made up of only one section, so there is no difference:

sectionends
sectionends c bus .5 3 center
mdelete
sectionends c bus .5 3 right
mdelete

Try out the ROUTEHATCH command:

routehatch

The hatch length should be .5 page units. Place a hatch at every 5th coverage unit and number every 10th hatch:

routehatch c bus .5 5 10
mdelete

Use a different symbol = 2:

routehatch c bus .5 5 10 2
mdelete

Put the hatch to the right:

routehatch c bus .5 5 10 2 right
mdelete

routehatch c bus .5 5 10 2 center
mdelete
routehatch c bus .2 10 20 2 center
mdelete
routehatch c bus .2 10 40 2 center
mdelete

Force text at the ends:

routehatch bus .2 10 40 2 center ends
mdelete
routehatch c bus .2 10 20 2 center ends
mdelete

The SECTIONHATCH command is similar:

sectionhatch
sectionhatch c bus .5 5 20 3
mdelete

If decimals are not wanted:

textprecision 0
sectionhatch c bus .5 5 20 3
sectionhatch c bus .5 5 20 3 right
mdelete
mdelete
sectionhatch c bus .5 5 40 2
mdelete
sectionhatch c bus .5 5 40 2 left ends
sectionhatch c bus .5 5 40 3 right ends
mdelete
mdelete

Try out ROUTETEXT:

routetext
routetext c bus bus-id
mdelete

Put the routetext at an offset of three pageunits:

routetext c bus bus-id # 3
routetext b bus bus-id # -1
routetext c bus bus-id # -1
routetext c bus bus-id # 1
mdelete
mdelete
mdelete
mdelete
mfresh

Try putting in a text string. Triple quotes must be used:

routetext c bus '''THIS IS BUS ROUTE #10'''
routetext c bus '''THIS IS BUS ROUTE #10''' # -1
routetext c bus '''THIS IS BUS ROUTE #10''' # -2
mdelete
mdelete
mdelete
mfresh

The SECTIONTEXT command works similarly:

sectiontext
sectiontext c bus bus-id
sectiontext c bus '''this is a section'''
mdelete
mdelete
sectiontext c bus '''this is a section''' # -1
mdelete

Try the ROUTESPOT command:

&sys arc list c.ratbus

There are two items in the c.ratbus. They are BUS# and BUS-ID. They have values of 1 and 10. Create a pie chart for these two items with symbols 2 and 3:

routespot
routespot box c bus 1.0 bus# 2 bus-id 3
mdelete

Increase the size of the circle to 2.0 pageunits:

routespot circle c bus 2.0 bus# 2 bus-id 3
mdelete

Make it even bigger by setting it to 3.0 pageunits:

routespot circle c bus 3.0 bus# 2 bus-id 3
mdelete

Use different symbols for shading:

routespot circle c bus 3.0 bus# 5 bus-id 7
mdelete

Use a box in place of a circle:

routespot box c bus 3.0 bus# 2 bus-id 3
mdelete
mfresh

Try these with the SECTIONSPOT command:

&sys arc list c.secbus

Use three items, arclink#, bus#, and bus-id to create the pie chart. Use symbols 2, 3, and 4 to shade these items:

sectionspot
sectionspot circle c bus 3 arclink# 2 bus# 3 bus-id 4
mdelete

Use the outline option:

sectionspot circle c bus 3 arclink# 2 bus# 3 bus-id 4 outline
mdelete
mfresh

Set up a relate named P to the point event database ACCIDENT:

eventsource
eventsource add point p accident info linear bus-id bus-id position
eventsource list
eventmarkers
eventmarkers c bus p 20
mdelete
eventmarkers c bus p 21
mdelete
eventmarkers c bus p 22
mdelete

Use some offsets:

eventmarkers c bus p 22 # 1
mdelete
eventmarkers c bus p 22 # -1
mdelete

Instead of specifying the symbol to draw the points, specify the item 'KILLED'. It has values 2, 3, and 6. These would be treated as symbol numbers:

eventmarkers c bus p killed
mdelete
eventlist
eventlist c bus p
eventmarkers c bus p killed # .5
eventmarkers c bus p killed # -.5
mdelete
mdelete
mdelete
mfresh

Use the IDENTIFY command to point to a marker to get all the information about it.

eventmarkers c bus p killed
identify
identify c event bus * p

Point to a marker and 'no feature selected' is returned. This is normal. The SEARCHTOLERANCE needs to be set up first:

searchtolerance
searchtolerance route 5

identify c event bus * p

Try the EVENTPOINTTEXT command:

eventpointtext
eventpointtext c bus p killed
mdelete
eventpointtext c bus p killed # -1
eventpointtext c bus p position
mdelete
mdelete
textsize .3
eventpointtext c bus p '''accident'''

Try out the EVENTENDS command:

eventends
textsize .5
mdelete
eventends c bus p .5 position
mdelete
eventends c bus p .5 position center
mdelete

Set up a second relate named L to the linear event database PAVEMENT:

eventsource
eventsource add linear l pavement info linear bus-id bus-id from to
eventsource list
eventends
eventends c bus l .3 2
mdelete
eventends c bus l .3 3
mdelete
eventends c bus l .3 3 right
mdelete
eventlist

Try out the EVENTHATCH command with the various options:

eventhatch
eventhatch c bus l .3 10 5 2
eventhatch c bus l .3 10 5 2
eventhatch c bus l .3 10 5 3 right
mdelete
mdelete
eventhatch c bus l .3 10 5 3 center
mdelete
eventhatch c bus l .3 10 5 2 center
mdelete

Try the EVENTLINES commands to draw out linear events:

eventlines
eventlines c bus l 2
mdelete
mfresh
mdelete
eventlines c bus l 2 # .5
eventlines c bus l 2 # -.5
mdelete
eventlines c bus l 23 # .1
eventlines c bus l 24 # -.1
mdelete
mdelete
mdelete

Try the EVENTLINETEXT command:

eventlinetext
eventlinetext c bus l condition
eventlinetext c bus l condition # -1
eventlinetext c bus l condition # -2
mdelete
mdelete
mdelete
eventlinetext c bus l '''pavement'''
eventlinetext
eventlinetext c bus l '''pavement''' # 1.5
q
Note:
Why were the two vertical lines placed in the cover C and never really used? They are simply dummy lines to widen the mapextent of the coverage. If they are taken away, the mapextent shrinks and some of the hatchtext is clipped at the ends.