diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-12-03 15:11:22 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-12-03 15:11:22 +0000 |
commit | e9967cb04fcaab6735656850a0496342ff34d85c (patch) | |
tree | 50c3f17b83c3e0005a34212ba4e16f034c1d5b4d /navit | |
parent | 8717332fcd10d05af2e1ffcdafed2300fd443448 (diff) | |
download | navit-e9967cb04fcaab6735656850a0496342ff34d85c.tar.gz |
Add:Core:Added new item types
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1768 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r-- | navit/item_def.h | 19 | ||||
-rw-r--r-- | navit/navit.xml | 34 | ||||
-rw-r--r-- | navit/osm2navit.c | 29 | ||||
-rwxr-xr-x | navit/script/check_itemdef | 30 |
4 files changed, 81 insertions, 31 deletions
diff --git a/navit/item_def.h b/navit/item_def.h index b03feb923..35b652a69 100644 --- a/navit/item_def.h +++ b/navit/item_def.h @@ -279,6 +279,25 @@ ITEM(nav_destination) ITEM(tec_common) ITEM(trackpoint_tracked) ITEM(announcement) +ITEM(poi_post_box) +ITEM(poi_post_office) +ITEM(poi_school_university) +ITEM(poi_school_college) +ITEM(poi_motel) +ITEM(poi_guesthouse) +ITEM(poi_hostel) +ITEM(poi_taxi) +ITEM(poi_prison) +ITEM(poi_kindergarten) +ITEM(poi_shop_butcher) +ITEM(poi_shop_baker) +ITEM(poi_shop_kiosk) +ITEM(poi_soccer) +ITEM(poi_basketball) +ITEM(poi_baseball) +ITEM(poi_climbing) +ITEM(poi_motor_sport) +ITEM(poi_tennis) /* Line */ ITEM2(0x80000000,line) ITEM2(0x80000001,line_unspecified) diff --git a/navit/navit.xml b/navit/navit.xml index fc49a8a40..fc5519ce8 100644 --- a/navit/navit.xml +++ b/navit/navit.xml @@ -1529,52 +1529,52 @@ <itemgra item_types="nav_turnaround_right" order="0-"> <icon src="nav_turnaround_right_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l1_bk" order="0-"> + <itemgra item_types="nav_roundabout_l1" order="0-"> <icon src="nav_roundabout_l1_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r1_bk" order="0-"> + <itemgra item_types="nav_roundabout_r1" order="0-"> <icon src="nav_roundabout_r1_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l2_bk" order="0-"> + <itemgra item_types="nav_roundabout_l2" order="0-"> <icon src="nav_roundabout_l2_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r2_bk" order="0-"> + <itemgra item_types="nav_roundabout_r2" order="0-"> <icon src="nav_roundabout_r2_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l3_bk" order="0-"> + <itemgra item_types="nav_roundabout_l3" order="0-"> <icon src="nav_roundabout_l3_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r3_bk" order="0-"> + <itemgra item_types="nav_roundabout_r3" order="0-"> <icon src="nav_roundabout_r3_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l4_bk" order="0-"> + <itemgra item_types="nav_roundabout_l4" order="0-"> <icon src="nav_roundabout_l4_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r4_bk" order="0-"> + <itemgra item_types="nav_roundabout_r4" order="0-"> <icon src="nav_roundabout_r4_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l5_bk" order="0-"> + <itemgra item_types="nav_roundabout_l5" order="0-"> <icon src="nav_roundabout_l5_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r5_bk" order="0-"> + <itemgra item_types="nav_roundabout_r5" order="0-"> <icon src="nav_roundabout_r5_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l6_bk" order="0-"> + <itemgra item_types="nav_roundabout_l6" order="0-"> <icon src="nav_roundabout_l6_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r6_bk" order="0-"> + <itemgra item_types="nav_roundabout_r6" order="0-"> <icon src="nav_roundabout_r6_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l7_bk" order="0-"> + <itemgra item_types="nav_roundabout_l7" order="0-"> <icon src="nav_roundabout_l7_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r7_bk" order="0-"> + <itemgra item_types="nav_roundabout_r7" order="0-"> <icon src="nav_roundabout_r7_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_l8_bk" order="0-"> + <itemgra item_types="nav_roundabout_l8" order="0-"> <icon src="nav_roundabout_l8_bk.svg" w="32" h="32" /> </itemgra> - <itemgra item_types="nav_roundabout_r8_bk" order="0-"> + <itemgra item_types="nav_roundabout_r8" order="0-"> <icon src="nav_roundabout_r8_bk.svg" w="32" h="32" /> </itemgra> <itemgra item_types="nav_none" order="0-"> @@ -3699,7 +3699,7 @@ <layout name="T@H" font="Liberation Sans"> <layer name="sea" details="0"> <!-- landuse=forest --> - <itemgra item_types="wood" order="0-"> + <itemgra item_types="poly_wood" order="0-"> <polygon color="#72bf81" /> </itemgra> <!-- landuse=residential --> diff --git a/navit/osm2navit.c b/navit/osm2navit.c index c46b1e337..22c78eadc 100644 --- a/navit/osm2navit.c +++ b/navit/osm2navit.c @@ -75,20 +75,21 @@ static char *attrmap={ "n amenity=pharmacy poi_pharmacy\n" "n amenity=place_of_worship,religion=christian poi_church\n" "n amenity=police poi_police\n" - "n amenity=post_office poi_post\n" - "n amenity=post_box poi_post\n" + "n amenity=post_office poi_post_office\n" + "n amenity=post_box poi_post_box\n" "n amenity=public_building poi_public_office\n" "n amenity=restaurant poi_restaurant\n" "n amenity=fast_food poi_fastfood\n" "n amenity=toilets poi_restroom\n" "n amenity=school poi_school\n" - "n amenity=university poi_school\n" - "n amenity=college poi_school\n" + "n amenity=university poi_school_university\n" + "n amenity=college poi_school_college\n" "n amenity=telephone poi_telephone\n" "n amenity=theatre poi_theater\n" "n amenity=townhall poi_townhall\n" "n amenity=tec_common tec_common\n" "n highway=bus_stop poi_bus_stop\n" + "n highway=bus_station poi_bus_station\n" "n highway=mini_roundabout mini_roundabout\n" "n highway=motorway_junction highway_exit\n" "n highway=traffic_signals traffic_signals\n" @@ -106,9 +107,9 @@ static char *attrmap={ "n tourism=camp_site poi_camp_rv\n" "n tourism=caravan_site poi_camp_rv\n" "n tourism=hotel poi_hotel\n" - "n tourism=motel poi_hotel\n" - "n tourism=guest_house poi_hotel\n" - "n tourism=hostel poi_hotel\n" + "n tourism=motel poi_motel\n" + "n tourism=guest_house poi_guesthouse\n" + "n tourism=hostel poi_hostel\n" "n tourism=information poi_information\n" "n tourism=museum poi_museum_history\n" "n tourism=picnic_site poi_picnic\n" @@ -155,6 +156,20 @@ static char *attrmap={ "n amenity=drinking_water poi_potable_water\n" "n amenity=toilets poi_toilets\n" "n tourism=viewpoint poi_viewpoint\n" + "n amenity=taxi poi_taxi\n" + "n amenity=prison poi_prison\n" + "n amenity=kindergarten poi_kindergarten\n" + "n shop=butcher poi_shop_butcher\n" + "n shop=baker poi_shop_baker\n" + "n shop=kiosk poi_shop_kiosk\n" + "n car=car_rental poi_car_rent\n" + "n sport=stadium poi_stadium\n" + "n sport=soccer poi_soccer\n" + "n sport=basketball poi_basketball\n" + "n sport=baseball poi_baseball\n" + "n sport=climbing poi_climbing\n" + "n sport=motor_sports poi_motor_sport\n" + "n sport=tennis poi_tennis\n" "w *=* street_unkn\n" "w contour_ext=elevation_major height_line_1\n" "w contour_ext=elevation_medium height_line_2\n" diff --git a/navit/script/check_itemdef b/navit/script/check_itemdef index 361f87be3..c2d23e458 100755 --- a/navit/script/check_itemdef +++ b/navit/script/check_itemdef @@ -1,26 +1,42 @@ #! /bin/sh -function check_item +function check_item_def { grep -q "[(,]$1)" ../item_def.h || echo "$1 missing" } +function check_item_xml +{ + grep -q "^$1\$" check.$$ || echo "$1 will not be rendered" +} + + +awk '/<layout name="Car"/,/<\/layout/ { if (/<itemgra/) {print $0} }' < ../navit.xml | sed 's/.*item_types="\([^"]*\)".*/\1/' | tr "," "\012" | sort -u >check.$$ +echo item_def.h +grep "^ITEM" ../item_def.h | sed -e "s/ITEM(\(.*\))/\1/" -e "s/ITEM2([^,]*,\(.*\))/\1/" | +while read -r x +do + check_item_xml "$x" +done + +rm -f check.$$ echo osm2navit.c -egrep '^ "[nw] +[^ ]+ +[^ ]+ +' ../osm2navit.c | sed "s/.* //" | +egrep '^ "[nw] +[^ ]+ +[^ ]+' ../osm2navit.c | sed "s/.* //" | sort -u | while read -r x do - check_item "${x%%\\n\"}" + check_item_def "${x%%\\n\"}" done echo "navit.xml" -grep '<item type="' <../navit.xml | cut -d \" -f 2 | tr "," "\012" | +grep '<itemgra item_types="' <../navit.xml | cut -d \" -f 2 | tr "," "\012" | while read -r x do - check_item "$x" + check_item_def "$x" done echo "garmintypes.txt" -grep ^0x ../data/garmin/garmintypes.txt | sed -e 's/[A-Z][A-Z]*, //' -e 's/.*= \([^,]*\),.*/\1/' | +grep "^[0-9]" ../data/garmin/garmintypes.txt | sed -e 's/[A-Z][A-Z]*, //' -e 's/.*= \([^,]*\),.*/\1/' | sort -u | while read -r x do - check_item "$x" + check_item_def "$x" done + |