osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

seamarks: fog signal and radar transponder symbols not rendered #18285

Closed quantenschaum closed 1 year ago

quantenschaum commented 1 year ago

Description

see title

possible reason: seamark:radar_transponder:categoryand seamark:fog_signal:category are consumed by entity conversion in rendering_types.xml, such that <apply_if additional="seamark:fog_signal:category" ... will never be activated.

Steps to reproduce

look at this test data

test.zip

Actual result

image

Expected result

image

Your Environment (required)

OsmAnd Version: 4.5.10
Android/iOS version: 11
Device model: Nokia X20
DmitryAlexei commented 1 year ago

OsmAnd~ 4.6.0#871m, released: 2023-10-13 Not reproduced

The display of marine objects has changed significantly since the last release. Please see screenshots and tell if everything is ok for you.

Tested on

  1. https://www.openstreetmap.org/node/10242033482 Coordinates 55.88 / 20.54
  2. https://www.openstreetmap.org/node/1852947125 Coordinates 53.5408465 / 9.9512549 (object is in the middle of the screen)

Actual result:

1 2
quantenschaum commented 1 year ago

Well, you did reproduce the described behavior.

  1. The RACON brackets are displayed correctly in this example, but they get not displayed if seamark:radar_transponder:group is present
  2. The fog signal symbols are missing in your screenshot. Instead of having "horn" in the light characteristics string, there should be a fog signal icon attached to the object. seamark:fog_signal=yes is not rendered at all.

IMHO fog signals and radar transponders should not be part of the light characteristics string, there are dedicated symbols for these properties, which should be used instead. The necessary icons are already present in OsmAnd.

Here I generated another test dataset, please try it.

testdata.zip

The "actual" screenshot and OBF were created with my modified versions of

Feel free to copy (from) these files.

actual actual

expected expectd

OsmAnd version 4.6.3

DmitryAlexei commented 1 year ago

If the proposed changes are implemented, then it will also be necessary to change the map legend. https://osmand.net/docs/user/map-legend/nautical-map#lights

quantenschaum commented 1 year ago

Actually not. The legend does already show the fog signal and radar transponder icons as expected.

image image

Just some of the tags do not make it into the OBF and some are not used in the render.xml. So, the symbols depicted in the legend are missing on the actual map on features that do have i.e. a fog signal.

xmd5a2 commented 1 year ago

Dev notes: This bug was introduced by this commit line 6949 `

` Problem is in fact that entity_convert pattern="tag_combine" removes original tags them from the object but we use seamark:fog_signal:category and seamark:radar_transponder:category in rendering. I propose to add parameter keep_original_tags="true" to entity_convert pattern="tag_combine". I've commented out these strings until this is implemented. to_tag2 will not work because it produces combined value.

vshcherb commented 1 year ago

@xmd5a2 you just need to write to_tag8="seamark:fog_signal:category"

quantenschaum commented 1 year ago

Same for radar_transponder and seamark:fog_signal=yes is not processed at all.

quantenschaum commented 1 year ago

The fog signal category (horn, bell, ...) does not belong in the light characteristics string. The symbol is sufficient, the category, if present, should be printed as word next to the ((( symbol.

xmd5a2 commented 1 year ago

@xmd5a2 you just need to write to_tag8="seamark:fog_signal:category"

Doesn't work. This also produces combined value. I think these lines should be commented out until this is fixed.

xmd5a2 commented 1 year ago

@quantenschaum seamark:fog_signal=yes is not described in wiki and used infrequently: just 46 appearances.

quantenschaum commented 1 year ago

@xmd5a2 It is described in the Wiki: https://wiki.openstreetmap.org/wiki/Tag:seamark:fog_signal%3Dyes

And it does make sense in cases where there is a fog signal but it is not specified what kind of signal it is.

DmitryAlexei commented 11 months ago

OsmAnd~ 4.6.0#1205m, released: 2023-12-13 World seamarks map and standard maps are updated to the latest versions (it is stated that they are from 01/12/2023)

  1. https://www.openstreetmap.org/node/1852947125 Coordinates 53.5408465 9.9512549 Object is tagged seamark:fog_signal:group. As I understand, this object should have a Fog signal icon attached. But it still displays the same way (as before), it does not have fog icon.