English

How To: Split an arc at a regular interval

Summary

Splitting arcs at regular intervals requires the use of Dynamic Segmentation commands.

The following example generates a coverage containing a single arc. The arc is approximately 14 coverage units long and will be split at a regular interval of 3 units.

Procedure

  1. Generate a coverage containing one arc that is approximately 14 units in length.

    Code:
    Arc: generate testcov

    Generate: line
    ID: 1
    X,Y: 0,0
    X,Y: 10,10
    X,Y: end
    ID: end
    Generate: quit

    Arc: build testcov (!node arc!)

    Arc: list testcov.aat length
    Record length
    1 14.142

  2. Create a route system called ROAD on the arc in TESTCOV.

    Code:
    Usage: ARCROUTE <in_cover> <out_route_system> {in_route_item} {out_route_item}
    {measure_item} {UL | UR | LL | LR} {BLANK | NOBLANK}

    Arc: arcroute testcov road testcov-id road-id length LL
    Building routes from arcs...
    Sorting section table...

    Arc: list testcov.ratroad
    Record ROAD# ROAD-ID
    1 1 1


    Note:
    Several commands allow routes to be created in bulk or interactively. Bulk methods include ARCROUTE, MEASUREROUTE, ARCSECTION, TOUR and PATH. Routes can be created interactively in ArcEdit with the MAKEROUTE command.

  3. Create an event table that lists the measures where the arcs will be split.

    Code:
    Arc: tables

    Tables: define road.eve
    Item Name: road-id 4 5 b
    Item Name: interval 4 12 f 3

    Tables: add
    1
    ROAD-ID: 1
    INTERVAL: 3
    2
    ROAD-ID: 1
    INTERVAL: 6
    3
    ROAD-ID: 1
    INTERVAL: 9
    4
    ROAD-ID: 1
    INTERVAL: 12
    5
    ROAD-ID:
    Tables: list
    Record ROAD-ID INTERVAL
    1 1 3.000
    2 1 6.000
    3 1 9.000
    4 1 12.000

    In the above event table, ROAD-ID contains the User-Id of the route feature that is to be split. The INTERVAL items contain the measure positions along the route where the underlying arc will eventually be split.

    AML can be used to create the event table.

    /* INTERVAL.AML

    /* This macro will help a user to create a
    /* point event table. By default, the event
    /* table created will be called TEMP.EVE.
    /* The feature ID item is called ROUTE-ID
    /* and the measure item is called INTERVAL.


    /* INTERVAL <interval> <max_value> {number_of_routes}

    /* int - the interval at which max will be divided by
    /* max - the highest measure value of a route
    /* num - the number of routes in the route_system
    &ARGS int max num

    &IF [NULL %int%] | [NULL %max%] &THEN
    &RETURN Usage: Interval <interval> <max> {# of routes}

    &IF [NULL %num%] &THEN
    &SETVAR num 1

    &IF [EXISTS temp.eve -INFO] &THEN
    &SETVAR d [DELETE temp.eve -INFO]

    &DATA arc info
    ARC
    DEF TEMP.EVE
    ROUTE-ID,4,5,B
    INTERVAL,4,12,F,3
    [UNQUOTE ' ']
    ADD
    &DO y = 1 &TO %num%
    &DO x = 0 &TO %max% &BY %int%
    %y%
    %x%
    &END
    &END
    [UNQUOTE ' ']
    Q STOP
    &END
    &RETURN

  4. Use the EVENTSOURCE command to establish the 'relate' between the route attribute table (<cover>.rat<subclass>) and the event table.

    Code:
    Arc: eventsource
    Usage: EVENTSOURCE ADD <LINEAR | CONTINUOUS | POINT> <source_name> <table_name>
    {database} {relate_type} {route_key_item} {event_key_item}
    {measure_item} {measure_item}
    Usage: EVENTSOURCE DROP <source_name>
    Usage: EVENTSOURCE LIST {source_name}
    Usage: EVENTSOURCE SAVE <info_file>
    Usage: EVENTSOURCE RESTORE <info_file>

    Arc: eventsource add point source road.eve info ordered road-id road-id interval


    In the EVENTSOURCE example above, the POINT keyword is used to indicate that the event table contains point events. The word SOURCE is used as the name to reference the relate that has been established between the route attribute table and the event table ROAD.EVE. In this example, the route_key_item and event_key_item items that link the two tables are both ROAD-ID.

    If INTERVAL.AML had been used to create the event table, route_key_item and event_key_item would be ROAD-ID and ROUTE-ID, respectively. The INTERVAL item indicates the item in the event table that contains the positions of the events along each route feature.
  5. Preview the position of the point events along the route.
    Code:
    Arc: arcplot
    Arcplot: display 9999
    Arcplot: mapextent testcov
    Arcplot: routes testcov road
    Usage: EVENTMARKERS <cover> <route_system> <event_source> {item | symbol}
    {lookup_table} {offset_item} {lookup_table}
    {ROTATE | PERPENDICULAR}
    Arcplot: eventmarkers testcov road source 3

    Usage: EVENTPOINTTEXT <cover> <route_system> <event_source> {text_item}
    {lookup_table} {offset_item} {lookup_table}
    {PERPENDICULAR {LEFT | RIGHT} {NOFLIP}}

    Arcplot: eventpointtext testcov road source interval # 0.3

    The output should look similar to this:
    [O-Image] Example of point events displayed along a route
  6. Create a new point coverage from the event locations using the EVENTPOINT command.
    Code:
    Arc: precision double double

    Arc: eventpoint testcov road source pointcov
    Creating output coverage POINTCOV ...

    Arc: describe pointcov
    Description of DOUBLE precision coverage pointcov

    FEATURE CLASSES

    Number of Attribute Spatial
    Feature Class Subclass Features data (bytes) Index?
    ------------- -------- --------- ------------ -------
    POINTS 4 32

  7. Download Nodesfrompoints.aml from the ESRI ArcScripts web site. Click the link in the Related Information section below and do a keyword search for 'nodesfrompoints'.
  8. Run Nodesfrompoints.aml to split the arcs in TESTCOV in the point locations found in POINTCOV.

    Code:
    Arc: &run nodesfrompoints
    Usage: NODESFROMPOINTS <splitcov> <pointcov> <search_dist>

    Arc: &run nodesfrompoints testcov pointcov 1

    Arc: describe testcov
    Description of DOUBLE precision coverage testcov

    FEATURE CLASSES

    Number of Attribute Spatial
    Feature Class Subclass Features data (bytes) Index? Topology?
    ------------- -------- --------- ------------ ------- ---------
    ARCS 5 28
    NODES 6 12
    ROUTES/SECTIONS ROAD 1/5 8/32


Related Information