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

gtfstidy: Add support for swapping coordinates #48

Open
jbruechert opened this issue Feb 26, 2024 · 3 comments
Open

gtfstidy: Add support for swapping coordinates #48

jbruechert opened this issue Feb 26, 2024 · 3 comments
Labels
import regarding the download & import of data sources

Comments

@jbruechert
Copy link
Collaborator

Implement a check in gtfstidy that finds unrealistic goordinates (swapped longitude and latitude), and corrects them.

This could be done like the following:

  • If the speed between two stops is MUCH larger then the overall average speed
  • Note the second stop
  • If the speed between the second and the next stop is unrealistic again, swap coordinates for the second stop
@1Maxnet1
Copy link
Contributor

I think this is not in the scope of gtfstidy:

Output feeds are semantically equivalent to the input feed.

But I thought about to create a similar tool, which can apply different fixes like:

  • swapping the coordinates
  • override coordinates with the ones from OSM (e.g. if the stop in the dataset has set the coordinates to (0,0))
  • ...

This would allow to be extended/configured to fix all kind of automatically fixable issues in the datasets.

@felixguendling
Copy link
Contributor

felixguendling commented Feb 29, 2024

We had functionality like this in MOTIS before.

motis-project/motis@d90e87a

But it sometimes made things even worse, so I removed it.

Edit 1: It's easier to reason about strange things popping up in the search UI if MOTIS doesn't do too much data fixing and interpretation.

Edit 2: But maybe it makes sense to keep the problem detection part of this code so the MOTIS writes logs that point to dubious trip IDs.

@jbruechert
Copy link
Collaborator Author

Output feeds are semantically equivalent to the input feed.

At least with the --fix option that is already not the case, so I'd just ask upstream before starting to work on it.

@derhuerst derhuerst added the import regarding the download & import of data sources label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import regarding the download & import of data sources
Development

No branches or pull requests

4 participants