navit
0.5.3-trunk
|
Location data for a traffic message. More...
#include <traffic.h>
Data Fields | |
struct traffic_point * | at |
struct traffic_point * | from |
struct traffic_point * | to |
struct traffic_point * | via |
struct traffic_point * | not_via |
char * | destination |
char * | direction |
enum location_dir | directionality |
enum location_fuzziness | fuzziness |
enum location_ramps | ramps |
enum item_type | road_type |
char * | road_name |
char * | road_ref |
char * | tmc_table |
int | tmc_direction |
struct traffic_location_priv * | priv |
Location data for a traffic message.
Locations can be either point or linear locations.
Linear locations are indicated by a pair of points and refer to a stretch of road. The entire location must be part of the same road, i.e. either the road name or the road reference must be the same for all affected segments, or all segments must be of the same type and be of a higher order than any road connecting to them directly.
Point locations are indicated by a single point, as well as one or two auxiliary points to indicate direction. Auxiliary points can be omitted if tmc_table
, tmc_direction
and at->tmc_id
are supplied. However, this will only work if the map has accurate TMC data for the location, thus it is recommended to supply an auxiliary point nonetheless.
The order of points is as a driver would encounter them, i.e. first from
, then at
, finally to
.
struct traffic_point* traffic_location::at |
The point for a point location, NULL for linear locations.
Referenced by traffic_dummy_get_messages(), traffic_location_destroy(), traffic_location_equals(), traffic_location_get_point(), traffic_location_get_point_triple(), traffic_location_is_valid(), traffic_location_new(), traffic_location_new_short(), traffic_message_add_segments(), and traffic_message_dump_to_stderr().
char* traffic_location::destination |
A destination, preferably the one given on road signs, indicating that the message applies only to traffic going in that direction. Do not use for bidirectional locations.
Referenced by traffic_location_destroy(), traffic_location_new(), and traffic_message_dump_to_stderr().
char* traffic_location::direction |
A compass direction indicating the direction of travel which this location refers to. Do not use where ambiguous.
Referenced by traffic_location_destroy(), traffic_location_new(), and traffic_message_dump_to_stderr().
enum location_dir traffic_location::directionality |
Indicates whether the message refers to one or both directions of travel.
Referenced by traffic_location_equals(), traffic_location_new(), traffic_location_new_short(), traffic_message_add_segments(), traffic_message_dump_to_stderr(), and traffic_message_parse_events().
struct traffic_point* traffic_location::from |
The start of a linear location, or a point before at
.
Referenced by traffic_dummy_get_messages(), traffic_location_destroy(), traffic_location_equals(), traffic_location_get_point(), traffic_location_get_point_triple(), traffic_location_is_valid(), traffic_location_new(), traffic_location_new_short(), traffic_message_add_segments(), and traffic_message_dump_to_stderr().
enum location_fuzziness traffic_location::fuzziness |
Indicates how precisely the end points are known.
Referenced by traffic_location_get_rect(), traffic_location_new(), traffic_location_new_short(), traffic_message_add_segments(), and traffic_message_dump_to_stderr().
struct traffic_point* traffic_location::not_via |
A point NOT between from
and to
. Required on ring roads unless via
is used; cannot be used together with at
.
Referenced by traffic_location_destroy(), traffic_location_equals(), traffic_location_get_point_triple(), traffic_location_new(), traffic_location_new_short(), traffic_message_add_segments(), and traffic_message_dump_to_stderr().
struct traffic_location_priv* traffic_location::priv |
Internal data, not exposed via the API
Referenced by traffic_location_destroy(), traffic_location_get_rect(), traffic_location_new(), traffic_location_set_enclosing_rect(), traffic_message_restore_segments(), and traffic_xml_end().
enum location_ramps traffic_location::ramps |
Any value other than location_ramps_none
implies that only the specified ramps are affected while the main road is not. In that case, the road*
fields refer to the main road served by the ramp, not the ramp itself. This is mainly intended for compatibility with TMC, where junctions with all their ramps are represented by a single point. Other sources should use coordinate pairs instead.
Referenced by traffic_location_equals(), traffic_location_new(), traffic_message_add_segments(), and traffic_message_dump_to_stderr().
char* traffic_location::road_name |
A road name, if consistent throughout the location.
Referenced by traffic_location_destroy(), traffic_location_match_attributes(), traffic_location_new(), and traffic_message_dump_to_stderr().
char* traffic_location::road_ref |
A road number, if consistent throughout the location.
Referenced by traffic_location_destroy(), traffic_location_match_attributes(), traffic_location_new(), and traffic_message_dump_to_stderr().
enum item_type traffic_location::road_type |
The importance of the road within the road network, must be a road item type. Use line_unspecified
if not known or not consistent.
Referenced by traffic_location_get_rect(), traffic_location_match_attributes(), traffic_location_new(), traffic_location_populate_route_graph(), traffic_message_dump_to_stderr(), traffic_message_parse_events(), and traffic_message_restore_segments().
int traffic_location::tmc_direction |
For messages received via TMC, the direction of the road to which this message applies (positive or negative). Ignored for bidirectional messages.
Referenced by traffic_location_new(), and traffic_message_dump_to_stderr().
char* traffic_location::tmc_table |
For messages received via TMC, the country identifier (CID) and location table number (LTN or TABCD) for the location table to be used for location lookup. The CID is the decimal number stored in the COUNTRIES and LOCATIONDATASETS tables, not the hexadecimal code from the PI (known as CCD in TMC).
Referenced by traffic_location_destroy(), traffic_location_new(), and traffic_message_dump_to_stderr().
struct traffic_point* traffic_location::to |
The end of a linear location, or a point after at
.
Referenced by traffic_dummy_get_messages(), traffic_location_destroy(), traffic_location_equals(), traffic_location_get_point(), traffic_location_get_point_triple(), traffic_location_is_valid(), traffic_location_new(), traffic_location_new_short(), traffic_message_add_segments(), and traffic_message_dump_to_stderr().
struct traffic_point* traffic_location::via |
A point between from
and to
. Required on ring roads unless not_via
is used; cannot be used together with at
.
Referenced by traffic_dummy_get_messages(), traffic_location_destroy(), traffic_location_equals(), traffic_location_get_point_triple(), traffic_location_new(), traffic_location_new_short(), and traffic_message_dump_to_stderr().