Comments (4)
(I looked into this using the DB profile.) It seems like, without opt.polylines
(a.k.a. getPolyline
), HAFAS returned wrong leg distance
s, presumably because they're just estimated or even a static fallback value.
With getPolyline: false
:
{
"type": "WALK",
"dep": {
"locX": 1,
"dTimeS": "083100",
"dTZOffset": 120,
"type": "N"
},
"arr": {
"locX": 3,
"aTimeS": "084000",
"aTZOffset": 120,
"type": "N"
},
"gis": {
"dist": 500,
"durS": "000900",
"dirGeo": 4,
"ctx": "H|1|W$A=1@O=Berlin Hbf (tief)@L=8098160@a=128@$A=1@O=Berlin Hbf (S-Bahn)@L=8089021@a=128@$202309260831$202309260840$$$1$$$$$$|#VE#2#CF#100#CA#0#CM#0#SICT#0#AM#17#AM2#0#RT#8#",
"gisPrvr": "H",
"getDescr": true,
"getPoly": true,
"sumLDrawStyleX": 2,
"resLDrawStyleX": 3,
"prodX": 1
},
"resState": "N",
"resRecommendation": "N"
}
With getPolyline: true
:
{
"type": "WALK",
"dep": {
"dInR": true,
"dTZOffset": 120,
"dTimeS": "083100",
"locX": 17,
"type": "N"
},
"arr": {
"aOutR": true,
"aTZOffset": 120,
"aTimeS": "084000",
"locX": 15,
"type": "N"
},
"gis": {
"ctx": "H|1|W$A=1@O=Berlin Hbf (tief)@L=8098160@a=128@$A=1@O=Berlin Hbf (S-Bahn)@L=8089021@a=128@$202309260831$202309260840$$$1$$$$$$|#VE#2#CF#100#CA#0#CM#0#SICT#0#AM#49#AM2#0#RT#7#",
"dirGeo": 4,
"dist": 80,
"durS": "000900",
"gisPrvr": "H",
"poly": {
"crdEncF": "??",
"crdEncS": "NN",
"crdEncYX": "q}q_IqbrpAfCmA",
"crdEncZ": "??",
"delta": true,
"dim": 3,
"ppLocRefL": [
{"locX": 17, "ppIdx": 0},
{"locX": 15, "ppIdx": 1}
],
"type": "WGS84"
}
},
"icoX": 11,
"resRecommendation": "N",
"resState": "N"
}
from hafas-client.
It seems like, without
opt.polylines
(a.k.a.getPolyline
), HAFAS returns wrong legdistance
s […].
This doesn't seem to be the case with the VBB endpoint (and the parameters current VBB hafas-client
profile, of course).
With getPolyline: false
:
{
"type": "WALK",
"dep":
{
"locX": 1,
"dTimeS": "083100",
"dTimeFS":
{
"styleX": 0
},
"type": "N"
},
"arr":
{
"locX": 2,
"aTimeS": "084000",
"aTimeFS":
{
"styleX": 0
},
"type": "N"
},
"chg":
{
"txt": "Umstieg",
"durS": "000900",
"durFS":
{
"styleX": 1,
"txt": "9 Min"
}
},
"gis":
{
"dist": 67,
"durS": "000900",
"dirGeo": 10,
"ctx": "H|1|W$A=1@O=S+U Berlin Hauptbahnhof (tief)@L=900003200@a=128@$A=1@O=S+U Berlin Hauptbahnhof@L=900003201@a=128@$202309260831$202309260840$$$1$$$$$$",
"gisPrvr": "H",
"getDescr": true,
"getPoly": true,
"sumLDrawStyleX": 2,
"resLDrawStyleX": 3,
"prodX": 6
}
}
With getPolyline: true
:
{
"type": "WALK",
"dep":
{
"locX": 1,
"dTimeS": "083100",
"dTimeFS":
{
"styleX": 0
},
"type": "N"
},
"arr":
{
"locX": 2,
"aTimeS": "084000",
"aTimeFS":
{
"styleX": 0
},
"type": "N"
},
"chg":
{
"txt": "Umstieg",
"durS": "000900",
"durFS":
{
"styleX": 1,
"txt": "9 Min"
}
},
"gis":
{
"dist": 67,
"durS": "000900",
"dirGeo": 10,
"ctx": "H|1|W$A=1@O=S+U Berlin Hauptbahnhof (tief)@L=900003200@a=128@$A=1@O=S+U Berlin Hauptbahnhof@L=900003201@a=128@$202309260831$202309260840$$$1$$$$$$",
"polyG":
{
"polyXL":
[
1
]
},
"gisPrvr": "H",
"getDescr": true,
"getPoly": true,
"sumLDrawStyleX": 2,
"resLDrawStyleX": 3,
"prodX": 6
}
}
from hafas-client.
This problem seems to be there on a lot of/maybe all profiles (I haven't tried all).
Which ones did you witness the behaviour with?
from hafas-client.
It looks like I was a little bit too pessimistic about that issue after also having had stumbled across it with sbahn-muenchen
and mobil-nrw
. I've tested more profiles and vrn
is another one with faulty distances. On the other hand, with bvg
, oebb
, nahsh
and vmt
Hafas returns distances properly.
Also, thanks for figuring out the workaround, it fixes the issue for every tested profile :D
from hafas-client.
Related Issues (20)
- Make hafas-client work in browser / webpack HOT 9
- With hafas-client@6 and db profile, getting earlier journeys is broken HOT 1
- Is there a way to query journeys from a certain timepoint to a certain time point? HOT 9
- SNCB: switch to new rest.exe API HOT 2
- PKP error - something changed? HOT 6
- DB endpoint responds with CLIENTVERSION when using user agents from docs HOT 13
- DB: make routing mode configurable, so that cancelled trips can be queried & pagination works HOT 10
- DB: server errors with stop() and ver > 1.16 HOT 6
- DB: support "best price search" HOT 10
- HAFAS answers often with "ECONNRESET" HOT 7
- XSS vulnerability in some HAFAS instances HOT 3
- DB: get URL to offers HOT 20
- /journeys invalid poi HOT 1
- support environments without support for createRequire() & JSON modules HOT 4
- wrong date parsed for next-day DEVI legs on overnight journeys HOT 4
- journeys(): Add attribute `additional` for stopovers HOT 2
- ERR_REQUIRE_ESM HOT 1
- refreshJourney never fills price HOT 2
- refreshToken: always returns 404 from/to Köln/Bonn Flughafen station HOT 2
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 hafas-client.