navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
Go to the documentation of this file.
28 #ifndef NAVIT_ROUTE_H
29 #define NAVIT_ROUTE_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
39 };
49 };
52  long segid;
53  int dir;
54 };
57  int count;
59 };
66 struct street_data {
67  struct item item;
68  int count;
69  int flags;
70  int maxspeed;
71  struct coord c[0];
73 };
75 /* prototypes */
76 enum attr_type;
77 enum projection;
78 struct attr;
79 struct attr_iter;
80 struct coord;
81 struct item;
82 struct map;
83 struct map_selection;
84 struct mapset;
85 struct pcoord;
86 struct route;
87 struct route_info;
88 struct street_data;
89 struct tracking;
90 struct vehicleprofile;
91 struct route *route_new(struct attr *parent, struct attr **attrs);
92 struct route *route_dup(struct route *orig);
93 void route_set_mapset(struct route *this_, struct mapset *ms);
94 void route_set_profile(struct route *this_, struct vehicleprofile *prof);
95 struct mapset *route_get_mapset(struct route *this_);
96 struct route_info *route_get_pos(struct route *this_);
97 struct route_info *route_get_dst(struct route *this_);
98 int route_get_path_set(struct route *this_);
99 int route_contains(struct route *this_, struct item *item);
100 int route_destination_reached(struct route *this_);
101 void route_set_position(struct route *this_, struct pcoord *pos);
102 void route_set_position_from_tracking(struct route *this_, struct tracking *tracking, enum projection pro);
103 struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs);
104 void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
105 int route_get_destinations(struct route *this_, struct pcoord *pc, int count);
106 int route_get_destination_count(struct route *this_);
107 void route_get_distances(struct route *this_, struct coord *c, int count, int *distances);
108 void route_set_destination(struct route *this_, struct pcoord *dst, int async);
109 void route_append_destination(struct route *this_, struct pcoord *dst, int async);
110 void route_remove_nth_waypoint(struct route *this_, int n);
111 void route_remove_waypoint(struct route *this_);
112 char* route_get_destination_description(struct route *this_, int n);
113 struct coord route_get_coord_dist(struct route *this_, int dist);
114 struct street_data *street_get_data(struct item *item);
115 struct street_data *street_data_dup(struct street_data *orig);
116 void street_data_free(struct street_data *sd);
117 void route_info_free(struct route_info *inf);
118 struct street_data *route_info_street(struct route_info *rinf);
119 struct map *route_get_map(struct route *this_);
120 struct map *route_get_graph_map(struct route *this_);
121 enum route_path_flags route_get_flags(struct route *this_);
122 int route_has_graph(struct route *this_);
123 void route_set_projection(struct route *this_, enum projection pro);
124 void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
125 int route_set_attr(struct route *this_, struct attr *attr);
126 int route_add_attr(struct route *this_, struct attr *attr);
127 int route_remove_attr(struct route *this_, struct attr *attr);
128 struct attr_iter * route_attr_iter_new(void);
130 int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
131 void route_init(void);
132 void route_destroy(struct route *this_);
133 /* end of prototypes */
134 #ifdef __cplusplus
135 }
136 #endif
138 #endif
void route_set_mapset(struct route *this_, struct mapset *ms)
Sets the mapset of the route passwd.
Definition: route.c:590
int flags
Definition: route.h:69
void route_get_distances(struct route *this_, struct coord *c, int count, int *distances)
Definition: route.c:433
Definition: attr.h:34
Definition: route.h:51
int route_has_graph(struct route *this_)
Whether the route has a valid graph.
Definition: route.c:3866
void route_attr_iter_destroy(struct attr_iter *iter)
Definition: route.c:4016
int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: route.c:3937
Definition: gpx2navit_txt.h:51
int route_set_attr(struct route *this_, struct attr *attr)
Definition: route.c:3873
struct coord route_get_coord_dist(struct route *this_, int dist)
Returns a coordinate at a given distance.
Definition: route.c:2510
struct street_data * street_get_data(struct item *item)
Gets street data for an item.
Definition: route.c:2989
void route_set_profile(struct route *this_, struct vehicleprofile *prof)
Sets the vehicle profile of a route.
Definition: route.c:601
Definition: item.h:99
A mapset.
Definition: mapset.c:44
struct street_data * route_info_street(struct route_info *rinf)
Returns street data for a route info.
Definition: route.c:3166
struct attr_iter * route_attr_iter_new(void)
Definition: route.c:4012
void route_append_destination(struct route *this_, struct pcoord *dst, int async)
Append a waypoint to the route.
Definition: route.c:1271
Definition: route.h:42
Definition: route.h:36
void route_set_projection(struct route *this_, enum projection pro)
Definition: route.c:3870
int route_contains(struct route *this_, struct item *item)
Checks if the route passed contains a certain item within the route path.
Definition: route.c:670
struct route * route_new(struct attr *parent, struct attr **attrs)
Creates a completely new route structure.
Definition: route.c:473
NAVIT_OBJECT struct mapset * ms
Definition: route.c:245
Definition: vehicleprofile.h:33
Definition: track.c:84
Definition: route.h:43
struct route_info * route_get_pos(struct route *this_)
Returns the current position within the route passed.
Definition: route.c:630
void route_init(void)
Definition: route.c:4020
void route_remove_waypoint(struct route *this_)
Definition: route.c:1307
Definition: route.h:41
int dir
Definition: route.h:53
A complete route.
Definition: route.c:243
Definition: route.h:56
int route_get_destination_count(struct route *this_)
Get the destinations count for the route.
Definition: route.c:1189
long segid
Definition: route.h:52
Definition: route.h:46
static double c2
Definition: geod_for.c:27
struct map_selection * route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs)
Returns a single map selection.
Definition: route.c:1003
struct street_data * street_data_dup(struct street_data *orig)
Copies street data.
Definition: route.c:3040
void route_remove_nth_waypoint(struct route *this_, int n)
Remove the nth waypoint of the route.
Definition: route.c:1296
Definition: projection.h:23
struct coord c[0]
Definition: route.h:71
Definition: config_.c:47
Information about a street.
Definition: route.h:66
int route_destination_reached(struct route *this_)
Checks if a route has reached its destination.
Definition: route.c:693
void street_data_free(struct street_data *sd)
Frees street data.
Definition: route.c:3055
void route_destroy(struct route *this_)
Definition: route.c:4025
void route_set_position(struct route *this_, struct pcoord *pos)
This sets the current position of the route passed.
Definition: route.c:949
Definition: attr.h:156
Used to select data from a map.
Definition: map.h:57
void route_set_destination(struct route *this_, struct pcoord *dst, int async)
Start a route given set of coordinates.
Definition: route.c:1257
struct mapset * route_get_mapset(struct route *this_)
Returns the mapset of the route passed.
Definition: route.c:619
Definition: route.h:45
Definition: route.h:38
struct route * route_dup(struct route *orig)
Duplicates a route object.
Definition: route.c:497
struct map * route_get_graph_map(struct route *this_)
Returns a new map containing the route graph.
Definition: route.c:3849
Definition: route.h:44
int route_remove_attr(struct route *this_, struct attr *attr)
Definition: route.c:3923
void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async)
Sets the destination of a route.
Definition: route.c:1135
struct map * route_get_map(struct route *this_)
Returns a new map containing the route path.
Definition: route.c:3833
int order
Definition: map.h:63
Holds information about a map.
Definition: map.c:60
char * route_get_destination_description(struct route *this_, int n)
Returns a description for a waypoint as (type or street_name_systematic) + (label or WayID[osm_wayid]...
Definition: route.c:1200
static double c1
Definition: geod_for.c:27
Definition: route.h:34
struct route_crossing crossing[0]
Definition: route.h:58
int count
Definition: route.h:68
int count
Definition: route.h:57
tuple pos
int route_add_attr(struct route *this_, struct attr *attr)
Definition: route.c:3913
char type[3]
Definition: garmin_img.c:123
Definition: coord.h:34
int maxspeed
Definition: route.h:70
Definition: route.h:37
Definition: route.h:47
Definition: route.h:35
Definition: coord.h:40
enum route_path_flags route_get_flags(struct route *this_)
Returns the flags for the route.
Definition: route.c:3857
int route_get_path_set(struct route *this_)
Checks if the path is calculated for the route passed.
Definition: route.c:655
struct route_info * route_get_dst(struct route *this_)
Returns the destination of the route passed.
Definition: route.c:641
Usually represents a destination or position.
Definition: route.c:205
void * iter
Definition: config_.c:48
void route_info_free(struct route_info *inf)
Destroys a route_info.
Definition: route.c:3148
int route_get_destinations(struct route *this_, struct pcoord *pc, int count)
Definition: route.c:1168
void route_set_position_from_tracking(struct route *this_, struct tracking *tracking, enum projection pro)
Sets a route's current position based on coordinates from tracking.
Definition: route.c:959