osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.56k stars 1k forks source link

Nautical rendering style: 1. Add display of light characteristics in the nautical map 2. Add display of sectorial lights #16894

Open josail opened 1 year ago

josail commented 1 year ago

🚀 feature request

Nautical rendering style: 1. Add display of light characteristics in the nautical map 2. Add display of sctorial lights

Description

1. The display of the nautical rendering style lacks the important information on the light characteristics, which is essential for navigation by the light information. It is readily available in a well structured list of seamark tags as described in : https://wiki.openstreetmap.org/wiki/Seamarks/Lights which can be evaluated in a appropriate text as in the openseamap.

  1. A special display with lines and coloured arcs is required for sectorial lights, as e.g. displayed here: https://wiki.openstreetmap.org/wiki/Seamarks/Sectored_and_Directional_Lights

For 1. and 2. I'm willing to support with limited/beginners experience in the rendering style syntax. Thus the success will require engagement of a second person with more experience on the rendering style programming. I'm much willing to support by feedback on the openseamk syntax (https://wiki.openstreetmap.org/wiki/Seamarks/Light) and intended style (similar to openseamap and international standard INT-1 for nautical charts, https://wiki.openstreetmap.org/wiki/Seamarks/INT-1_Section_P). And by repeated testing of adjustments to the nautical rendering style on an iOS iphone.

Describe the solution you'd like

  1. Text display right of or below the navigational light in the nautical rendering style reflecting INT-1 nomenclature of the light characteristics (e.g. https://wiki.openstreetmap.org/wiki/Seamarks/INT-1_Section_P, www.openseamap.org)

  2. lines, dashed lines and coloured arcs of sectorial lights around the navigational light like in https://wiki.openstreetmap.org/wiki/Seamarks/Sectored_and_Directional_Lights

  1. set up a composed string for text display in the nautical rendering style, some depence on zoom level according to major, minor and other navigational lights rating of importance

  2. draw lines and arcs, graphical features to be implemented, I don't know how to do this

regarding 2.: alternatively as a first step to allow for the information of sectorial navigational lights as a workaround: Option for the display of a short 2nd text indicating the light sectors definitions

quantenschaum commented 3 months ago

Hi @josail, some notes and questions

depth data sources I know of

Any coarse depth data and anything deeper than 10m are actually not important for coastal navigation (of pleasure craft). What we need is accurate and up to date depth data <10m. The only reliable sources seem to be the hydrographic offices.

The depth data discussion is here https://github.com/osmandapp/OsmAnd/discussions/18116

From some displays by Melcolm I saw that he suggested similar displays for UK coast.

Where did you see that? Could you provide a link?

RZR-UA commented 3 months ago

Dev notes:

RZR-UA commented 3 months ago

@quantenschaum

We are going to accept your superb Marine style into OsmAnd Android/iOS apps.

It looks great, is highly customizable, and prettier than classic Nautical style.

Once we adopt the new style, both styles will need to be maintained well.

The new file is now based on the reformatted nautical xml file.

It's hard to make a correct diff between new and original files.

Could you try to re-create marine.render.xml based on unchanged nautical.render.xml ? It should not have any formatting such as splitting long lines and replacing tabs and spaces.

Alternatively, you could try to re-format existing marine.render.xml and then run diff -u -w marine.render.xml nautical.render.xml to verify that there are only your actual changes at the output.

quantenschaum commented 2 months ago

Nice! - I will try to get rid of the formatting.

I also thought about having the nautical and the marine style in parallel, but it seems to be a lot of tedious manual work to port all changes made to the nautical style to the marine style as well. This is what I did to keep to it in sync with your nautical style which it is based on. So, IMHO it is maybe best to have just a single style for nautical charts, and the marine style can be configured to look like the nautical style. This make maintenance much easier.

I also merged the styling of the depth contours into the marine style (marked by comment depthcontourslines) to avoid them getting overwritten by updates. These could replace depthcontourlines.addon.render.xml, but this also would require the depth data to updated to the modified tagging scheme used in rendering_types.xml.

xmd5a2 commented 2 months ago

@quantenschaum Ideally marine style should be dependent on it's base - nautical. I mean it is better to create a style that contains only necessary changes to nautical. Look at offroad style. <renderingStyle name="Offroad by ZLZK" depends="topo" defaultColor="#ffffff" version="1"> It is tiny but it uses topo style as a base. And usually there is no need to update offroad when topo is updated. All changes will work automatically. I don't think that merging depth contours to style is a good idea. I think your changes should be integrated into our depthcontourlines.addon.render.xml somehow.

quantenschaum commented 2 months ago

OK, It didn't know that this was possible. How are the instructions of both styles merged, you can add new instructions, but can you also override existing instructions?

xmd5a2 commented 2 months ago

Yes, absolutely. But if you need to change for example water color and there is no renderingAttribute / renderingConstant in nautical style then better to create renderingAttribute in nautical style than copying a big chunk of code to marine style.

vshcherb commented 2 months ago

Todo