Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display depth of submerged rocks in nautical style #18092

Open
quantenschaum opened this issue Sep 4, 2023 · 22 comments
Open

display depth of submerged rocks in nautical style #18092

quantenschaum opened this issue Sep 4, 2023 · 22 comments

Comments

@quantenschaum
Copy link

quantenschaum commented Sep 4, 2023

🚀 feature request

Description

When a seamark:type=rock has an attached depth tag, the depth value should be displayed next to the rock symbol since this information is very important.

Additionally, the symbols for rocks should be made smaller, the dotted circle and the colored background should be removed.

Describe the solution you'd like

see above

Describe alternatives you've considered

no alternative

@miramikes
Copy link

+1
#14975
stones

@quantenschaum
Copy link
Author

Exactly. Here a direct comparison of

how it currently looks in OsmAnd
Screenshot_20230905-080620

and how it should look like (and used to look on paper charts), a tiny cross without background is sufficient
Screenshot_20230905-080627

The rock symbols are far too big and clutter the entire chart. To be able to judge if the rock is dangerous or not to a particular vessel, the depth value must be displayed.

Note: The use of a map magnifier does not affect the size of the rock symbols, it effectively only changes the threshold (zoom level) when rocks get displayed.

@quantenschaum
Copy link
Author

I tried to find the parts in the code that are responsible for rendering the rock. I did not find them. Could someone point me to the right spot, please?

@miramikes
Copy link

I tried to find the parts in the code that are responsible for rendering the rock. I did not find them. Could someone point me to the right spot, please?

Not sure if this what you are asking ...
Part of marine.render.xml

  <!-- indication of dangerous navigational obstructions to start already at low zoom levels 13 -->
  <!-- <case minzoom="13" tag="seamark:type" value="rock" icon="seamark_rock_submerged" shield="seamark_rock_shield" iconOrder="150" iconVisibleSize="20" icon_shift_py="-1"> -->
  <case minzoom="13" tag="seamark:type" value="rock" icon="seamark_rock_submerged" shield="seamark_rock_shield" iconVisibleSize="15">
    <case additional="seamark:rock:water_level=covers" icon="seamark_rock_covers"/>
    <case additional="seamark:rock:water_level=awash" icon="seamark_rock_awash"/>
  </case>

Maybe also this might be useful:
https://github.com/osmandapp/OsmAnd-resources/blob/a3c976f67abe1c878efb133ef7f7bec567e8997a/icons/tools/Generating_OSMAND_map_icons.txt

@quantenschaum
Copy link
Author

Yes, these lines I did find. But how can I change the size of the icon?

@quantenschaum
Copy link
Author

setting shield="null" removes the circle background. iconVisibleSize only sets the effective size, such that only one overlapping icons is displayed.

@quantenschaum
Copy link
Author

w/o the shield it already looks less cluttered

Screenshot_20230905-223948
Screenshot_20230905-223943

@miramikes
Copy link

I found this commit "Increase size of barrier=debris icon":
osmandapp/OsmAnd-resources@1b9b7a6
Is it really necessary to change svg icon to change it's rendered size?

@quantenschaum
Copy link
Author

Unfortunately yes AFAIK. There seems to be no setting in the render.xml that allows changing the icon size.

@quantenschaum
Copy link
Author

quantenschaum commented Sep 6, 2023

The shield (circle around the rock symbol) is used in paper charts to mark rocks dangerous to surface navigation or outside the corresponding depth area.

To be able to add the shield dynamically, there must be

  • either an additional tag in the OSM data to mark the rock as dangerous
  • or depth data available to decide if the rock below a certain depth oder outside of the depth area

To display the depth value, the OBF creation has to be adjusted to include this data?

INT1 section K
image

@miramikes
Copy link

The shield (circle around the rock symbol) is used in paper charts to mark rocks dangerous to surface navigation or outside the corresponding depth area.

