Skip to content

Commit

Permalink
Fix mini roundabout icon (osmandapp/OsmAnd#6932)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmd5a2 committed Jul 8, 2019
1 parent 8280b97 commit 913257d
Show file tree
Hide file tree
Showing 17 changed files with 959 additions and 2 deletions.
494 changes: 494 additions & 0 deletions icons/svg/shields/h_miniroundabout_clockwise_shield.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
457 changes: 457 additions & 0 deletions icons/svg/transport_colored/miniroundabout_clockwise.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/tools/sortfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ mycpname ford transport_colored_ford.png
mycpname topo_ford topo_topo_ford.png
mycp highway milestone functional-icons_milestone.png
mycp highway mini_roundabout transport_colored_miniroundabout_anticlockwise.png
mycpname mini_roundabout_lhn transport_colored_miniroundabout_clockwise.png
mycp highway noexit functional-icons_noexit.png
mycpname deadlock poi_colored_noexit.png
mycpname toll_gantry transport_colored_toll_gantry.png
Expand Down
6 changes: 4 additions & 2 deletions obf_creation/rendering_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1683,8 +1683,10 @@

<!-- POINT types -->
<type tag="highway" value="mini_roundabout" minzoom="16" />
<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_loop" to_tag1="highway" to_value1="mini_roundabout" routing="no"/>
<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_circle" to_tag1="highway" to_value1="mini_roundabout" routing="no"/>
<entity_convert pattern="tag_transform" from_tag="highway" from_value="mini_roundabout" if_region_name="$cyprus,$malta,$gb,$ireland,$bangladesh,$bhutan,$india,$maldives,$nepal,$pakistan,$sri-lanka,$brunei,$east-timor,$hong-kong,$indonesia,$japan,$macao,$malaysia,$singapore,$thailand,$botswana,$kenya,$lesotho,$mauritius,$mozambique,$namibia,$seychelles,$south-africa,$swaziland,$tanzania,$uganda,$zambia,$zimbabwe,$guyana,$suriname,$antigua-and-barbuda,$bahamas,$barbados,$jamaica,$australia-oceania" to_tag1="highway" to_value1="mini_roundabout" to_tag2="lhn" to_value2="yes" notosm="true"/>
<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_loop" if_region_name="$cyprus,$malta,$gb,$ireland,$bangladesh,$bhutan,$india,$maldives,$nepal,$pakistan,$sri-lanka,$brunei,$east-timor,$hong-kong,$indonesia,$japan,$macao,$malaysia,$singapore,$thailand,$botswana,$kenya,$lesotho,$mauritius,$mozambique,$namibia,$seychelles,$south-africa,$swaziland,$tanzania,$uganda,$zambia,$zimbabwe,$guyana,$suriname,$antigua-and-barbuda,$bahamas,$barbados,$jamaica,$australia-oceania" to_tag1="highway" to_value1="mini_roundabout" to_tag2="lhn" to_value2="yes" notosm="true"/>
<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_circle" if_region_name="$cyprus,$malta,$gb,$ireland,$bangladesh,$bhutan,$india,$maldives,$nepal,$pakistan,$sri-lanka,$brunei,$east-timor,$hong-kong,$indonesia,$japan,$macao,$malaysia,$singapore,$thailand,$botswana,$kenya,$lesotho,$mauritius,$mozambique,$namibia,$seychelles,$south-africa,$swaziland,$tanzania,$uganda,$zambia,$zimbabwe,$guyana,$suriname,$antigua-and-barbuda,$bahamas,$barbados,$jamaica,$australia-oceania" to_tag1="highway" to_value1="mini_roundabout" to_tag2="lhn" to_value2="yes" notosm="true"/>
<type tag="lhn" value="yes" minzoom="16" additional="true" notosm="true"/>
<type tag="highway" value="stop" minzoom="16" />
<type tag="highway" value="give_way" minzoom="16" />
<type tag="highway" value="toll_gantry" minzoom="16" />
Expand Down
3 changes: 3 additions & 0 deletions rendering_styles/default.render.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7022,6 +7022,7 @@
</case>
<case moreDetailed="true" minzoom="16" tag="highway" value="traffic_signals" icon="highway_traffic_signals_map" shield="traffic_signals_shield"/>
<case minzoom="15" tag="highway" value="mini_roundabout" icon="highway_mini_roundabout" shield="miniroundabout_anticlockwise_shield">
<apply_if additional="lhn=yes" icon="mini_roundabout_lhn" shield="miniroundabout_clockwise_shield"/>
<apply_if nightMode="true" shield=""/>
</case>
<switch minzoom="14">
Expand Down Expand Up @@ -7125,6 +7126,7 @@
<switch hideIcons="false">
<case minzoom="17" tag="highway" value="traffic_signals" icon="highway_traffic_signals_map" shield="traffic_signals_shield"/>
<case minzoom="15" tag="highway" value="mini_roundabout" icon="highway_mini_roundabout" shield="miniroundabout_anticlockwise_shield">
<apply_if additional="lhn=yes" icon="mini_roundabout_lhn" shield="miniroundabout_clockwise_shield"/>
<apply_if nightMode="true" shield=""/>
</case>
<switch minzoom="14">
Expand Down Expand Up @@ -7483,6 +7485,7 @@
<!-- Traffic + Transportation -->
<case minzoom="17" tag="highway" value="traffic_signals" icon="highway_traffic_signals_map" shield="traffic_signals_shield"/>
<case minzoom="15" tag="highway" value="mini_roundabout" icon="highway_mini_roundabout" shield="miniroundabout_anticlockwise_shield">
<apply_if additional="lhn=yes" icon="mini_roundabout_lhn" shield="miniroundabout_clockwise_shield"/>
<apply_if nightMode="true" shield=""/>
<apply_if moreDetailed="false" maxzoom="15" icon=""/>
</case>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 913257d

@goldfndr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to obf_creation/rendering_types.xml in this commit appear to have disabled turning circle rendering in the USA, presumably elsewhere too. I suggest trying reverting the turning_loop and turning_circle line changes and moving the lhn detection line to after them. In other words:

+ 		<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_loop" to_tag1="highway" to_value1="mini_roundabout" routing="no"/>
+ 		<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_circle" to_tag1="highway" to_value1="mini_roundabout" routing="no"/>
		<entity_convert pattern="tag_transform" from_tag="highway" from_value="mini_roundabout" if_region_name="$cyprus,$malta,$gb,$ireland,$bangladesh,$bhutan,$india,$maldives,$nepal,$pakistan,$sri-lanka,$brunei,$east-timor,$hong-kong,$indonesia,$japan,$macao,$malaysia,$singapore,$thailand,$botswana,$kenya,$lesotho,$mauritius,$mozambique,$namibia,$seychelles,$south-africa,$swaziland,$tanzania,$uganda,$zambia,$zimbabwe,$guyana,$suriname,$antigua-and-barbuda,$bahamas,$barbados,$jamaica,$australia-oceania" to_tag1="highway" to_value1="mini_roundabout" to_tag2="lhn" to_value2="yes" notosm="true"/>
- 		<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_loop" if_region_name="$cyprus,$malta,$gb,$ireland,$bangladesh,$bhutan,$india,$maldives,$nepal,$pakistan,$sri-lanka,$brunei,$east-timor,$hong-kong,$indonesia,$japan,$macao,$malaysia,$singapore,$thailand,$botswana,$kenya,$lesotho,$mauritius,$mozambique,$namibia,$seychelles,$south-africa,$swaziland,$tanzania,$uganda,$zambia,$zimbabwe,$guyana,$suriname,$antigua-and-barbuda,$bahamas,$barbados,$jamaica,$australia-oceania" to_tag1="highway" to_value1="mini_roundabout" to_tag2="lhn" to_value2="yes" notosm="true"/>
- 		<entity_convert pattern="tag_transform" from_tag="highway" from_value="turning_circle" if_region_name="$cyprus,$malta,$gb,$ireland,$bangladesh,$bhutan,$india,$maldives,$nepal,$pakistan,$sri-lanka,$brunei,$east-timor,$hong-kong,$indonesia,$japan,$macao,$malaysia,$singapore,$thailand,$botswana,$kenya,$lesotho,$mauritius,$mozambique,$namibia,$seychelles,$south-africa,$swaziland,$tanzania,$uganda,$zambia,$zimbabwe,$guyana,$suriname,$antigua-and-barbuda,$bahamas,$barbados,$jamaica,$australia-oceania" to_tag1="highway" to_value1="mini_roundabout" to_tag2="lhn" to_value2="yes" notosm="true"/>

Assuming that every tag transform is checked in linear fashion, the effect should be that the mini_roundabout checking for lhn vs not lhn countries works after the turning_loop and turning_circle values are transformed to the mini_roundabout value. (But I'll confess that I haven't tested it.)

Please sign in to comment.