From d4dbb2246cd649f545865a2d8ebb3721fa1f0bee Mon Sep 17 00:00:00 2001 From: mdankov Date: Sun, 21 Dec 2014 21:04:29 +0000 Subject: Add:maptool:Process more osm tags describing way (especially ramp) destination. Part of #1082 fix.|Thank you jandegr git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5980 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/maptool/osm.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'navit/maptool/osm.c') diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index 7de5ff858..ca661ae6d 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -101,6 +101,11 @@ enum attr_strings_type { attr_string_district_name, attr_string_street_name, attr_string_street_name_systematic, + attr_string_street_name_systematic_nat, + attr_string_street_name_systematic_int, + attr_string_ref, + attr_string_exit_to, + attr_string_street_destination, attr_string_house_number, attr_string_label, attr_string_postal, @@ -1161,8 +1166,29 @@ osm_add_tag(char *k, char *v) if (! strcmp(k,"ref")) { if (in_way) attr_strings_save(attr_string_street_name_systematic, v); + /* for exit number of highway_exit poi */ + else attr_strings_save(attr_string_ref, v); level=5; } + if (! strcmp(k,"nat_ref")) { + if (in_way) + attr_strings_save(attr_string_street_name_systematic_nat, v); + level=5; + } + if (! strcmp(k,"int_ref")) { + if (in_way) + attr_strings_save(attr_string_street_name_systematic_int, v); + level=5; + } + if (! strcmp(k,"destination")) { + if (in_way) + attr_strings_save(attr_string_street_destination, v); + level=5; + } + if (! strcmp(k,"exit_to")) { + attr_strings_save(attr_string_exit_to, v); + level=5; + } if (! strcmp(k,"openGeoDB:is_in")) { if (!is_in_buffer[0]) g_strlcpy(is_in_buffer, v, sizeof(is_in_buffer)); @@ -1750,6 +1776,8 @@ osm_end_way(struct maptool_osm *osm) item_bin_add_attr_string(item_bin, def_flags ? attr_street_name : attr_label, attr_strings[attr_string_label]); item_bin_add_attr_string(item_bin, attr_district_name, attr_strings[attr_string_district_name]); item_bin_add_attr_string(item_bin, attr_street_name_systematic, attr_strings[attr_string_street_name_systematic]); + item_bin_add_attr_string(item_bin, attr_street_name_systematic_nat, attr_strings[attr_string_street_name_systematic_nat]); + item_bin_add_attr_string(item_bin, attr_street_destination, attr_strings[attr_string_street_destination]); item_bin_add_attr_longlong(item_bin, attr_osm_wayid, osmid_attr_value); if (debug_attr_buffer[0]) item_bin_add_attr_string(item_bin, attr_debug, debug_attr_buffer); @@ -1831,6 +1859,8 @@ osm_end_node(struct maptool_osm *osm) item_bin_add_attr_string(item_bin, attr_county_name, attr_strings[attr_string_county_name]); item_bin_add_attr_string(item_bin, attr_url, attr_strings[attr_string_url]); item_bin_add_attr_longlong(item_bin, attr_osm_nodeid, osmid_attr_value); + item_bin_add_attr_string(item_bin, attr_ref, attr_strings[attr_string_ref]); + item_bin_add_attr_string(item_bin, attr_exit_to, attr_strings[attr_string_exit_to]); item_bin_add_attr_string(item_bin, attr_debug, debug_attr_buffer); postal=attr_strings[attr_string_postal]; if (postal) { -- cgit v1.2.1