Faking Dynamic Segmentation

Dynamic segmentation allows you to analyze and map features based on their positions along a route; such features are maintained in tabular format ("event tables"). Although PC ARC/INFO does not support dynamic segmentation, it is possible to maintain event tables for a route coverage and then generate the physical features on the fly using the following routine.


&r EVENT [in_cover] [event_table] [out_cover] [from_item] {POINT/LINE} {to_item}

generates a coverage containing point or line events for a route.


arguments

[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

discussion

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.


To download the install pack, click HERE. Unzip in a temporary directory and execute EVENT.BAT.


EXAMPLE ONE: Generating Point Events

Given three routes -- 307, 310, and 311 -- in route coverage ROUTES:

Figure 1

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.5120
If 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-01
then 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
&return
The final coverage STATIONS appears as follows:

Figure 2


EXAMPLE TWO: Generating Linear Events

For the same three routes, generate linear study reaches corresponding to the line segments between the monitoring stations, including the endpoints of the routes.

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-02
Routine 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
...
&return
The final coverage REACHES appears as follows:

Figure 3


Return to ArcTips page