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

Keep track of ways adjacent to bus stops and bus stops adjacent to ways #24

Open
PolyglotOpenstreetmap opened this issue Aug 23, 2020 · 6 comments

Comments

@PolyglotOpenstreetmap
Copy link
Collaborator

I would like to have the possibility to query which way is adjacent to a highway=bus_stop node. Is it possible to keep track of this information in a lookup? In Python I'd use a dictionary for this. I would also like to be able to do the reverse. For a given way, ask if a stop is near to it, and on which side.

If the highway=bus_stop node is not in the lookup yet:

  • Look at the route relations it's a member of.
  • For all the ways in the route relation, determine if a PT stop is in a rectangle near to it on either side.
  • Look at the stop_area relations it's a member of

Same principle for the highway ways. Also update these lookup tables when performing validation tasks.

There are operations like splitting ways and moving/adding/removing bus stop nodes that would invalidate the entry in the lookup table. Not sure how to detect those.

@sonukushwaha403

This comment has been minimized.

@sonukushwaha403

This comment has been minimized.

@PolyglotOpenstreetmap

This comment has been minimized.

@PolyglotOpenstreetmap

This comment has been minimized.

@sonukushwaha403
Copy link

sonukushwaha403 commented Sep 16, 2020 via email

@floscher
Copy link
Member

@sonukushwaha403 Maybe you could start with one of the tickets about the validator, something like https://josm.openstreetmap.de/ticket/15415 or https://josm.openstreetmap.de/ticket/19474 . I think the validator hasn't seen many changes in quite some time and should be rather straightforward to get started with.

Quick explanation of the validator checks: The validator check classes all extend the abstract Test class. Therefore they have to implement the visit() methods. For each OSM object in the dataset one of the visit() methods is called and in that visit() method an error is added to the errors field, if that object fails the current check.

If you want, you could create one class that contains all possible error codes that the pt_assistant plugin can produce. Something like the class AllValidationTests in the wikipedia plugin, which I added a while ago.

Feel free to pick one to work on. As soon as you open a pull request, we could give you feedback on your work. If there's a need for a longer discussion or some troubleshooting we could probably arrange a video call / remote coding session.

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

No branches or pull requests

3 participants