navit 0.5.3-trunk
Loading...
Searching...
No Matches
route.h
Go to the documentation of this file.
1
28#ifndef NAVIT_ROUTE_H
29#define NAVIT_ROUTE_H
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "coord.h"
36#include "item.h"
37
44
54
56 long segid;
57 int dir;
58};
59
61 int count;
63};
64
71 struct item item;
72 int count;
73 int flags;
75 struct coord c[0];
77};
78
79/* prototypes */
80enum attr_type;
81enum projection;
82struct attr;
83struct attr_iter;
84struct coord;
85struct item;
86struct map;
87struct map_selection;
88struct mapset;
89struct pcoord;
90struct route;
91struct route_info;
92struct street_data;
93struct tracking;
94struct vehicleprofile;
95struct route *route_new(struct attr *parent, struct attr **attrs);
96struct route *route_dup(struct route *orig);
97void route_set_mapset(struct route *this_, struct mapset *ms);
98void route_set_profile(struct route *this_, struct vehicleprofile *prof);
99struct mapset *route_get_mapset(struct route *this_);
100struct route_info *route_get_pos(struct route *this_);
101struct route_info *route_get_dst(struct route *this_);
102int route_get_path_set(struct route *this_);
103int route_contains(struct route *this_, struct item *item);
104int route_destination_reached(struct route *this_);
105void route_set_position(struct route *this_, struct pcoord *pos);
106void route_set_position_from_tracking(struct route *this_, struct tracking *tracking, enum projection pro);
107struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs);
108void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
109int route_get_destinations(struct route *this_, struct pcoord *pc, int count);
110int route_get_destination_count(struct route *this_);
111void route_get_distances(struct route *this_, struct coord *c, int count, int *distances);
112void route_set_destination(struct route *this_, struct pcoord *dst, int async);
113void route_append_destination(struct route *this_, struct pcoord *dst, int async);
114void route_remove_nth_waypoint(struct route *this_, int n);
115void route_remove_waypoint(struct route *this_);
116char *route_get_destination_description(struct route *this_, int n);
117struct coord route_get_coord_dist(struct route *this_, int dist);
118struct street_data *street_get_data(struct item *item);
119struct street_data *street_data_dup(struct street_data *orig);
120void street_data_free(struct street_data *sd);
121void route_info_free(struct route_info *inf);
122struct street_data *route_info_street(struct route_info *rinf);
123struct map *route_get_map(struct route *this_);
124struct map *route_get_graph_map(struct route *this_);
125enum route_path_flags route_get_flags(struct route *this_);
126int route_has_graph(struct route *this_);
127void route_set_projection(struct route *this_, enum projection pro);
128void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
129int route_set_attr(struct route *this_, struct attr *attr);
130int route_add_attr(struct route *this_, struct attr *attr);
131int route_remove_attr(struct route *this_, struct attr *attr);
132struct attr_iter *route_attr_iter_new(void);
134int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
135void route_init(void);
136void route_destroy(struct route *this_);
137/* end of prototypes */
138#ifdef __cplusplus
139}
140#endif
141
142#endif
attr_type
Definition attr_type_def.h:11
char type[3]
Definition garmin_img.c:2
static double c2
Definition geod_for.c:27
static double c1
Definition geod_for.c:27
const int distances[]
Set of simplified distance values that are easy to be pronounced. Used for the 'vocabulary_distances'...
Definition navigation.c:213
struct navit struct traffic_methods struct attr ** attrs
Definition plugin_def.h:36
static struct pcoord c
Definition popup.c:375
projection
Definition projection.h:23
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:953
struct coord route_get_coord_dist(struct route *this_, int dist)
Returns a coordinate at a given distance.
Definition route.c:2763
struct map * route_get_graph_map(struct route *this_)
Returns a new map containing the route graph.
Definition route.c:4125
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:607
int route_has_graph(struct route *this_)
Whether the route has a valid graph.
Definition route.c:4150
route_path_flags
Definition route.h:38
@ route_path_flag_none
Definition route.h:39
@ route_path_flag_async
Definition route.h:41
@ route_path_flag_no_rebuild
Definition route.h:42
@ route_path_flag_cancel
Definition route.h:40
void route_info_free(struct route_info *inf)
Destroys a route_info.
Definition route.c:3402
route_status
Definition route.h:45
@ route_status_building_path
Definition route.h:49
@ route_status_not_found
Definition route.h:48
@ route_status_building_graph
Definition route.h:50
@ route_status_destination_set
Definition route.h:47
@ route_status_path_done_new
Definition route.h:51
@ route_status_no_destination
Definition route.h:46
@ route_status_path_done_incremental
Definition route.h:52
struct route * route_dup(struct route *orig)
Duplicates a route object.
Definition route.c:437
void route_attr_iter_destroy(struct attr_iter *iter)
Definition route.c:4314
struct attr_iter * route_attr_iter_new(void)
Definition route.c:4310
void route_append_destination(struct route *this_, struct pcoord *dst, int async)
Append a waypoint to the route.
Definition route.c:1258
struct route_info * route_get_pos(struct route *this_)
Returns the current position within the route passed.
Definition route.c:568
struct street_data * street_get_data(struct item *item)
Gets street data for an item.
Definition route.c:3244
int route_get_destination_count(struct route *this_)
Get the destinations count for the route.
Definition route.c:1176
void route_init(void)
Definition route.c:4318
int route_remove_attr(struct route *this_, struct attr *attr)
Definition route.c:4220
void route_set_projection(struct route *this_, enum projection pro)
Definition route.c:4167
void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async)
Sets the destination of a route.
Definition route.c:1108
struct street_data * street_data_dup(struct street_data *orig)
Copies street data.
Definition route.c:3294
struct street_data * route_info_street(struct route_info *rinf)
Returns street data for a route info.
Definition route.c:3418
void route_set_position(struct route *this_, struct pcoord *pos)
This sets the current position of the route passed.
Definition route.c:888
void route_set_destination(struct route *this_, struct pcoord *dst, int async)
Start a route given set of coordinates.
Definition route.c:1244
int route_destination_reached(struct route *this_)
Checks if a route has reached its destination.
Definition route.c:629
void route_set_profile(struct route *this_, struct vehicleprofile *prof)
Sets the vehicle profile of a route.
Definition route.c:541
void route_remove_nth_waypoint(struct route *this_, int n)
Remove the nth waypoint of the route.
Definition route.c:1283
struct map * route_get_map(struct route *this_)
Returns a new map containing the route path.
Definition route.c:4111
struct mapset * route_get_mapset(struct route *this_)
Returns the mapset of the route passed.
Definition route.c:558
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:898
void street_data_free(struct street_data *sd)
Frees street data.
Definition route.c:3309
struct route * route_new(struct attr *parent, struct attr **attrs)
Creates a completely new route structure.
Definition route.c:414
int route_get_destinations(struct route *this_, struct pcoord *pc, int count)
Retrieves destinations from the route.
Definition route.c:1155
int route_set_attr(struct route *this_, struct attr *attr)
Definition route.c:4170
enum route_path_flags route_get_flags(struct route *this_)
Returns the flags for the route.
Definition route.c:4132
int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition route.c:4234
int route_add_attr(struct route *this_, struct attr *attr)
Definition route.c:4210
void route_get_distances(struct route *this_, struct coord *c, int count, int *distances)
Definition route.c:375
void route_set_mapset(struct route *this_, struct mapset *ms)
Sets the mapset of the route passwd.
Definition route.c:530
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:1187
void route_destroy(struct route *this_)
Definition route.c:4323
void route_remove_waypoint(struct route *this_)
Definition route.c:1294
struct route_info * route_get_dst(struct route *this_)
Returns the destination of the route passed.
Definition route.c:578
int route_get_path_set(struct route *this_)
Checks if the path is calculated for the route passed.
Definition route.c:592
Definition config_.c:47
void * iter
Definition config_.c:48
Definition attr.h:138
Definition coord.h:33
Represents an object on a map.
Definition item.h:122
Used to select data from a map.
Definition map.h:63
int order
Definition map.h:69
Definition map.c:55
Definition mapset.c:39
Definition gpx2navit_txt.h:50
Definition coord.h:51
Definition route.h:55
int dir
Definition route.h:57
long segid
Definition route.h:56
Definition route.h:60
int count
Definition route.h:61
struct route_crossing crossing[0]
Definition route.h:62
Usually represents a destination or position.
Definition route.c:163
int pos
Definition route.c:166
A complete route.
Definition route.c:206
NAVIT_OBJECT struct mapset * ms
Definition route.c:208
Information about a street.
Definition route.h:70
int flags
Definition route.h:73
int maxspeed
Definition route.h:74
struct coord c[0]
Definition route.h:75
int count
Definition route.h:72
Definition track.c:84
Definition vehicleprofile.h:27