Latitude and longitude of ferry from trip planner

hello everyone, as we access trip planner API its returns coords of particular legs, but if there is a ferry in the response of trip planner then it does not returns latitude/longitude of waterways. it returns latitude/longitude of roadways.

please check it the issue.

Could you provide an example? Most ferry routes I’ve tested so far are fine, but it may have been a new ferry route without the corresponding shape in the system.

search for “watsons bay” to “manly beach” the lat long return by the trip planner api is only for road ways instead of waterways.

Could you provide the exact parameters you used in your query?

There are no direct public ferry routes between Manly and Watsons Bay, however, Captain Cook Cruises does offer a limited sightseeing ferry service. They don’t run all day (check the timetable on their website) – so if your query is for a leasttime route with a departure time that doesn’t coincide with the service, a route taken by “roadways” may well be faster and prefered by the trip planner.

The trip planner may also return a journey suggestion for F7 → F1, but journey and interchange times also vary depending on the time of day.

Also re the question of fares, since this is a private ferry service, the fares are unknown as they are set by the operator. You should be able to distinguish between an actual $0 fare vs an unknown fare by checking fare.properties.evaluationTicket == "nswFareNotEnabled". Similar check can be done on each leg by checking if transportation.properties.specialFares == "ROUTE_OUTSIDE_OF_TRANSPORT_AUTHORITY_AREA".

first image is of my application having latitude and longitude from API from trip planner and last image is from google navigation.

both lat long are different.

trip planner sends latitude and longitude of roadways rather than water way like google

Hmm, not sure what’s going on there… shapes are coming out fine on my end.

Using request from Circular Quay to Manly, the first journey’s first leg looks like this:

https://api.transport.nsw.gov.au/v1/tp/trip?TfNSWTR=true&outputFormat=rapidJSON&coordOutputFormat=EPSG%3A4326&depArrMacro=dep&itdDate=20171018&itdTime=2215&type_origin=any&name_origin=20004&type_destination=any&name_destination=209525&calcNumberOfTrips=6&version=10.2.2.48

I also think the question arises of fares, since this is a private ferry service, the fares are unknown…how to find out the fares?

Hi,
Sorry for taking so long to respond here… I’ve been away for a bit.
Regarding the ferry on the road situation, can you please confirm that the coordinates you are using are related to a ferry leg, and not to a bus leg. It looks to me that you are actually getting a bus leg and interpreting the mode of transport incorrectly.
Regarding the fares for private operators (which is a completely separate thing…), TfNSW does not have fare data for private operators, who can set and change their fares without notice to us. Therefore, the trip planner APIs do not have data related to fares for private operators at this time.
Cheers
Vic

hey @vic thanks for reply

i got the answer regarding the fare of ferry but regarding the latitude and longitude there is still a problem.

check out this attached image i have searched for "Neutral Bay new south wales " to “kirribilli New south wales”

here polyline is drawn exactly according to latitude and longitude that is return by the Trip planner API.

let me explain to you.

if we have only two points (source and destination ) then we can draw polyline according to transportation medium.

but here we have whole paths latitude and longitude so there is no matter which transit type you select.

please check

thanks

Can you please share your API response with us

i have searched for "Neutral Bay new south wales " to “Kirribilli New south wales”. here is the response of one of the routes that contain only three legs two for walking and one is for the ferry.

