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

Electrification display seems incoherent #10221

Open
maelysLeratRosso opened this issue Jan 2, 2025 · 8 comments
Open

Electrification display seems incoherent #10221

maelysLeratRosso opened this issue Jan 2, 2025 · 8 comments
Assignees
Labels
area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules kind:bug Something isn't working severity:major Major severity bug

Comments

@maelysLeratRosso
Copy link

What happened?

I create this train on small_infra : train small infra bug electrification.json

It uses an electrical rolling stock (requires electrification). On the map, it appears that there is no electrification on the path, but the pathfinding succeeded.

Image

It does not look like a pathfinding problem, but more like a display problem. For example, when one goes to the infrastructure editor on this infra and opens the edition mode, suddenly the electrification covers this track section :

Before entering edition mode : Image

After entering edition mode (without changing anything about the electrification) : Image

What did you expect to happen?

I expect the electrification display to be consistent with the tracks that can be used by my train

How can we reproduce it (as minimally and precisely as possible)?

Import the previous train on small_infra and observe

On which environments the bug occurs?

Recette (SNCF)

On which browser the bug occurs?

Google Chrome

OSRD version (top right corner Account button > Informations)

bf0ab67

@maelysLeratRosso maelysLeratRosso added kind:bug Something isn't working severity:major Major severity bug labels Jan 2, 2025
@maelysLeratRosso
Copy link
Author

Maybe linked to this ?

@bougue-pe
Copy link
Contributor

bougue-pe commented Jan 2, 2025

For the criticality, this bug also appears on France.

On small-infra: Not sure about the cause, but the length of TH1 is 5000m (from data) and the "GPS-length" is 484,1 + 1112 + 491,7 + 1444,8 = 3532,6

When changing the electrification to just cover TH1, the display is OK ✅.
When covering just TH0 and TH1, the display is KO ❌.
It looks like the response from the POST to http://localhost:4000/api/infra/1/objects/Electrification is OK (no matter if TH1 is alone in the electrification or not).

It looks like it's not related to inconsistencies between track's coords and its length, and it's probably between front and editoast, as the layer are correct in PG for infra_layer_electrification: Image

@bougue-pe bougue-pe added the area:editoast Work on Editoast Service label Jan 2, 2025
@bougue-pe bougue-pe removed their assignment Jan 2, 2025
@bougue-pe bougue-pe added area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service and removed area:editoast Work on Editoast Service labels Jan 2, 2025
@bougue-pe
Copy link
Contributor

In all cases, the electrification seems to disappear on an entire GPS-section of the track-section (first or last).
Here is the screenshot for France (infra145 in recette) at Merrey: Image

@Synar
Copy link
Contributor

Synar commented Jan 16, 2025

Possible duplicate of #6654

@Synar Synar self-assigned this Jan 17, 2025
@Synar
Copy link
Contributor

Synar commented Jan 21, 2025

Interestingly this also depends on the zoom level, so definitely some sort of display issue.

Screencast_20250121_192555.webm

I'll continue investigating

@bougue-pe
Copy link
Contributor

If it can help, it looks like the issue exists also for the speed-sections:

Image

Compared to the front display:

Image

@Synar
Copy link
Contributor

Synar commented Jan 24, 2025

The issue does not resides in the frontend or maplibre, but probably in the editoast encoding from the db geosjson data to the mvt tiles served by editoast.

Displaying the tiles from http://localhost:8090/layers/tile/electrifications/geo/{z}/{x}/{y}/?infra=1 in qgis gives the same issue (though the zoom effects differ)

Screencast_20250124_182951.webm

Edit : improving the max zoom allowed reproduces the exact same zooming behavior as in maplibre

@Synar
Copy link
Contributor

Synar commented Jan 27, 2025

However, the result of the sql requests done appears to be correct, as plotting it I get the full infra

Image

So the error probably occurs when using the mvt rust library. I tried some changes, but none of them seem to be the actual fix. The order in which lines gets encoded in as_geom_data does seem very relevant. The mvt library is sadly not very well documented (there are not multistring usage example for example), and there are not many usages I could find online, so I fear either we use it incorrectly or it is bugged.

Interestingly enough, randomizing the order in which lines get encoded in as_geom_data stochastically fix the issue (in a way which I think is quite amusing, even if not that helpful) :

Screencast_20250127_182546.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules kind:bug Something isn't working severity:major Major severity bug
Projects
None yet
Development

No branches or pull requests

3 participants