Conversation
Tristramg
left a comment
There was a problem hiding this comment.
Nice fixes, thank you for the split in commits that make sense!
| osm4routing::osmpbfreader::OsmObj::Node(node) => node | ||
| .tags | ||
| .get("railway:ref") | ||
| .filter(|trigram| trigram.len() <= 3) |
There was a problem hiding this comment.
In Germany they can have up to 5 characters (and in France 1 or 2...).
If this filter is needed, I would say to filter at 5
There was a problem hiding this comment.
I added this filter because editoast give me and error when I have a trigram longer then 3 characters. I don't know where but I think there is a 3 characters limitation somewhere else in the code.
There was a problem hiding this comment.
Yeah it seems the search_operational_point table has a trigram field of type varying(3) but it's most likely a bug in editoast
2026-04-13T08:23:43.542183Z ERROR editoast::error: [editoast:ModelError] an error occurred while querying the database: value too long for type character varying(3): disabled backtrace
There was a problem hiding this comment.
Openned #16212 but i don't know how this will play out with the OP model refacto
There was a problem hiding this comment.
Nice ! but ths problem still remains, sometimes there is a number where the trigram should be.
Would filtering by alphabetic character to the job ?
Is there trigram with number in them ?
|
|
||
| let nodes_tracks = NodeToTrack::from_edges(&edges); | ||
| let signals = signals(&osm_pbf_in, &nodes_tracks, &adjacencies); | ||
| let signals = if generate_signals { |
There was a problem hiding this comment.
nit: use don't instead of dont in the commit title
Filter out railway nodes that are tagged with tourism or sciences. Signed-off-by: Simon <sim.gaubert.sg@gmail.com>
Don't parse signals when we generate them, as they will be overridden anyway. Signed-off-by: Simon <sim.gaubert.sg@gmail.com>
Stop mapping every node, and map only those that have a "railway:ref" tag, and filter out those whose trigram is longer than 3 characters. Signed-off-by: Simon <sim.gaubert.sg@gmail.com>
Signed-off-by: Simon <sim.gaubert.sg@gmail.com>
bc66684 to
ca87ca4
Compare
This PR introduce multiple upgrade that were more or less necessary during developpement of other features, but that didn't fit into the PR of those features.
Their main objective is perfomance and/or filtering bad data.
I was not sure how to add then to dev.
Please let me know if this is not the right way.