due to limited character post, i have truncated some output. hope you can get what you want :slight_smile:

 {
 "rating": 0,
 "isAdditional": false,
 "interchanges": 0,
 "legs": [{
         "duration": 900,
         "distance": 883,
         "origin": {
             "id": "streetID:53662:108:95343009:1:Ben Boyd Rd:Neutral Bay:Ben Boyd Rd::::ANY:DIVA_ADDRESS:4890458:3751835:GDAV::0",
             "name": "108 Ben Boyd Rd, Neutral Bay",
             "type": "street",
             "coord": [-33.83465,
                 151.21851
             ],
             "parent": {
                 "id": "95343009|-1",
                 "type": "locality"
             },
             "departureTimePlanned": "2017-10-26T05:25:00Z",
             "departureTimeEstimated": "2017-10-26T05:25:00Z",
             "properties": {
                 "downloads": [{
                     "type": "RM",
                     "href": "FILELOAD?Filename=4800_162516522dep_4800_5568_365649843_00006349.pdf"
                 }]
             }
         },
         "destination": {
             "isGlobalId": true,
             "id": "20891",
             "name": "Neutral Bay Wharf",
             "type": "platform",
             "coord": [-33.84232,
                 151.21929
             ],
             "parent": {
                 "id": "10102023",
                 "name": "Neutral Bay Wharf",
                 "type": "stop",
                 "parent": {
                     "id": "95343009|1",
                     "name": "Neutral Bay",
                     "type": "locality"
                 }
             },
             "arrivalTimePlanned": "2017-10-26T05:40:00Z",
             "arrivalTimeEstimated": "2017-10-26T05:40:00Z",
             "properties": {
                 "downloads": [{
                     "type": "RM",
                     "href": "FILELOAD?Filename=4800_162516524dep_4800_5568_365649843_00006349.pdf"
                 }],
                 "WheelchairAccess": "true"
             }
         },
         "transportation": {
             "product": {
                 "class": 100,
                 "name": "Fussweg",
                 "iconId": 100
             }
         },
         "footPathInfo": [{
             "position": "IDEST",
             "duration": 60,
             "footPathElem": [{
                 "description": "",
                 "type": "LEVEL",
                 "levelFrom": 0,
                 "levelTo": 0,
                 "level": "LEVEL",
                 "origin": {
                     "location": {
                         "id": "10102023",
                         "type": "stop",
                         "coord": [-33.84197,
                             151.21901
                         ]
                     },
                     "area": 1,
                     "platform": 0,
                     "georef": "950164211:18:GDAV:100"
                 },
                 "destination": {
                     "location": {
                         "id": "10102023",
                         "type": "stop",
                         "coord": [-33.84232,
                             151.21929
                         ]
                     },
                     "area": 11,
                     "platform": 0,
                     "georef": "950199290:338:GDAV:100"
                 }
             }]
         }],
         "infos": [],
         "coords": [
             [-33.83465,
                 151.21851
             ],
             [-33.83477,
                 151.2183
             ],
             [-33.83518,
                 151.21848
             ],
             [-33.83574,
                 151.21839
             ],
             [-33.83615,
                 151.21816
             ],
             [-33.83676,
                 151.2183
             ],
             [-33.83706,
                 151.21836
             ],
             [-33.83744,
                 151.21829
             ],
             [-33.83773,
                 151.21822
             ],
             [-33.83841,
                 151.21895
             ],
             [-33.83889,
                 151.21907
             ],
             [-33.8389,
                 151.21903
             ],
             [-33.83938,
                 151.21901
             ],
             [-33.83939,
                 151.21901
             ],
             [-33.83969,
                 151.21908
             ],
             [-33.83994,
                 151.21919
             ],
             [-33.83997,
                 151.21902
             ],
             [-33.84046,
                 151.21897
             ],
             [-33.8409,
                 151.21893
             ],
             [-33.84102,
                 151.21893
             ],
             [-33.84187,
                 151.21885
             ],
             [-33.84194,
                 151.21898
             ],
             [-33.84196,
                 151.21899
             ],
             [-33.84197,
                 151.21901
             ],
             [-33.84232,
                 151.21929
             ],
             [-33.84236,
                 151.21924
             ]
         ],
         "pathDescriptions": [{
                 "turnDirection": "STRAIGHT",
                 "manoeuvre": "KEEP",
                 "name": "Ben Boyd Rd",
                 "coord": [-33.83465,
                     151.21851
                 ],
                 "skyDirection": 221,
                 "duration": 20,
                 "cumDuration": 20,
                 "distance": 23,
                 "cumDistance": 23,
                 "fromCoordsIndex": 0,
                 "toCoordsIndex": 0
             },
             {
                 "turnDirection": "LEFT",
                 "manoeuvre": "TURN",
                 "name": "Undercliff St",
                 "coord": [-33.83477,
                     151.2183
                 ],
                 "skyDirection": 159,
                 "duration": 445,
                 "cumDuration": 465,
                 "distance": 494,
                 "cumDistance": 517,
                 "fromCoordsIndex": 0,
                 "toCoordsIndex": 7
             },
             {
                 "turnDirection": "RIGHT",
                 "manoeuvre": "TURN",
                 "name": "Aubin St",
                 "coord": [-33.83889,
                     151.21907
                 ],
                 "skyDirection": 156,
                 "duration": 4,
                 "cumDuration": 469,
                 "distance": 4,
                 "cumDistance": 521,
                 "fromCoordsIndex": 7,
                 "toCoordsIndex": 10
             },
             {
                 "turnDirection": "LEFT",
                 "manoeuvre": "TURN",
                 "name": "",
                 "coord": [-33.8389,
                     151.21903
                 ],
                 "skyDirection": 185,
                 "duration": 49,
                 "cumDuration": 518,
                 "distance": 55,
                 "cumDistance": 576,
                 "fromCoordsIndex": 10,
                 "toCoordsIndex": 11
             },
             {
                 "turnDirection": "STRAIGHT",
                 "manoeuvre": "CONTINUE",
                 "name": "",
                 "coord": [-33.83938,
                     151.21901
                 ],
                 "skyDirection": 172,
                 "duration": 57,
                 "cumDuration": 575,
                 "distance": 63,
                 "cumDistance": 639,
                 "fromCoordsIndex": 11,
                 "toCoordsIndex": 12
             },
             {
                 "turnDirection": "RIGHT",
                 "manoeuvre": "TURN",
                 "name": "Kurraba Rd",
                 "coord": [-33.83994,
                     151.21919
                 ],
                 "skyDirection": 179,
                 "duration": 14,
                 "cumDuration": 589,
                 "distance": 16,
                 "cumDistance": 655,
                 "fromCoordsIndex": 12,
                 "toCoordsIndex": 15
             },
             {
                 "turnDirection": "LEFT",
                 "manoeuvre": "TURN",
                 "name": "Hayes St",
                 "coord": [-33.83997,
                     151.21902
                 ],
                 "skyDirection": 183,
                 "duration": 189,
                 "cumDuration": 778,
                 "distance": 210,
                 "cumDistance": 865,
                 "fromCoordsIndex": 15,
                 "toCoordsIndex": 19
             },
             {
                 "turnDirection": "SLIGHT_LEFT",
                 "manoeuvre": "TURN",
                 "name": "",
                 "coord": [-33.84187,
                     151.21885
                 ],
                 "skyDirection": 168,
                 "duration": 16,
                 "cumDuration": 794,
                 "distance": 18,
                 "cumDistance": 883,
                 "fromCoordsIndex": 19,
                 "toCoordsIndex": 22
             }
         ],
         "properties": {
             "PTWalkMinutes": "1"
         }
     },
     {
         "duration": 360,
         "isRealtimeControlled": true,
         "origin": {
             "isGlobalId": true,
             "id": "20891",
             "name": "Neutral Bay, Neutral Bay Wharf",
             "type": "platform",
             "coord": [-33.84232,
                 151.21929
             ],
             "parent": {
                 "id": "10102023",
                 "name": "Neutral Bay, Neutral Bay Wharf",
                 "disassembledName": "Neutral Bay Wharf",
                 "type": "stop",
                 "parent": {
                     "id": "95343009|1",
                     "name": "Neutral Bay",
                     "type": "locality"
                 }
             },
             "departureTimePlanned": "2017-10-26T05:40:00Z",
             "departureTimeEstimated": "2017-10-26T05:40:00Z",
             "properties": {
                 "downloads": [{
                     "type": "RM",
                     "href": "FILELOAD?Filename=4800_162516524dep_4800_5568_365649843_00006349.pdf"
                 }],
                 "WheelchairAccess": "true"
             }
         },
         "destination": {
             "isGlobalId": true,
             "id": "20614",
             "name": "Kirribilli, Kirribilli Wharf",
             "type": "platform",
             "coord": [-33.84936,
                 151.22029
             ],
             "parent": {
                 "id": "10102018",
                 "name": "Kirribilli, Kirribilli Wharf",
                 "disassembledName": "Kirribilli Wharf",
                 "type": "stop",
                 "parent": {
                     "id": "95343005|1",
                     "name": "Kirribilli",
                     "type": "locality"
                 }
             },
             "arrivalTimePlanned": "2017-10-26T05:46:00Z",
             "arrivalTimeEstimated": "2017-10-26T05:46:00Z",
             "properties": {
                 "downloads": [{
                     "type": "RM",
                     "href": "FILELOAD?Filename=4800_162516525dep_4800_5568_365649843_00006349.pdf"
                 }],
                 "WheelchairAccess": "false"
             }
         },
         "transportation": {
             "id": "nsw:090F5: :R:sj2",
             "name": "Sydney Ferries Netwo F5 Neutral Bay",
             "disassembledName": "F5",
             "number": "F5 Neutral Bay",
             "iconId": 10,
             "description": "Neutral Bay to Circular Quay",
             "product": {
                 "class": 9,
                 "name": "Sydney Ferries Netwo",
                 "iconId": 9
             },
             "operator": {
                 "code": "SF",
                 "name": "Sydney Ferries"
             },
             "destination": {
                 "name": "Circular Quay",
                 "type": "stop"
             },
             "properties": {
                 "isTTB": true,
                 "tripCode": 33,
                 "mtSubcode": "0",
                 "RealtimeTripId": "nsw-9-F5-_-sj2-3-22-AA51"
             }
         },
         "stopSequence": [{
                 "isGlobalId": true,
                 "id": "20891",
                 "name": "Neutral Bay, Neutral Bay Wharf",
                 "type": "platform",
                 "coord": [-33.84232,
                     151.21929
                 ],
                 "parent": {
                     "id": "10102023",
                     "name": "Neutral Bay, Neutral Bay Wharf",
                     "disassembledName": "Neutral Bay Wharf",
                     "type": "stop",
                     "parent": {
                         "id": "95343009|1",
                         "name": "Neutral Bay",
                         "type": "locality"
                     }
                 },
                 "properties": {
                     "WheelchairAccess": "true",
                     "AREA_NIVEAU_DIVA": "0"
                 },
                 "departureTimePlanned": "2017-10-26T05:40:00Z",
                 "departureTimeEstimated": "2017-10-26T05:40:00Z"
             },
             {
                 "isGlobalId": true,
                 "id": "20892",
                 "name": "Kurraba Point, Kurraba Point Wharf",
                 "type": "platform",
                 "coord": [-33.84343,
                     151.22183
                 ],
                 "parent": {
                     "id": "10102024",
                     "name": "Kurraba Point, Kurraba Point Wharf",
                     "disassembledName": "Kurraba Point Wharf",
                     "type": "stop",
                     "parent": {
                         "id": "95343021|1",
                         "name": "Kurraba Point",
                         "type": "locality"
                     }
                 },
                 "properties": {
                     "WheelchairAccess": "false",
                     "AREA_NIVEAU_DIVA": "0"
                 },
                 "arrivalTimePlanned": "2017-10-26T05:43:00Z",
                 "departureTimePlanned": "2017-10-26T05:43:00Z",
                 "arrivalTimeEstimated": "2017-10-26T05:43:00Z",
                 "departureTimeEstimated": "2017-10-26T05:43:00Z"
             },
             {
                 "isGlobalId": true,
                 "id": "20614",
                 "name": "Kirribilli, Kirribilli Wharf",
                 "type": "platform",
                 "coord": [-33.84936,
                     151.22029
                 ],
                 "parent": {
                     "id": "10102018",
                     "name": "Kirribilli, Kirribilli Wharf",
                     "disassembledName": "Kirribilli Wharf",
                     "type": "stop",
                     "parent": {
                         "id": "95343005|1",
                         "name": "Kirribilli",
                         "type": "locality"
                     }
                 },
                 "properties": {
                     "WheelchairAccess": "false",
                     "AREA_NIVEAU_DIVA": "0"
                 },
                 "arrivalTimePlanned": "2017-10-26T05:46:00Z",
                 "arrivalTimeEstimated": "2017-10-26T05:46:00Z"
             }
         ],
         "infos": [],
         "coords": [
             [-33.84237,
                 151.21924
             ],
             [-33.84238,
                 151.21925
             ],
             [-33.84242,
                 151.2193
             ],
             [-33.84247,
                 151.21934
             ],
             [-33.84251,
                 151.21939
             ],
             [-33.84256,
                 151.21943
             ],
             [-33.8426,
                 151.21948
             ],
             [-33.84265,
                 151.21954
             ],
             [-33.84268,
                 151.21958
             ],
             [-33.84271,
                 151.21964
             ],
             [-33.84275,
                 151.2197
             ],
             [-33.84278,
                 151.21977
             ],
             [-33.84281,
                 151.21985
             ],
             [-33.84285,
                 151.21993
             ],
             [-33.84286,
                 151.22001
             ],
             [-33.84289,
                 151.2201
             ],
             [-33.84296,
                 151.2204
             ],
             [-33.84299,
                 151.22054
             ],
             [-33.843,
                 151.22061
             ],
             [-33.84303,
                 151.2207
             ],
             [-33.84309,
                 151.22104
             ],
             [-33.84311,
                 151.22118
             ],
             [-33.84314,
                 151.22126
             ],
             [-33.84315,
                 151.22132
             ],
             [-33.84318,
                 151.22139
             ],
             [-33.8432,
                 151.22144
             ],
             [-33.84323,
                 151.22152
             ],
             [-33.84325,
                 151.22155
             ],
             [-33.84327,
                 151.22159
             ],
             [-33.84329,
                 151.22161
             ],
             [-33.8433,
                 151.22162
             ],
             [-33.84332,
                 151.22164
             ],
             [-33.84335,
                 151.22165
             ],
             [-33.84337,
                 151.22167
             ],
             [-33.84341,
                 151.22168
             ],
             [-33.84344,
                 151.22168
             ],
             [-33.84344,
                 151.22168
             ],
             [-33.84352,
                 151.22167
             ],
             [-33.84363,
                 151.22167
             ],
             [-33.84372,
                 151.22165
             ],
             [-33.84383,
                 151.22163
             ],
             [-33.84394,
                 151.2216
             ],
             [-33.84418,
                 151.22153
             ],
             [-33.84428,
                 151.22151
             ],
             [-33.84439,
                 151.22149
             ],
             [-33.84449,
                 151.22147
             ],
             [-33.84464,
                 151.22146
             ],
             [-33.8448,
                 151.22144
             ],
             [-33.84496,
                 151.22144
             ],
             [-33.84511,
                 151.22144
             ],
             [-33.8452,
                 151.22144
             ],
             [-33.84529,
                 151.22145
             ],
             [-33.8457,
                 151.22149
             ],
             [-33.84579,
                 151.22149
             ],
             [-33.84587,
                 151.2215
             ],
             [-33.84607,
                 151.22151
             ],
             [-33.84628,
                 151.2215
             ],
             [-33.84649,
                 151.2215
             ],
             [-33.84669,
                 151.22147
             ],
             [-33.84688,
                 151.22146
             ],
             [-33.84705,
                 151.22144
             ],
             [-33.8472,
                 151.22141
             ],
             [-33.84735,
                 151.22139
             ],
             [-33.8475,
                 151.22135
             ],
             [-33.84765,
                 151.22133
             ],
             [-33.84779,
                 151.22128
             ],
             [-33.84793,
                 151.22124
             ],
             [-33.84812,
                 151.22118
             ],
             [-33.84831,
                 151.2211
             ],
             [-33.8485,
                 151.22102
             ],
             [-33.84869,
                 151.22093
             ],
             [-33.84887,
                 151.22084
             ],
             [-33.84905,
                 151.22074
             ],
             [-33.84923,
                 151.22062
             ],
             [-33.84941,
                 151.22051
             ]
         ],
         "properties": {
             "vehicleAccess": [
                 "0|0|0|0|3500"
             ],
             "PlanWheelChairAccess": "1"
         }
     },
     {
         "duration": 360,
         "distance": 277,
         "origin": {
             "isGlobalId": true,
             "id": "20614",
             "name": "Kirribilli Wharf",
             "type": "platform",
             "coord": [-33.84936,
                 151.22029
             ],
             "parent": {
                 "id": "10102018",
                 "name": "Kirribilli Wharf",
                 "type": "stop",
                 "parent": {
                     "id": "95343005|1",
                     "name": "Kirribilli",
                     "type": "locality"
                 }
             },
             "departureTimePlanned": "2017-10-26T05:46:00Z",
             "departureTimeEstimated": "2017-10-26T05:46:00Z",
             "properties": {
                 "downloads": [{
                     "type": "RM",
                     "href": "FILELOAD?Filename=4800_162516525dep_4800_5568_365649843_00006349.pdf"
                 }],
                 "WheelchairAccess": "false"
             }
         },
         "destination": {
             "id": "streetID:53596:12:95343005:1:Peel St:Kirribilli:Peel St::::ANY:DIVA_ADDRESS:4890295:3753445:GDAV::0",
             "name": "12 Peel St, Kirribilli",
             "type": "street",
             "coord": [-33.84919,
                 151.21746
             ],
             "parent": {
                 "id": "95343005|-1",
                 "type": "locality"
             },
             "arrivalTimePlanned": "2017-10-26T05:52:00Z",
             "arrivalTimeEstimated": "2017-10-26T05:52:00Z",
             "properties": {
                 "downloads": [{
                     "type": "RM",
                     "href": "FILELOAD?Filename=4800_162516527arr_4800_5568_365649843_00006349.pdf"
                 }]
             }
         },
         "transportation": {
             "product": {
                 "class": 100,
                 "name": "Fussweg",
                 "iconId": 100
             }
         },
         "footPathInfo": [{
             "position": "BEFORE",
             "duration": 60,
             "footPathElem": [{
                 "description": "",
                 "type": "LEVEL",
                 "levelFrom": 0,
                 "levelTo": 0,
                 "level": "LEVEL",
                 "origin": {
                     "location": {
                         "id": "10102018",
                         "type": "stop",
                         "coord": [-33.84936,
                             151.22029
                         ]
                     },
                     "area": 11,
                     "platform": 0,
                     "georef": "950199281:681:GDAV:100"
                 },
                 "destination": {
                     "location": {
                         "id": "10102018",
                         "type": "stop",
                         "coord": [-33.84943,
                             151.21959
                         ]
                     },
                     "area": 1,
                     "platform": 0,
                     "georef": "100573119:83:GDAV:100"
                 }
             }]
         }],
         "infos": [],
         "coords": [
             [-33.84936,
                 151.22029
             ],
             [-33.84943,
                 151.21959
             ],
             [-33.84942,
                 151.21959
             ],
             [-33.84961,
                 151.21871
             ],
             [-33.84944,
                 151.21875
             ],
             [-33.84889,
                 151.21809
             ],
             [-33.84935,
                 151.2177
             ],
             [-33.84919,
                 151.21745
             ],
             [-33.84919,
                 151.21746
             ]
         ],
         "pathDescriptions": [{
                 "turnDirection": "STRAIGHT",
                 "manoeuvre": "KEEP",
                 "name": "Holbrook Av",
                 "coord": [-33.84942,
                     151.21959
                 ],
                 "skyDirection": 255,
                 "duration": 74,
                 "cumDuration": 74,
                 "distance": 83,
                 "cumDistance": 83,
                 "fromCoordsIndex": 0,
                 "toCoordsIndex": 0
             },
             {
                 "turnDirection": "SHARP_RIGHT",
                 "manoeuvre": "TURN",
                 "name": "Carabella St",
                 "coord": [-33.84961,
                     151.21871
                 ],
                 "skyDirection": 292,
                 "duration": 94,
                 "cumDuration": 168,
                 "distance": 104,
                 "cumDistance": 187,
                 "fromCoordsIndex": 0,
                 "toCoordsIndex": 1
             },
             {
                 "turnDirection": "LEFT",
                 "manoeuvre": "TURN",
                 "name": "Peel St",
                 "coord": [-33.84889,
                     151.21809
                 ],
                 "skyDirection": 287,
                 "duration": 56,
                 "cumDuration": 224,
                 "distance": 63,
                 "cumDistance": 250,
                 "fromCoordsIndex": 1,
                 "toCoordsIndex": 3
             },
             {
                 "turnDirection": "RIGHT",
                 "manoeuvre": "TURN",
                 "name": "McBurney Lane",
                 "coord": [-33.84935,
                     151.2177
                 ],
                 "skyDirection": 291,
                 "duration": 25,
                 "cumDuration": 249,
                 "distance": 27,
                 "cumDistance": 277,
                 "fromCoordsIndex": 3,
                 "toCoordsIndex": 6
             }
         ],
         "properties": {
             "PTWalkMinutes": "1"
         }
     }
 ],

}

That looks fine to me… the coordinates are going through the water. Are you sure you are using the data from the correct leg when drawing your polyline?