Comments (14)
Honestly I don't quite see the point of such a "negative capability" which seems a bit counter-intuitive. Why not adding the REALTIME
capability and returning true
for hasCapability(REALTIME)
in all providers as a default, and ensure it will return false
for the ones that do not provide realtime information?
from public-transport-enabler.
A "via" capability sounds like a good idea to me.
What's the difference between being able to tell delays and realtime?
from public-transport-enabler.
A "via" capability sounds like a good idea to me.
Do you want to add this, or should I prepare an MR?
What's the difference between being able to tell delays and realtime?
Transportr for example lets you reload a trip to get current delays. I would hide this option for providers that do not provide delays anyway. The name for that capability could be REALTIME
or PROVIDES_DELAYS
.
from public-transport-enabler.
Sure, please go ahead (-:
What does reloading a trip mean? Pte doesn't have an API for this, no? Don't get me wrong, I just want to understand the semantics exactly.
from public-transport-enabler.
What does reloading a trip mean? Pte doesn't have an API for this, no?
PTE does have no API for it, but I just do another trip query for exactly the trip to be reloaded and then pick it from the result set and refresh the display.
from public-transport-enabler.
@ialokim in case you are bored, this ticket is a low hanging fruit and would help with Navitia-based providers that don't respect VIA locations.
from public-transport-enabler.
Haha, okay I'll look into it.
from public-transport-enabler.
There could be cases where delays are provided e.g. on the departures endpoint, but not while querying trips. Currently this seems to be the case for AbstractHafasLegacyProvider
using the XML endpoint (?),
Perhaps we should add two new capabilities DEPARTURES_REALTIME
and TRIPS_REALTIME
. Any opinions on this?
from public-transport-enabler.
I only have a use-case for trip realtime and I guess the legacy provider will go away at some point, but would refer to @schildbach for a decision.
from public-transport-enabler.
The realtime capability is more complicated, it usually depends on the line (or even the specific car/train). Also, sometimes the realtime info is missing entirely for a given provider.
So for now, from this issue I'd only consider the VIA cap.
from public-transport-enabler.
it usually depends on the line (or even the specific car/train).
Sure, the capability would not express that there is real-time data for every single line or even train, but that there could be some (because it is provided by the endpoint and handled by pte), so that it makes sense to offer a reload functionality.
Also, sometimes the realtime info is missing entirely for a given provider.
That would be the exact use case we would cover with this (or these) realtime flag(s). I've already checked and it seems realtime is not handled by navitia nor by one or two custom providers, but it is handled by default in the efaProvider and hafasProviders. Not sure if there are some endpoints using hafas or efa which do not provide real-time data, in these cases the method hasCapability
should be overridden.
I've already implemented both of the flags but if you want I could reduce the PR to the VIA
capability.
from public-transport-enabler.
Yes, please at least separate commits.
from public-transport-enabler.
For the record: Identifying providers that will definitely not report real-time information would be sufficient for me.
from public-transport-enabler.
@grote For that, we'd need "negative capabilities", so e.g. NO_REALTIME
.
from public-transport-enabler.
Related Issues (20)
- IT: java.lang.IllegalArgumentException: Unhandled error id: no_origin
- GTFS without Navitia HOT 4
- SNCF real-time data
- Crash on NS (Netherlands) HOT 1
- Location: equals(…) is not symmetric
- IT: java.lang.IllegalArgumentException: Unhandled error id: no_destination
- MVV Trip Delays are always 0 HOT 4
- Add support for STIB (Brussels) HOT 1
- BEG (BayernProvider) has no colors for S-Bahn lines in Munich
- Add support for Zenbus API
- Discussion: Polish GTFS providers? HOT 1
- Suburban trains in Madrid metro area missing
- MVV provider broken HOT 2
- London Elizabeth Line HOT 3
- Error checking for a bus connection
- VVO: UNKNOWN_FROM HOT 1
- SPAIN: java.lang.IllegalArgumentException: Unhandled error id: no_origin
- DB: UNRESOLVABLE_ADDRESS HOT 1
- VGN: platforms missing
- SE: UNRESOLVABLE_ADDRESS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from public-transport-enabler.