Road API
Overview
The Road API is a collection of functions for centerline location
and road design calculations. These functions are available from
LISP for advanced users to use in their own routines.
The functionality of Road API is implemented in the Carlson
EWORKS.ARX program file. This ARX program file must be loaded
before calling the Road API functions. Use the following LSP code
to load the ARX:
(scload (strcat lspdir$ "eworks"))
The following is a list of currently supported functions (it can be
obtained at any time by calling (cf:road_api):
cl_location_at_pt - calculates the
station-offset and centerline position from a specified centerline
and point
cl_location_at_sta - calculates the
point and vectors for a specified station on a centerline
cl_sta_range - returns the start and
end stations for the specified centerline
profile_z - calculates the
profile elevation for the specified station on the profile
profile_sta_range - returns
the start and end station for the specified profile
road_z - calculates the
road design elevation for the specified point and design
files
cl_location_at_pt
Given a centerline file name and a point, this function calculates
the station-offset and the projected location of the point along
the centerline. On success, the function returns a list of the
station, offset and projected centerline point. On failure, the
function returns nil.
Usage: (cf:road_api
"cl_location_at_pt" file_name point is_rr)
file_name - Full path of
the centerline file to process (string).
point - Coordinates (x,y)
of the point to process (list of reals).
is_rr - Optional integer
parameter for station type (0 = roadway stations (default), 1 =
railroad stations)
cl_location_at_sta
Given a centerline file name and a station, this function
calculates the point on the centerline at the specified station
along with the vectors for the tangent and normal of the centerline
at that station. On success, the function returns a list of the
point on centerline, the tangent vector and the normal vector. On
failure, the function returns nil.
Usage: (cf:road_api
"cl_location_at_sta" file_name station is_rr)
file_name - Full path of
the centerline file to process (string).
station - Target station to
process (real).
is_rr - Optional integer
parameter for station type (0 = roadway stations (default), 1 =
railroad stations)
cl_sta_range
This function simply return the starting and ending stations for
the specified centerline. On success, the function returns a list
of the starting station and the ending station as reals. On
failure, the function returns nil.
Usage: (cf:road_api
"cl_sta_range" file_name is_rr)
file_name - Full path of
the centerline file to process (string).
is_rr - Optional integer
parameter for station type (0 = roadway stations (default), 1 =
railroad stations)
profile_z
Given a profile file name and a station, this function calculates
the elevation on the profile at the specified station. On success,
the function returns the elevation. On failure, the function
returns nil.
Usage: (cf:road_api
"profile_z" file_name station)
file_name - Full path of
the profile file to process (string).
station - Target station on
profile (real).
profile_sta_range
This function simply returns the starting and ending stations for
the specified profile. On success, the function returns a list of
the starting and ending stations as reals. On failure, the function
returns nil.
Usage: (cf:road_api
"profile_sta_range" file_name)
file_name - Full path of
the profile file to process (string).
road_z
This function calculates elevation of a road design at the
specified point. The road design is defined by the design files
names. The centerline, profile and template files are required. The
other design files are optional. On success, the function returns
the elevation. On failure, the function returns nil.
Usage: (cf:road_api "road_z"
point cl_file pro_file tpl_file sup_file tpt_file tpc_file
tpp_file)
point - Coordinates (x,y)
of the point to process (list of reals).
cl_file - Full path of the
centerline file (string).
pro_file - Full path of the
profile file (string).
tpl_file - Full path of the
template file (string).
sup_file - Full path of the
superelevation file (string).
tpt_file - Full path of the
template transition file (string).
tpc_file - Full path of the
template point centerline file (string).
tpp_file - Full path of the
template point profile file (string).