Skip to content

Commit

Permalink
Add simple rendering of shoal to nautical (osmandapp/OsmAnd#17897)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmd5a2 committed Aug 23, 2023
1 parent cf54ee7 commit 8f3e136
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions obf_creation/rendering_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7029,6 +7029,7 @@
<type tag="seamark:type" value="restricted_area" minzoom="10" nameTags="seamark:name,seamark:restricted_area:information"/>
<type tag="seamark:type" value="rock" minzoom="10" nameTags="seamark:name"/>
<type tag="seamark:type" value="sea_area" minzoom="10" nameTags="seamark:name,name"/>
<type tag="seamark:sea_area:category" value="shoal" minzoom="11" additional="true"/>
<type tag="seamark:type" value="seaplane_landing_area" minzoom="10" nameTags="seamark:name"/>
<type tag="seamark:type" value="separation_zone" minzoom="10" nameTags="seamark:name"/>
<type tag="seamark:type" value="separation_line" minzoom="10" nameTags="seamark:name"/>
Expand Down
14 changes: 12 additions & 2 deletions rendering_styles/nautical.render.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,7 @@
<switch textItalic="true">
<case minzoom="16" tag="natural" value="wood" textOrder="60"/>
<case minzoom="17" tag="natural" value="wetland" textOrder="70"/>
<case minzoom="17" tag="natural" value="shoal" textOrder="70"/>
<case minzoom="16" tag="landuse" value="forest" textOrder="60"/>
<case minzoom="12" tag="leisure" value="nature_reserve" textOrder="60"/>
<case minzoom="12" tag="boundary" value="national_park" textOrder="61" textOnPath="true"/>
Expand Down Expand Up @@ -3275,7 +3276,7 @@

<!-- INT-1 J Section: Nature of the Seabed, https://wiki.openstreetmap.org/wiki/Seamarks/INT-1_Section_J -->
<switch minzoom="14">
<case tag="seamark:type" value="seabed_area" color="$null">
<case tag="seamark:type" value="seabed_area" color="$null">
<!-- <apply_if additional="seamark:seabed_area:surface=sand" shader="seamark_j1_sand"/> omitted-->
<!-- <apply_if additional="seamark:seabed_area:surface=mud" shader="seamark_j2_mud"/> omitted-->
<!-- <apply_if additional="seamark:seabed_area:surface=clay" shader="seamark_j3_clay"/> omitted-->
Expand All @@ -3299,10 +3300,19 @@
<apply_if additional="seamark:seabed_area:surface=mud" nightMode="true" shader=""/>
<!-- <apply_if additional="seamark:seabed_area:surface=coral" shader="reef_coral"/> alternative shader for coral-->
<!-- <apply_if additional="seamark:seabed_area:surface=coral" shader="reef"/> alternative shader for coral-->
</case>
</case>
<case tag="seamark:type" value="weed" shader="seamark_j132_weedkelp"/>
<case tag="seamark:type" value="seagrass" shader="seamark_j134_seagrass"/>
<case tag="seamark:type" value="sand_waves" shader="seamark_j14_sand_waves"/>

<switch>
<case tag="natural" value="shoal"/>
<case tag="seamark:type" value="sea_area" assitional="seamark:sea_area:category=shoal" color_2="#99ff0000" pathEffect_2="2_3" strokeWidth_2="1">
<apply_if minzoom="13" strokeWidth_2="2"/>
<apply_if nightMode="true" color_2="#88ff0000"/>
</case>
<apply shader="shoal"/>
</switch>
<apply_if seabedDetail="omit" shader=""/>
<apply_if nightMode="true"> <!-- use light gray semi transparent halo _shield_night-->
<!-- <apply_if additional="seamark:seabed_area:surface=sand" shield="seamark_j1_sand_shield_night"/> omitted-->
Expand Down
14 changes: 14 additions & 0 deletions test-resources/synthetic_test_rendering.osm
Original file line number Diff line number Diff line change
Expand Up @@ -7813,6 +7813,10 @@
<node id='-4587632351555586671' action='modify' lat='45.71890007801' lon='36.52042072156' />
<node id='-4587632351555586673' action='modify' lat='45.7194939999' lon='36.52080406825' />
<node id='-4587632351555586674' action='modify' lat='45.71886661927' lon='36.52082360621' />
<node id='-4587632351555586680' action='modify' lat='45.69066792546' lon='36.51607778641' />
<node id='-4587632351555586681' action='modify' lat='45.69062246154' lon='36.51734694269' />
<node id='-4587632351555586682' action='modify' lat='45.69020570722' lon='36.51707575545' />
<node id='-4587632351555586683' action='modify' lat='45.69037240932' lon='36.51632727867' />
<node id='44' action='modify' version='1' lat='45.73728181821' lon='36.70902879285' />
<node id='46' action='modify' version='1' lat='45.73727948262' lon='36.70605749552' />
<node id='48' action='modify' version='1' lat='45.73469861346' lon='36.70602618919' />
Expand Down Expand Up @@ -34424,6 +34428,16 @@
<tag k='ford' v='yes' />
<tag k='name' v='ford' />
</way>
<way id='-4587632351537666767' action='modify'>
<nd ref='-4587632351555586680' />
<nd ref='-4587632351555586681' />
<nd ref='-4587632351555586682' />
<nd ref='-4587632351555586683' />
<nd ref='-4587632351555586680' />
<tag k='name' v='Shoal' />
<tag k='seamark:sea_area:category' v='shoal' />
<tag k='seamark:type' v='sea_area' />
</way>
<way id='12162' action='delete' version='1'>
<tag k='railway' v='platform' />
</way>
Expand Down

0 comments on commit 8f3e136

Please sign in to comment.