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

objects rendered with wrong z order #17835

Closed
quantenschaum opened this issue Aug 7, 2023 · 15 comments · May be fixed by osmandapp/OsmAnd-resources#1003
Closed

objects rendered with wrong z order #17835

quantenschaum opened this issue Aug 7, 2023 · 15 comments · May be fixed by osmandapp/OsmAnd-resources#1003
Assignees
Milestone

Comments

@quantenschaum
Copy link

Description

Seamarks and maybe other objects are drawn with wrong z order such that certain feature get hidden under other features. In the example below at https://osmand.net/map#16/53.4600/6.1658 some fairways (light green) and cable area (transparent red with dotted outline) are partially hidden below tidal flats (wetlands). The are only (slightly) visible because the wetland area is not fully opaque.

(Also when using an underlay with 'show polygons' disabled I would like the wetland polygons to be hidden.)

Screenshot_20230807-112053-
Screenshot_20230807-112102-

How to reproduce

Look at https://osmand.net/map#16/53.4600/6.1658 in the boating profile (nautical map style)

Actual result

Features hidden below wetland area.

Expected result

Wetland area should be in the background.

Environment
OsmAnd Version: 4.5.9
Android version: 13
Device model: Nokia X20

@quantenschaum
Copy link
Author

It seems to be more difficult than I thought. The proposed simple change only works for render engine 2. With engine 1 and wetland order=4 or 5 the wetland polygon gets hidden behind the water polygon. 😬

@quantenschaum
Copy link
Author

render engine 1

wetland order=6 as it currently is, fairway hidden behind wetland (1) and cable area is hidden behide wetland (2) and seabed polygons are hidden behind wetland (X)
engine1-wetland6

wetland order=5, it is better but cable area still behind wetland (3)
engine1-wetland5

and when zoomed in, wetland polygon gets behind water polygon
engine1-wetland5-zoomed

wetland order=4, the wetland is not display at all
engine1-wetland4

render engine 2

wetland order=4, it works as expected
engine2-wetland4

I use diffrent colors for wetland and fairways, but this does not affect the z ordering issue.

@vshcherb
Copy link
Member

vshcherb commented Aug 8, 2023

rendering engine v1 is out of support for such complex issues, so it's relevant to be honest. On iOS version v1 was never supported

@xmd5a2
Copy link
Contributor

xmd5a2 commented Aug 17, 2023

Fixed
Legacy engine:
изображение

OpenGL engine:
изображение

@quantenschaum
Copy link
Author

quantenschaum commented Aug 17, 2023

Thanks! But I do not consider this as fixed.

The no anchor area is still partially behind the wetland.

zorder

But this is maybe just a minor issue, like this it is definitely better than before, great improvement. Thanks.

@quantenschaum
Copy link
Author

quantenschaum commented Aug 17, 2023

Is the render.xml file actually updated when the app gets updated via the app store?

@quantenschaum
Copy link
Author

The order attribute was removed for sand_waves. But what about the other sea bed related keys/values?

@vshcherb
Copy link
Member

Commit is attached osmandapp/OsmAnd-resources@8cc445a

@quantenschaum
Copy link
Author

I meant, in line https://github.com/osmandapp/OsmAnd-resources/blob/master/rendering_styles/nautical.render.xml#L491 the order attribute was removed, but shouldn't it also be removed from the surrounding lines?

@DmitryAlexei
Copy link
Contributor

DmitryAlexei commented Sep 1, 2023

OsmAnd~ 4.6.0#710m, released: 2023-09-01
Latest Netherlands Frisia map downloaded
53.4582 6.1760

@xmd5a2
Copy link
Contributor

xmd5a2 commented Sep 4, 2023

This is because of sorting by area. Nothing to do in rendering style.

@quantenschaum
Copy link
Author

quantenschaum commented Sep 11, 2023

It does have to do with the rendering style, because the order is defined there. Transparent areas like seamark:type=cable_area should get a higher order. This won't hide anything since they are (semi)transparent and ensures that the auto order algorithm does not put them in the back. Danger areas already have a higher order assigned.

@quantenschaum
Copy link
Author

quantenschaum commented Sep 11, 2023

Some seamark:areas are matched by area=true others by cycle=true, some by both. cable_area is only in the area section.

@quantenschaum
Copy link
Author

quantenschaum commented Sep 11, 2023

Adding <case tag="seamark:type" value="cable_area" order="8"/> here would fix #17835 (comment)

xmd5a2 added a commit to osmandapp/OsmAnd-resources that referenced this issue Sep 12, 2023
@xmd5a2
Copy link
Contributor

xmd5a2 commented Sep 12, 2023

изображение

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

Successfully merging a pull request may close this issue.

4 participants