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

Add more OTP endpoints and update coverage areas #47

Merged
merged 1 commit into from
Feb 24, 2022
Merged

Conversation

vkrause
Copy link
Member

@vkrause vkrause commented Oct 8, 2021

Coverage areas are no longer based on the (often bogus) bounding polygons
reported by the OTP instances themselves, but are now the convex hull of
all stops after applying basic outlier filtering on those.

Coverage areas are no longer based on the (often bogus) bounding polygons
reported by the OTP instances themselves, but are now the convex hull of
all stops after applying basic outlier filtering on those.
@derhuerst
Copy link
Member

Coverage areas [...] are now the convex hull of all stops after applying basic outlier filtering on those.

Including a buffer?

@vkrause
Copy link
Member Author

vkrause commented Oct 9, 2021

Including a buffer?

Not at this point, and neither did OTP add one itself when computing the bounding boxes we used before IIUC.

Easy enough to add though, how much do we want?

More generally, we probably want better documentation on where we got the respective bounding polygons from and what kind of post-processing has been applied, if any?

@derhuerst
Copy link
Member

Easy enough to add though, how much do we want?

I'm not sure. I'd say big enough to include positions in comfortable walking distance (e.g. 500m), or at least positions within common GPS uncertainties (e.g. 30m).

On the other hand, an application using this polygon in its business logic can decide much better what buffer to apply; I'd say this boils down to user friendliness vs access to raw data. What do you think?

More generally, we probably want better documentation on where we got the respective bounding polygons from and what kind of post-processing has been applied, if any?

Yes, definitely. Maybe we can add a "comment field".

@vkrause
Copy link
Member Author

vkrause commented Oct 10, 2021

Easy enough to add though, how much do we want?

I'm not sure. I'd say big enough to include positions in comfortable walking distance (e.g. 500m), or at least positions within common GPS uncertainties (e.g. 30m).

Right. This is probably particularly relevant for those endpoints where the bounding polygon is actually tightly fitted around the covered area (like the ones in the US). The local German ones however tend to be considerably larger than the area they cover properly, due to longer-distance lines leading into their area. For those we'd actually need a better way to trim the bounding area.

On the other hand, an application using this polygon in its business logic can decide much better what buffer to apply; I'd say this boils down to user friendliness vs access to raw data. What do you think?

Right, we do our own processing of the polygons in KPublicTransport, so for that it wouldn't matter either way. Hard to judge what properties would be desired for simpler use-cases.

More generally, we probably want better documentation on where we got the respective bounding polygons from and what kind of post-processing has been applied, if any?

Yes, definitely. Maybe we can add a "comment field".

That's one option, a markdown file with the same name alongside the JSON files might be another, especially if this grows further. Besides the bounding polygons there's probably more details worth documenting, like where to get API keys from (e.g. for TRIAS/OJP/Navitia endpoints), or things we can't model properly in the JSON files yet, like supported Hafas mode groups (see e.g. public-transport/hafas-client#218).

@derhuerst
Copy link
Member

Shall we merge this?

Reading this again, I agree that specifying a buffer around the convex hull of serviced stops – or even specifying the serviced area – is not so trivial and out of scope of this PR.

@vkrause
Copy link
Member Author

vkrause commented Feb 24, 2022

I'd say so, yes. There definitely is still work to be done to clarify how we specify the coverage area, both for the bounding geometry and for the region, but I think that is indeed a separate (and bigger) task.

@derhuerst derhuerst merged commit 5a18f4c into v1 Feb 24, 2022
@derhuerst derhuerst deleted the work/otp-update branch February 24, 2022 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants