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

Draw distant H/V signals with lower priority than main signals #182

Merged
merged 2 commits into from
Dec 26, 2024

Conversation

besentv
Copy link

@besentv besentv commented Dec 22, 2024

Right now distant H/V signals take higher priority over their main counterparts, causing main signals with a distant signal attached to be drawn as distant signal, which is wrong, as the main signal is more important.

Example now https://openrailwaymap.fly.dev/#view=16.48/49.470724/10.991369&style=signals

With this fix all signals with a main signal ref, e.g. (N|P|S|R)[1-9]+ are drawn correctly. This matches the old ORM style:
image

Copy link
Owner

@hiddewie hiddewie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hiddewie hiddewie merged commit ad5a1d9 into hiddewie:master Dec 26, 2024
@hiddewie
Copy link
Owner

hiddewie commented Dec 28, 2024

This got me thing a bit more.

It is possible to have a single node tagged with multiple types of signals, like this example a main and distant signal. This is correct tagging and according to the widely used tagging scheme from https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging.

So it would be better if the database could store a feature per type of signal. Currently this is done only to split "speed" signals, "electrification" signals and "the rest" because these features are shown on different layers. However we should also be able to split every type of feature, e.g. combined, main, distant and all other kinds of signals.

Once we have that, we could render all available features (with some offset) for a single node. It would look somewhat like the physical way signals are put on the metal pole: first main signals, then distant signals, then speed markers, then other additions (like which track the signal belongs to, or many others).

Rendering could work with offsets, rendering the second icon of a node a bit lower than the first icon, such that there is no overlap of the icons belonging to the same node.

--> #187

@besentv
Copy link
Author

besentv commented Dec 28, 2024

This got me thing a bit more.

It is possible to have a single node tagged with multiple types of signals, like this example a main and distant signal. This is correct tagging and according to the widely used tagging scheme from https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging.

So it would be better if the database could store a feature per type of signal. Currently this is done only to split "speed" signals, "electrification" signals and "the rest" because these features are shown on different layers. However we should also be able to split every type of feature, e.g. combined, main, distant and all other kinds of signals.

Once we have that, we could render all available features (with some offset) for a single node. It would look somewhat like the physical way signals are put on the metal pole: first main signals, then distant signals, then speed markers, then other additions (like which track the signal belongs to, or many others).

Rendering could work with offsets, rendering the second icon of a node a bit lower than the first icon, such that there is no overlap of the icons belonging to the same node.

--> #187

Looking great. Sorry that I'm not much of a help here. 😅

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

Successfully merging this pull request may close these issues.

2 participants