summaryrefslogtreecommitdiff
path: root/navit/item.h
diff options
context:
space:
mode:
authorrphlx <rphlx@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-06-27 03:58:03 +0000
committerrphlx <rphlx@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-06-27 03:58:03 +0000
commit3579c50d4820901e0cbee871af9f24d14c90123f (patch)
treeab0daa15482af4f48d922f6fd3decc89c4609b97 /navit/item.h
parent72b8f35bccec14e40c2758283548a93edf9ee89b (diff)
downloadnavit-3579c50d4820901e0cbee871af9f24d14c90123f.tar.gz
Add:data_binfile:Initial USA search! Add USA country code to osm2navit. Add item_is_street and item_is_town to item.h. Treat districts as towns to improve search results with US maps.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1175 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/item.h')
-rw-r--r--navit/item.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/navit/item.h b/navit/item.h
index 196317f63..b36420af3 100644
--- a/navit/item.h
+++ b/navit/item.h
@@ -34,6 +34,16 @@ enum item_type {
#include "attr.h"
+
+/* NOTE: we treat districts as towns for now, since
+ a) navit does not implement district search yet
+ b) OSM "place=suburb" maps to type_district in osm2navit. with the OSM USA maps,
+ there are many "suburbs" that users will consider towns (not districts/counties);
+ we want navit's town search to find them
+*/
+#define item_is_town(item) ((item).type >= type_town_label && (item).type <= type_district_label_1e7)
+#define item_is_street(item) ((item).type >= type_street_nopass && (item).type <= type_ferry)
+
#define item_is_equal_id(a,b) ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)
#define item_is_equal(a,b) (item_is_equal_id(a,b) && (a).map == (b).map)