To be able to add the shield dynamically, there must be

  • either an additional tag in the OSM data to mark the rock as dangerous
  • or depth data available to decide if the rock below a certain depth oder outside of the depth area

This maybe would be dificult as only about 11% of seamark:type=rock having depth=*
https://taginfo.openstreetmap.org/tags/seamark:type=rock#combinations

Would'nt be enough to just add depth to rock?
Anybody can decide what is dangerour for his wessel ...

BTW depth for submerged wrecks would be great too ;)
https://taginfo.openstreetmap.org/keys/seamark%3Awreck%3Acategory#combinations

@quantenschaum
Copy link
Author

Sure, this is is just advanced stuff. Display of the depth value should be 1st priority. Is just have been thinking about it.

side question concerning depth data: Is there some documentation on how to generate an OBF containing depth contours? #12502

@miramikes
Copy link

side question concerning depth data: Is there some documentation on how to generate an OBF containing depth contours? #12502

I used phyghtmap program to generate contours file when I builded my own maps for garmin years ago.
http://katze.tfiu.de/projects/phyghtmap/

According to man pages it can use GeoTiff file and generat pbf/xml file
pbf/xml file should be able to convert in OsmAndMapCreator to obf file
http://katze.tfiu.de/projects/phyghtmap/phyghtmap.1.html
https://osmand.narkive.com/KmMkzQIN/making-srtm-obf-files

Never tried this program to generate depht contour but I used it a lot before for contours

You will need some depth data ... maybe from here?
https://www.gebco.net/data_and_products/gridded_bathymetry_data/#global

@quantenschaum
Copy link
Author

quantenschaum commented Sep 7, 2023

#18116

@vshcherb vshcherb added this to the future-backend milestone Sep 7, 2023
@quantenschaum
Copy link
Author

This can be implemented easily with #18116 (comment)

@vshcherb
Copy link
Member

I think subscript values are better to display with textSize2 i.e. instead of "4.3" -> "4 (3)" so then it could be a separate text tag value

@quantenschaum
Copy link
Author

quantenschaum commented Sep 15, 2023

Could you please explain this a little more in detail? Is there some magic happening when a string like 4 (3) is parsed?

@quantenschaum
Copy link
Author

There is no textSize2 according to https://osmand.net/docs/technical/osmand-file-formats/osmand-rendering-style/.

@vshcherb
Copy link
Member

There is nameTag2, it suggests that for 1 object 2 texts needs to be displayed, so it's automatically puts 1 text in brackets, in future we could have a feature to say nameTag2="subscript" textPlacement="subscript", now we already have textPlacement but it's for main tag (top/bottom/center) which could be later reused for 2nd text

@quantenschaum
Copy link
Author

I still do not understand how this actually works. The docs are very short and hard to understand.

So, what exactly needs to be in rendering_types.xml (T) and render.xml (S) for text to be displayed? How do nameTag, nameTag2 in (S) and nameTags in (T) work?

Currently there is

  • <type tag="seamark:type" value="rock" minzoom="10" nameTags="seamark:name"/> in (T)
  • <type tag="depth" additional="text" minzoom="6" order="128"/> in (T)

Simply adding <case minzoom="10" tag="seamark:type" value="rock" textSize="14" textDy="-12" /> to the text section in (S) makes the depth labels appear on the map, even though depth is never listed in any nameTag attribute. Why?

What is the order attribute in (T) and (S) good for?

@quantenschaum
Copy link
Author

quantenschaum commented Sep 29, 2023

👉 In ENCs there is the attribute EXPSOU which contains information about the depth (of the rock) relative to its surrounding area. This corresponds to depth:exposition in OSM. The seamark_rock_shield should only be displayed if depth:exposition=shoaler and the iconOrder should be lowered (higher priority).

@quantenschaum
Copy link
Author

With depth:exposition and the shield only rendered when shoaler, it may look like this.

Rocks outside (shoaler) of the surrounding depth contour area get the shield.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants