diff options
author | Stefan Wildemann <metalstrolch@users.noreply.github.com> | 2020-04-30 12:23:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 12:23:18 +0200 |
commit | c556f7962672d894fa9170b055fcd9ea2e0ce741 (patch) | |
tree | 62a9fa69b383cfcc2b3a745cd153e5e5506b62b6 | |
parent | 54fd092de942f12133b67bc0118ba6de879d39d7 (diff) | |
download | navit-c556f7962672d894fa9170b055fcd9ea2e0ce741.tar.gz |
Add:Core:Add mapfeatures (#990)
* map:osm add caves, cliffs and dams
* Add rail_narrow_gauge to car layout
* Add:map: use descriprion if no name tag
-rw-r--r-- | navit/icons/cave.svg | 40 | ||||
-rw-r--r-- | navit/item_def.h | 3 | ||||
-rw-r--r-- | navit/maptool/osm.c | 9 | ||||
-rw-r--r-- | navit/navit_layout_car_shipped.xml | 17 |
4 files changed, 67 insertions, 2 deletions
diff --git a/navit/icons/cave.svg b/navit/icons/cave.svg new file mode 100644 index 000000000..c1a900573 --- /dev/null +++ b/navit/icons/cave.svg @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="64" + height="64" + id="svg7186"> + <defs + id="defs7188" /> + <metadata + id="metadata7191"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1"> + <path + d="m 3.5433071,38.283465 c 0,0 3.5433071,0 10.6299209,0 0,-10.629922 7.086615,-17.716536 17.716536,-17.716536 10.629921,0 17.716535,7.086614 17.716535,17.716536 7.086614,0 10.629921,0 10.629921,0" + id="path7222" + style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m 31.889764,42.740158 a 3.5433071,3.5433071 0 1 1 -7.086615,0 3.5433071,3.5433071 0 1 1 7.086615,0 z" + transform="translate(3.5433073,-5.3657844)" + id="path7992" + style="color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + </g> +</svg> diff --git a/navit/item_def.h b/navit/item_def.h index aedf1b536..d5627bf5c 100644 --- a/navit/item_def.h +++ b/navit/item_def.h @@ -365,6 +365,7 @@ ITEM(nav_exit_left) ITEM(nav_exit_right) ITEM(nav_keep_left) ITEM(nav_keep_right) +ITEM(poi_cave) ITEM2(0x7fffffe0,poi_customg) ITEM(poi_customh) ITEM(poi_customi) @@ -524,6 +525,7 @@ ITEM(forest_way_3) ITEM(forest_way_4) ITEM(former_itinerary) ITEM(former_itinerary_part) +ITEM(cliff) /* Area */ ITEM2(0xc0000000,area) ITEM2(0xc0000001,area_unspecified) @@ -635,4 +637,5 @@ ITEM(poly_orchard) ITEM(poly_plantnursery) ITEM(poly_port) ITEM(poly_saltpond) +ITEM(poly_dam) ITEM2(0xffffffff,last) diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index ddf4e99a1..ef6e90a71 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -543,7 +543,7 @@ static char *attrmap= { "? shop=photo poi_shop_photo\n" "? shop=shoes poi_shop_shoes\n" "? shop=supermarket poi_shopping\n" - "? shop=mall poi_mall\n" + "? shop=mall poi_mall\n" "? sport=10pin poi_bowling\n" "? sport=baseball poi_baseball\n" "? sport=basketball poi_basketball\n" @@ -568,6 +568,7 @@ static char *attrmap= { "? tourism=theme_park poi_resort\n" "? tourism=viewpoint poi_viewpoint\n" "? tourism=zoo poi_zoo\n" + "n natural=cave_entrance poi_cave\n" "n traffic_sign=city_limit traffic_sign_city_limit\n" "n highway=speed_camera tec_common\n" "w *=* street_unkn\n" @@ -743,6 +744,7 @@ static char *attrmap= { "w natural=water poly_water\n" "w natural=wetland poly_mud\n" "w natural=wood poly_wood\n" + "w natural=cliff cliff\n" "w piste:type=downhill,piste:difficulty=advanced piste_downhill_advanced\n" "w piste:type=downhill,piste:difficulty=easy piste_downhill_easy\n" "w piste:type=downhill,piste:difficulty=expert piste_downhill_expert\n" @@ -784,6 +786,7 @@ static char *attrmap= { "w waterway=river water_river\n" "w waterway=riverbank poly_water\n" "w waterway=stream water_stream\n" + "w waterway=dam poly_dam\n" "w barrier=ditch ditch\n" "w barrier=hedge hedge\n" "w barrier=fence fence\n" @@ -1161,6 +1164,10 @@ void osm_add_tag(char *k, char *v) { if (! g_strcmp0(k,"name")) { attr_strings_save(attr_string_label, v); level=5; + } else if (! g_strcmp0(k,"description")) { + /* try description if no name is there */ + attr_strings_save(attr_string_label, v); + level=5; } if (! g_strcmp0(k,"addr:email")) { attr_strings_save(attr_string_email, v); diff --git a/navit/navit_layout_car_shipped.xml b/navit/navit_layout_car_shipped.xml index b459219fa..d03a9997f 100644 --- a/navit/navit_layout_car_shipped.xml +++ b/navit/navit_layout_car_shipped.xml @@ -362,6 +362,11 @@ <polygon color="#d7804a"/> <text text_size="5"/> </itemgra> + <itemgra item_types="poly_dam" order="12-"> + <polygon color="#adadad"/> + <polyline color="#444444"/> + <text text_size="5"/> + </itemgra> <itemgra item_types="poly_water,poly_basin,poly_reservoir" order="0-"> <polygon color="#82c8ea"/> <polyline color="#5096b8"/> @@ -450,6 +455,10 @@ <polyline color="#696969" width="3"/> <polyline color="#ffffff" width="1" dash="5,5"/> </itemgra> + <itemgra item_types="rail_narrow_gauge" order="6-"> + <polyline color="#696969" width="3"/> + <polyline color="#ffffff" width="1" dash="4,4"/> + </itemgra> <itemgra item_types="ferry" order="5-"> <polyline color="#000000" width="1" dash="10"/> </itemgra> @@ -1311,6 +1320,9 @@ <itemgra item_types="rail_tram" order="10-"> <polyline color="#606060" width="2"/> </itemgra> + <itemgra item_types="cliff" order="12-"> + <polyline color="#606060" width="1"/> + </itemgra> </layer> <layer name="labels"> <itemgra item_types="house_number" order="15-"> @@ -1570,6 +1582,9 @@ <itemgra item_types="poi_attraction" order="11-"> <icon src="attraction.png"/> </itemgra> + <itemgra item_types="poi_cave" order="11-"> + <icon src="cave.png"/> + </itemgra> <itemgra item_types="poi_cafe" order="12-"> <icon src="cafe.png"/> </itemgra> @@ -2044,7 +2059,7 @@ </itemgra> </layer> <layer name="POI Labels"> - <itemgra item_types="poi_airport,town_ghost,poi_hotel,poi_car_parking,poi_car_dealer_parts,poi_car_sharing,poi_fuel,poi_shopping,poi_attraction,poi_cafe,poi_bar,poi_pub,highway_exit,poi_camp_rv,poi_museum_history,poi_hospital,poi_dining,poi_fastfood,poi_police,poi_autoservice,poi_bank,poi_atm,poi_bus_station,poi_bus_stop,poi_business_service,poi_car_rent,poi_church,poi_bahai,poi_buddhist,poi_hindu,poi_islamic,poi_jain,poi_jewish,poi_pagan,poi_pastafarian,poi_shinto,poi_sikh,poi_taoist,poi_cinema,poi_concert,poi_drinking_water,poi_emergency,poi_fair,poi_fish,poi_government_building,poi_hotspring,poi_information,poi_justice,poi_landmark,poi_library,poi_mall,poi_manmade_feature,poi_marine,poi_marine_type,poi_mark,poi_oil_field,poi_peak,poi_personal_service,poi_pharmacy,poi_post_office,poi_public_office,poi_rail_halt,poi_rail_station,poi_rail_tram_stop,poi_repair_service,poi_resort,poi_restaurant,poi_restricted_area,poi_sailing,poi_scenic_area,poi_school,poi_service,poi_shop_bicycle,poi_shop_retail,poi_skiing,poi_social_service,poi_sport,poi_stadium,poi_swimming,poi_theater,poi_townhall,poi_trail,poi_truck_stop,poi_tunnel,poi_worship,poi_wrecker,poi_zoo,poi_biergarten,poi_castle,poi_ruins,poi_memorial,poi_monument,poi_shelter,poi_fountain,poi_viewpoint,vehicle" order="14-"> + <itemgra item_types="poi_airport,town_ghost,poi_hotel,poi_car_parking,poi_car_dealer_parts,poi_car_sharing,poi_fuel,poi_shopping,poi_cave,poi_attraction,poi_cafe,poi_bar,poi_pub,highway_exit,poi_camp_rv,poi_museum_history,poi_hospital,poi_dining,poi_fastfood,poi_police,poi_autoservice,poi_bank,poi_atm,poi_bus_station,poi_bus_stop,poi_business_service,poi_car_rent,poi_church,poi_bahai,poi_buddhist,poi_hindu,poi_islamic,poi_jain,poi_jewish,poi_pagan,poi_pastafarian,poi_shinto,poi_sikh,poi_taoist,poi_cinema,poi_concert,poi_drinking_water,poi_emergency,poi_fair,poi_fish,poi_government_building,poi_hotspring,poi_information,poi_justice,poi_landmark,poi_library,poi_mall,poi_manmade_feature,poi_marine,poi_marine_type,poi_mark,poi_oil_field,poi_peak,poi_personal_service,poi_pharmacy,poi_post_office,poi_public_office,poi_rail_halt,poi_rail_station,poi_rail_tram_stop,poi_repair_service,poi_resort,poi_restaurant,poi_restricted_area,poi_sailing,poi_scenic_area,poi_school,poi_service,poi_shop_bicycle,poi_shop_retail,poi_skiing,poi_social_service,poi_sport,poi_stadium,poi_swimming,poi_theater,poi_townhall,poi_trail,poi_truck_stop,poi_tunnel,poi_worship,poi_wrecker,poi_zoo,poi_biergarten,poi_castle,poi_ruins,poi_memorial,poi_monument,poi_shelter,poi_fountain,poi_viewpoint,vehicle" order="14-"> <circle color="#606060" radius="0" width="0" text_size="10"/> </itemgra> <itemgra item_types="poi_custom0,poi_custom1,poi_custom2,poi_custom3,poi_custom4,poi_custom5,poi_custom6,poi_custom7,poi_custom8,poi_custom9,poi_customa,poi_customb,poi_customc,poi_customd,poi_custome,poi_customf" order="14-"> |