Giter Site home page Giter Site logo

Comments (4)

derhuerst avatar derhuerst commented on June 2, 2024

(I looked into this using the DB profile.) It seems like, without opt.polylines (a.k.a. getPolyline), HAFAS returned wrong leg distances, 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.

derhuerst avatar derhuerst commented on June 2, 2024

It seems like, without opt.polylines (a.k.a. getPolyline), HAFAS returns wrong leg distances […].

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.

derhuerst avatar derhuerst commented on June 2, 2024

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.

dabund24 avatar dabund24 commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.