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

Coordinate to Coordinate routing for HAFAS #40

Open
1Maxnet1 opened this issue Mar 7, 2024 · 4 comments
Open

Coordinate to Coordinate routing for HAFAS #40

1Maxnet1 opened this issue Mar 7, 2024 · 4 comments

Comments

@1Maxnet1
Copy link
Contributor

1Maxnet1 commented Mar 7, 2024

Do you know whether it is possible to have a routing request from one coordinate to another? So instead of providing start and destination as a station, providing a geo-point?

@sn0opy
Copy link
Contributor

sn0opy commented Apr 5, 2024

You could have a look at #42. It should makes things easier to calculate a journey between two geo points.

@1Maxnet1
Copy link
Contributor Author

You could have a look at #42. It should makes things easier to calculate a journey between two geo points.

Thanks a lot! However this seems not to be suiting my use-case. The aim would be to compare HAFAS to e.g. a MOTIS or OTP Server. And they can do intermodal routing (aka having two Geo-Points and let the server decide to which stop I should go or even drive by bike). The nearby request can be used to implement this "by hand" but would require a lot of post-processing. So the questions arises if the HFAS servers can already to that natively (which would allow for a fair comparison).

Nevertheless I really appreciate your contribution :)

@sn0opy
Copy link
Contributor

sn0opy commented Apr 18, 2024

I was looking into it a bit deeper, since the frontends provide a button to locate the closest station via GPS (or any alternative, that provides latitude and longitude). It looks like you always have to do some sort for request inbetween. The standard frontends seem to use the LocMatch request for that, which is already implemented via locations() but requires some slight updates for x/y coordinates to work

@1Maxnet1
Copy link
Contributor Author

I was looking into it a bit deeper, since the frontends provide a button to locate the closest station via GPS (or any alternative, that provides latitude and longitude). It looks like you always have to do some sort for request inbetween. The standard frontends seem to use the LocMatch request for that, which is already implemented via locations() but requires some slight updates for x/y coordinates to work

Thanks for the ideas, I chatted with @derhuerst , who claims that there is also a support for requests including GeoPoints (maybe not for all instances though). When I find some time, I will double check the implementation of https://invent.kde.org/libraries/kpublictransport and whether they support it. Then we might get the required info to implement it for pyhafas as well.

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

2 participants