From 06efd832dd9ccd0a84546cefbffd1072df7e09e5 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 24 Jul 2007 23:35:43 +0300 Subject: [PATCH] Add noaccess flag. Add osm_location struct. Start to add route waypoint structs --- src/osm.h | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/src/osm.h b/src/osm.h index a3dc6bc..f661f00 100644 --- a/src/osm.h +++ b/src/osm.h @@ -7,6 +7,7 @@ #define W_LINK (1 << 3) #define W_AREA (1 << 4) #define W_NOEXIT (1 << 5) +#define W_NOACCESS (1 << 6) #define ILAT_TURKU 911084432 #define ILON_TURKU 265542144 @@ -105,6 +106,14 @@ typedef enum { WAY_OTHER } way_type_t; +/* Route waypoint types */ +typedef enum { + WPT_START, + WPT_STOP, + WPT_END +} waypoint_type_t; + +/* A place (city,town,village,suburb) */ typedef struct _osm_place osm_place; struct _osm_place { guint32 id; @@ -116,6 +125,15 @@ struct _osm_place { guint32 isin; }; +/* Way node */ +typedef struct _osm_way_node osm_way_node; +struct _osm_way_node { + guint num; + gint lat; + gint lon; +}; + +/* Way */ typedef struct _osm_way osm_way; struct _osm_way { guint32 id; @@ -125,17 +143,28 @@ struct _osm_way { guint32 isin; guint node_num; gdouble dist; + gdouble distance; gchar *name; gchar *ref; gchar *int_ref; + osm_way_node *node_f; + osm_way_node *node_t; + gshort direction; GList *nodes; }; -typedef struct _osm_way_node osm_way_node; -struct _osm_way_node { - guint num; - gint lat; - gint lon; +/* Route waypoint */ +typedef struct _osm_waypoint osm_waypoint; +struct _osm_waypoint { + osm_way *way; + waypoint_type_t type; +}; + +typedef struct _osm_location osm_location; +struct _osm_location { + osm_way *street; + osm_place *primary; + osm_place *secondary; }; #endif -- 2.39.5