Epsg 4326


#1

Hey I am trying to consume the new trip planner API, but not sure how to format the normal Latitude/Longitude coordinates to EPSG 4326? Anyone can share a example? Thanks


#2

Hey @sunnyy02,

EPSG 4326 / WGS84 is what one would colloquially call “normal Latitude/Longitude”.

The coordinates provided to and returned by the Trip Planner API are in EPSG 4326 by default.

Are you trying to transform to another coordinate system other than EPSG 4326?


#3

Thanks, jxeeno for your quick reply. I have tried to use normal coordinates like this “…type_origin=any&name_origin=151.06488:-33.84801:EPSG:4326&type_destination=an…”, but the response is always empty. But if I swap it with stop id, then it will return something. That is why I thought the coordinates need to be convert to EPSG.


#4

Have you tried using type_origin=coord?

The request works fine for me:

https://api.transport.nsw.gov.au/v1/tp/trip?outputFormat=rapidJSON&coordOutputFormat=EPSG%3A4326&depArrMacro=dep&itdDate=20170508&itdTime=1200&type_origin=coord&name_origin=151.206290%3A-33.884080%3AEPSG%3A4326&type_destination=any&name_destination=10102027&calcNumberOfTrips=6&TfNSWTR=true&version=10.2.1.15


#5

Yes! that fix the issue. Many thanks.