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

Server only accepts GK4 coordinates #20

Closed
kiliankoe opened this issue Feb 24, 2017 · 2 comments
Closed

Server only accepts GK4 coordinates #20

kiliankoe opened this issue Feb 24, 2017 · 2 comments
Labels

Comments

@kiliankoe
Copy link
Owner

kiliankoe commented Feb 24, 2017

The server doesn't seem to be wanting to accept a coordinate converted from WGS84 to GK4 internally. Ugh.

curl -X "POST" "https://webapi.vvo-online.de/tr/pointfinder?format=json" \
     -H "Content-Type: application/json;charset=UTF-8" \
     -d $'{
  "limit": 0,
  "assignedstops": true,
  "query": "coord:5412867:5659752" # should be Albertplatz
}'
{
  "PointStatus": "NotIdentified",
  "Status": {
    "Code": "ServiceError",
    "Message": "no it connection"
  }
}

vs.

curl -X "POST" "https://webapi.vvo-online.de/tr/pointfinder?format=json" \
     -H "Content-Type: application/json;charset=UTF-8" \
     -d $'{
  "limit": 0,
  "assignedstops": true,
  "query": "coord:4621016:5655920" # should be Helmholtzstraße
}'
{
  "PointStatus": "Identified",
  "Status": {
    "Code": "Ok"
  },
  "Points": [
    "coord:4621020:504065:NAV4:Nöthnitzer Straße 46|c||Nöthnitzer Straße 46|5655935|4621020|0||",
    "33000742|||Helmholtzstraße|5655904|4621157|141||",
    "33000513|||Regensburger Straße|5655983|4620849|177||",
    "33000135|||Plauen Nöthnitzer Straße|5656060|4620527|507||",
    "33000134|||Münchner Platz|5656372|4620892|539||"
  ],
  "ExpirationTime": "\/Date(1488000580778+0100)\/"
}
@dirkonet
Copy link

coord:5412867:5659752

That's Gauss-Krüger zone 5. Convert it to zone 4 and it might be accepted. Dresden is in zone 5, but for some reason, all VVO coordinates are in zone 4 format.

kiliankoe added a commit that referenced this issue Feb 27, 2017
@kiliankoe kiliankoe changed the title findNear ServiceError Server only accepts GK4 coordinates Mar 20, 2017
kiliankoe added a commit that referenced this issue Mar 20, 2017
there's no parsing of pin strings. also, the API is accepting
the wrong coordinate format, making it impossible to send of
these requests at the current time. see #20
kiliankoe added a commit that referenced this issue Mar 22, 2017
This is basically a workaround. #20 still persists. But should
someone have GK4 coordinates handy they might as well use them
in the requests as well ¯\_(ツ)_/¯
@kiliankoe
Copy link
Owner Author

Dumping this here for posterity (so that I don't forget). Just checked with @lucasvog if it just comes down to a fixed offset, which it apparently does. We're not entirely sure about the exact values, but -789700 and 750 seem to work rather well.

kiliankoe added a commit that referenced this issue Jun 20, 2018
closes #20
see #21

Co-authored-by: Lucas Vogel <github@lucas-vogel.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants