generates a coverage containing point or line events for a route.
[in_cover] - name of coverage containing route.
[event_table] - name of event table.
[out_cover] - coverage to contain event features.
[from_item] - item in [event_table] indicating position or beginning of event.
{POINT/LINE} - event type.
{to_item} - item in [event_table] indicating end of event (required if event type is LINE).
notes
Enter command: additem Item Name: meters Item Width: 10 Item Type: n Item Decimal Places: 2 Start item (default=last item): Item Name: Enter command: calc meters = ( milepost - offset ) * 5280 / 3.2808
EVENT uses a crawler routine to measure distances along arcs. The crawler does not check for redundant vertices; thus if a linear feature straddles a node of the route coverage, a pair of identical vertices will be written.
generate monitoring stations along each route spaced 1 km apart, starting 1 km from the beginning. The statistics for the three routes are as follows:
ROUTES_ID IMPEDANCE 307 9664.1280 310 7923.6720 311 1660.5120If we construct the event table STATIONS.DBF as follows:
ROUTE POSITION STATION_ID 307 1000.0000 307-01 307 2000.0000 307-02 307 3000.0000 307-03 307 4000.0000 307-04 307 5000.0000 307-05 307 6000.0000 307-06 307 7000.0000 307-07 307 8000.0000 307-08 307 9000.0000 307-09 310 1000.0000 310-01 310 2000.0000 310-02 310 3000.0000 310-03 310 4000.0000 310-04 310 5000.0000 310-05 310 6000.0000 310-06 310 7000.0000 310-07 311 1000.0000 311-01then the following routine may be used to generate individual event coverages and reassemble them to create the final point coverage STATIONS:
&routine stations &sv -1 "307 310 311" &sv -2 1 &while &rn %-2 1 3 &do &extract -3 -1 %-2 &if &fn XX000 &do & DELETE XX000 -NQ &end &if &fn XX%-3 &do & DELETE XX%-3 -NQ &end &openw t$res.sml &write "RES ROUTES_ID = %-3" &write " " &write "N" &write "N" &closew RESELECT ROUTES XX000 LINE t$res.sml &openw t$tab.sml &write "SEL STATIONS" &write "RES ROUTE = %-3" &write "SAVE XX000.EVENT" &write "QUIT" &closew TABLES t$tab.sml &r EVENT XX000 XX000.EVENT XX%-3 POSITION &inc -2 &end &if &fn STATIONS &do & DELETE STATIONS -NQ &end &openw t$app.sml &write "XX307" &write "XX310" &write "XX311" &write "END" &closew APPEND STATIONS POINT FEATURES t$app.sml BUILD STATIONS POINT & DELETE XX* -NQ & DEL t$*.sml &returnThe final coverage STATIONS appears as follows:
The desired event table REACHES.DBF is as follows:
ROUTE BEGIN END REACH_ID 307 0.0000 1000.0000 307-01 307 1000.0000 2000.0000 307-02 307 2000.0000 3000.0000 307-03 307 3000.0000 4000.0000 307-04 307 4000.0000 5000.0000 307-05 307 5000.0000 6000.0000 307-06 307 6000.0000 7000.0000 307-07 307 7000.0000 8000.0000 307-08 307 8000.0000 9000.0000 307-09 307 9000.0000 9664.1280 307-10 310 0.0000 1000.0000 310-01 310 1000.0000 2000.0000 310-02 310 2000.0000 3000.0000 310-03 310 3000.0000 4000.0000 310-04 310 4000.0000 5000.0000 310-05 310 5000.0000 6000.0000 310-06 310 6000.0000 7000.0000 310-07 310 7000.0000 7923.6720 310-08 311 0.0000 1000.0000 311-01 311 1000.0000 1660.5120 311-02Routine REACHES is a slight rewrite of routine STATIONS:
&routine reaches &sv -1 "307 310 311" &sv -2 1 &while &rn %-2 1 3 &do ... &write "SEL REACHES" ... &r EVENT XX000 XX000.EVENT XX%-3 BEGIN LINE END &inc -2 &end &if &fn REACHES &do & DELETE REACHES -NQ &end ... APPEND REACHES LINE FEATURES t$app.sml BUILD REACHES LINE ... &returnThe final coverage REACHES appears as follows: