diff options
author | pavel <pavel@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-05-23 21:22:52 +0000 |
---|---|---|
committer | pavel <pavel@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-05-23 21:22:52 +0000 |
commit | 5cb23ca97a1162f9b6a8aa17bf02a25b1790f9f2 (patch) | |
tree | 32f23f6b9c609c9bd14c53c67261ef76e474b27a | |
parent | a2204c163a8b1dd7d389f33804a33d3d3383bb4d (diff) | |
download | navit-5cb23ca97a1162f9b6a8aa17bf02a25b1790f9f2.tar.gz |
Add:Core:Add support for cities that do not have is_in tag, trac #338
|
Group them under fake, "unknown" country; but at least user will be
able to search for streets in them, etc.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2282 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/country.c | 1 | ||||
-rw-r--r-- | navit/osm2navit.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/navit/country.c b/navit/country.c index 729349e6b..1bcaad143 100644 --- a/navit/country.c +++ b/navit/country.c @@ -282,6 +282,7 @@ static struct country country[]= { {710, "ZA", "ZA", "ZAF", /* 710 */ _n("South Africa") }, {894, "Z", "ZM", "ZMB", /* 894 */ _n("Zambia")}, {716, "ZW", "ZW", "ZWE", /* 716 */ _n("Zimbabwe")}, + {999, "*", "*", "*", _n("* Unknown, add is_in tags to those cities")}, }; diff --git a/navit/osm2navit.c b/navit/osm2navit.c index 4a9dae3b0..1c4dba264 100644 --- a/navit/osm2navit.c +++ b/navit/osm2navit.c @@ -411,7 +411,8 @@ struct country_table { {752,"Sweden,Sverige,Konungariket Sverige,SE"}, {756,"Schweiz"}, {826,"United Kingdom,UK"}, - {840,"USA"} + {840,"USA"}, + {999,"Unknown"}, }; static GHashTable *country_table_hash; @@ -1478,6 +1479,8 @@ end_node(FILE *out) item_bin_write(item_bin,out); if (item_is_town(*item_bin) && attr_strings[attr_string_label]) { char *tok,*buf=is_in_buffer; + if (!buf[0]) + strcpy(is_in_buffer, "Unknown"); while ((tok=strtok(buf, ","))) { while (*tok==' ') tok++; |