Skip to content

Commit

Permalink
fix:maptool:better map aerodroms and military areas (#1022)
Browse files Browse the repository at this point in the history
* fix:maptool:better map aerodroms and military areas

This commit uses more complex rule set to map aerodromes and military
landuses depending on tag combination avoiding duplication of the area
in binfile.

For example military airports are quite often tagged:
landuse=military
military=airfield
aeroway=aerodrome
which caused the airport to be tripled in map. This is now resolved.

* Enhancement:layout_car:add stripesto military areas

* Fix:maptool:treat archaeological_site limes special

archaeological_site tag is used on way despite outruled by OSM wiki on
limes archaeological site. But there is a special tagging scheme for
Limes. Use that to fix rendering of Limes in map.
  • Loading branch information
metalstrolch committed Jun 21, 2020
1 parent ef8b9ae commit 567521f
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 6 deletions.
1 change: 1 addition & 0 deletions navit/item_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ ITEM(former_itinerary)
ITEM(former_itinerary_part)
ITEM(cliff)
ITEM(sports_track)
ITEM(archaeological_site)
/* Area */
ITEM2(0xc0000000,area)
ITEM2(0xc0000001,area_unspecified)
Expand Down
17 changes: 17 additions & 0 deletions navit/maptool/osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@ static char *attrmap= {
"w aerialway=chair_lift lift_chair\n"
"w aerialway=drag_lift lift_drag\n"
"w aeroway=aerodrome poly_airport\n"
/* airport wins over military landuse and specifier if given */
"w aeroway=aerodrome,landuse=military poly_airfield\n"
"w aeroway=aerodrome,landuse=military,military=* poly_airfield\n"
"w aeroway=apron poly_apron\n"
"w aeroway=runway aeroway_runway\n"
"w aeroway=taxiway aeroway_taxiway\n"
Expand Down Expand Up @@ -675,6 +678,10 @@ static char *attrmap= {
"w highway=unsurfaced track_gravelled\n"
"w highway=steps steps\n"
"w historic=archaeological_site poly_archaeological_site\n"
/* Albeit historic=archaeological_site should not be used on ways (only on areas) according to OSM wiki,
* it is at least done so for the Limes in germany. Luckily we can sort the Limes out as it has it's own
* tag scheme.*/
"w historic=archaeological_site,site_type=fortification,fortification_type=limes archaeological_site\n"
"w historic=battlefield poly_battlefield\n"
"w historic=ruins poly_ruins\n"
"w historic=town_gate poly_building\n"
Expand All @@ -692,7 +699,15 @@ static char *attrmap= {
"w landuse=greenfield poly_greenfield\n"
"w landuse=industrial poly_industry\n"
"w landuse=landfill poly_landfill\n"
/* landuse=military plus military tag */
"w landuse=military poly_military\n"
"w landuse=military,military=* poly_military\n"
"w landuse=military,military=airfield poly_airfield\n"
"w landuse=military,military=barracks poly_barracks\n"
"w landuse=military,military=danger_area poly_danger_area\n"
"w landuse=military,military=naval_base poly_naval_base\n"
"w landuse=military,military=range poly_range\n"
"w landuse=military,military=training_area poly_military_zone\n"
"w landuse=meadow poly_meadow\n"
"w landuse=plaza poly_plaza\n"
"w landuse=quarry poly_quarry\n"
Expand Down Expand Up @@ -729,11 +744,13 @@ static char *attrmap= {
"w leisure=track sports_track\n"
"w leisure=water_park poly_water_park\n"
"w leisure=swimming_pool poly_swimming_pool\n"
/* military tag without further info */
"w military=airfield poly_airfield\n"
"w military=barracks poly_barracks\n"
"w military=danger_area poly_danger_area\n"
"w military=naval_base poly_naval_base\n"
"w military=range poly_range\n"
"w military=training_area poly_military_zone\n"
"w natural=beach poly_beach\n"
"w natural=coastline water_line\n"
"w natural=fell poly_fell\n"
Expand Down
12 changes: 9 additions & 3 deletions navit/navit_layout_car_dark_shipped.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@
<polygon color="#1d2425"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="archaeological_site" order="8-">
<polyline color="#1d2222" width="3"/>
<text color="#55c4bd" background_color="#000000" text_size="8"/>
</itemgra>
<itemgra item_types="poly_building" order="0-">
<polygon color="#1a1f21"/>
<polyline color="#17191a"/>
Expand Down Expand Up @@ -522,15 +526,17 @@
<polyline color="#18212599" width="10"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_military_zone" order="9-">
<polygon color="#1a1e2044"/>
<itemgra item_types="poly_military_zone,poly_military" order="9-">
<polygon color="#1a1e2044" src="diagonal-stripes-gray.png" w="16" h="16"/>
<polyline color="#191d1eb5" width="1"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_airport" order="0-">
<polygon color="#1a1e2066"/>
</itemgra>
<itemgra item_types="poly_airfield" order="10-">
<polygon color="#1e232566"/>
<polygon color="#1e232566" src="diagonal-stripes-gray.png" w="16" h="16"/>
<polyline color="#191d1eb5" width="1"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_danger_area" order="8-">
Expand Down
12 changes: 9 additions & 3 deletions navit/navit_layout_car_shipped.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@
<polygon color="#deddcc"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="archaeological_site" order="8-">
<polyline color="#d9cfb6" width="3"/>
<text text_size="8"/>
</itemgra>
<itemgra item_types="poly_building" order="0-">
<polygon color="#aaaaaa"/>
<polyline color="#777777"/>
Expand Down Expand Up @@ -522,15 +526,17 @@
<polyline color="#8cc1c899" width="10"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_military_zone" order="9-">
<polygon color="#a0a0a044"/>
<itemgra item_types="poly_military_zone,poly_military" order="9-">
<polygon color="#a0a0a044" src="diagonal-stripes-gray.png" w="16" h="16"/>
<polyline color="#969696b5" width="1"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_airport" order="0-">
<polygon color="#a0a0a066"/>
</itemgra>
<itemgra item_types="poly_airfield" order="10-">
<polygon color="#ecd3cf66"/>
<polygon color="#ecd3cf66" src="diagonal-stripes-gray.png" w="16" h="16"/>
<polyline color="#969696b5" width="1"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_danger_area" order="8-">
Expand Down
70 changes: 70 additions & 0 deletions navit/textures/diagonal-stripes-gray.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 567521f

Please sign in to comment.