ed-g / otp-api-proxy Goto Github PK
View Code? Open in Web Editor NEWOpenTripPlanner API proxy
License: Eclipse Public License 1.0
OpenTripPlanner API proxy
License: Eclipse Public License 1.0
stop_code is provided in the GTFS. I believe that OTP does provide this in planner results. We see null values in stop_code from otp-api-proxy.
{
"date" : 1445632140000,
"from" : {
"name" : "South Harbor Boulevard",
"lon" : -117.91541338573779,
"lat" : 33.80464805427682,
"orig" : "",
"vertexType" : "NORMAL"
},
"to" : {
"name" : "Memory Lane",
"lon" : -117.86715233781749,
"lat" : 33.772752637963684,
"orig" : "",
"vertexType" : "NORMAL"
},
"itineraries" : [ {
"waitingTime" : 2,
"startTime" : 1445655025000,
"endTime" : 1445658565000,
"fare" : {
"fare" : {
"regular" : {
"currency" : {
"currency" : "USD",
"defaultFractionDigits" : 2,
"currencyCode" : "USD",
"symbol" : "$"
},
"cents" : 300
}
}
},
"elevationGained" : 0.0,
"duration" : 3540,
"walkLimitExceeded" : false,
"tooSloped" : false,
"walkTime" : 2518,
"walkDistance" : 728.187333303796,
"legs" : [ {
"rentedBike" : false,
"departureDelay" : 0,
"agencyTimeZoneOffset" : -25200000,
"startTime" : 1445655025000,
"endTime" : 1445655779000,
"steps" : [ {
"streetName" : "South Harbor Boulevard",
"elevation" : [ ],
"relativeDirection" : "DEPART",
"absoluteDirection" : "SOUTH",
"bogusName" : false,
"lon" : -117.91541338573779,
"lat" : 33.80464805427682,
"stayOn" : false,
"area" : false,
"distance" : 173.92
}, {
"streetName" : "path",
"elevation" : [ ],
"relativeDirection" : "RIGHT",
"absoluteDirection" : "WEST",
"bogusName" : true,
"lon" : -117.9153869,
"lat" : 33.8030842,
"stayOn" : false,
"area" : false,
"distance" : 40.760999999999996
} ],
"mode" : "WALK",
"duration" : 754.0,
"route" : "",
"interlineWithPreviousLeg" : false,
"legGeometry" : {
"points" : "_nimEjjunUdA?|@?l@Aj@?ZA^?\\A?ZDCj@?",
"length" : 11
},
"realTime" : false,
"pathway" : false,
"from" : {
"name" : "South Harbor Boulevard",
"lon" : -117.91541338573779,
"lat" : 33.80464805427682,
"departure" : 1445655025000,
"orig" : "",
"vertexType" : "NORMAL"
},
"distance" : 214.68099999999998,
"transitLeg" : false,
"arrivalDelay" : 0,
"to" : {
"departure" : 1445655780000,
"arrival" : 1445655779000,
"stopCode" : null,
"name" : "Portofino Stop",
"vertexType" : "TRANSIT",
"stopId" : "248:778154",
"lon" : -117.91547,
"lat" : 33.80284,
"stopIndex" : 1,
"stopSequence" : 2
}
}, {
"rentedBike" : false,
"departureDelay" : 0,
"agencyTimeZoneOffset" : -25200000,
"startTime" : 1445655780000,
"routeLongName" : "Santa Ana Line",
"endTime" : 1445656800000,
"steps" : [ ],
"mode" : "BUS",
"duration" : 1020.0,
"route" : "19",
"interlineWithPreviousLeg" : false,
"legGeometry" : {
"points" : "wbimEbjunU??dRM?lJQJAZNPTCNV@v@?nCHJR@F_AKoCGYYSEsKfUS?kV?u^uJHmOBqO@@gM`C@n@Od@a@\\sAJ{G^oArDuDl@|@PQFu@\\a@??FKYi@~FmGHUdR_SAkL?mUBwMCcL?}OHaAn@{EFoB?qK?mP@kOb@cEb@eB|@uBZiCBsNMoAYqBEy@Fi@vP?~OB|@Ph@h@b@d@f@^nAPtBB|MEhIDtLD|N@pG@pKBrOAIvGAtEAnAIn@Qh@q@l@}DtBcAuAd@u@EC[@OBW\\",
"length" : 90
},
"agencyName" : "Anaheim Resort Transportation",
"realTime" : false,
"routeColor" : "2C0093",
"serviceDate" : "20151023",
"agencyUrl" : "http://www.rideart.org/",
"routeUrl" : "http://rideart.org/routes-and-schedules/mainplace-line/",
"pathway" : false,
"routeHumanFrequency" : "See schedule",
"headsign" : "Disneyland Resort",
"from" : {
"departure" : 1445655780000,
"arrival" : 1445655779000,
"stopCode" : null,
"name" : "Portofino Stop",
"vertexType" : "TRANSIT",
"stopId" : "248:778154",
"lon" : -117.91547,
"lat" : 33.80284,
"stopIndex" : 1,
"stopSequence" : 2
},
"tripId" : "111260A1639B2933",
"agencyId" : "248",
"routeId" : "1713",
"distance" : 5950.749039460567,
"transitLeg" : true,
"arrivalDelay" : 0,
"routeTextColor" : "FFFFFF",
"routeType" : 3,
"routeShortName" : "19",
"to" : {
"departure" : 1445656801000,
"arrival" : 1445656800000,
"stopCode" : null,
"name" : "Main St. & Mainplace Mall",
"vertexType" : "TRANSIT",
"stopId" : "248:780771",
"lon" : -117.87105,
"lat" : 33.77476,
"stopIndex" : 4,
"stopSequence" : 5
},
"routeSpan" : {
"early" : {
"source_table" : "frequencies",
"route_id" : "1713",
"feed_name" : "anaheim-ca-us",
"departure_time" : "2015-10-23T17:00:00Z"
},
"late" : {
"source_table" : "stop_times",
"route_id" : "1713",
"feed_name" : "anaheim-ca-us",
"departure_time" : "2015-10-24T05:30:00Z"
}
}
}, {
"rentedBike" : false,
"departureDelay" : 0,
"agencyTimeZoneOffset" : -25200000,
"startTime" : 1445656801000,
"endTime" : 1445658565000,
"steps" : [ {
"streetName" : "service road",
"elevation" : [ ],
"relativeDirection" : "DEPART",
"absoluteDirection" : "SOUTHEAST",
"bogusName" : true,
"lon" : -117.87121581965805,
"lat" : 33.77466979795216,
"stayOn" : false,
"area" : false,
"distance" : 388.331
}, {
"streetName" : "North Main Street",
"elevation" : [ ],
"relativeDirection" : "RIGHT",
"absoluteDirection" : "SOUTH",
"bogusName" : false,
"lon" : -117.86741230000001,
"lat" : 33.7737568,
"stayOn" : false,
"area" : false,
"distance" : 105.541
}, {
"streetName" : "Memory Lane",
"elevation" : [ ],
"relativeDirection" : "LEFT",
"absoluteDirection" : "EAST",
"bogusName" : false,
"lon" : -117.86734580000001,
"lat" : 33.7728151,
"stayOn" : false,
"area" : false,
"distance" : 18.891
} ],
"mode" : "WALK",
"duration" : 1764.0,
"route" : "",
"interlineWithPreviousLeg" : false,
"legGeometry" : {
"points" : "srcmEbvlnUJIRWT[N_@He@DUFOT[RWRYRYBk@@g@?iC?k@?{EvCAb@KJe@",
"length" : 20
},
"realTime" : false,
"pathway" : false,
"from" : {
"departure" : 1445656801000,
"arrival" : 1445656800000,
"stopCode" : null,
"name" : "Main St. & Mainplace Mall",
"vertexType" : "TRANSIT",
"stopId" : "248:780771",
"lon" : -117.87105,
"lat" : 33.77476,
"stopIndex" : 4,
"stopSequence" : 5
},
"distance" : 512.763,
"transitLeg" : false,
"arrivalDelay" : 0,
"to" : {
"name" : "Memory Lane",
"lon" : -117.86715233781749,
"lat" : 33.772752637963684,
"arrival" : 1445658565000,
"orig" : "",
"vertexType" : "NORMAL"
}
} ],
"transfers" : 0,
"transitTime" : 1020,
"elevationLost" : 0.0
}, {
"waitingTime" : 2,
"startTime" : 1445647765000,
"endTime" : 1445651365000,
"fare" : {
"fare" : {
"regular" : {
"currency" : {
"currency" : "USD",
"defaultFractionDigits" : 2,
"currencyCode" : "USD",
"symbol" : "$"
},
"cents" : 300
}
}
},
"elevationGained" : 0.0,
"duration" : 3600,
"walkLimitExceeded" : false,
"tooSloped" : false,
"walkTime" : 2518,
"walkDistance" : 728.187333303796,
"legs" : [ {
"rentedBike" : false,
"departureDelay" : 0,
"agencyTimeZoneOffset" : -25200000,
"startTime" : 1445647765000,
"endTime" : 1445648519000,
"steps" : [ {
"streetName" : "South Harbor Boulevard",
"elevation" : [ ],
"relativeDirection" : "DEPART",
"absoluteDirection" : "SOUTH",
"bogusName" : false,
"lon" : -117.91541338573779,
"lat" : 33.80464805427682,
"stayOn" : false,
"area" : false,
"distance" : 173.92
}, {
"streetName" : "path",
"elevation" : [ ],
"relativeDirection" : "RIGHT",
"absoluteDirection" : "WEST",
"bogusName" : true,
"lon" : -117.9153869,
"lat" : 33.8030842,
"stayOn" : false,
"area" : false,
"distance" : 40.760999999999996
} ],
"mode" : "WALK",
"duration" : 754.0,
"route" : "",
"interlineWithPreviousLeg" : false,
"legGeometry" : {
"points" : "_nimEjjunUdA?|@?l@Aj@?ZA^?\\A?ZDCj@?",
"length" : 11
},
"realTime" : false,
"pathway" : false,
"from" : {
"name" : "South Harbor Boulevard",
"lon" : -117.91541338573779,
"lat" : 33.80464805427682,
"departure" : 1445647765000,
"orig" : "",
"vertexType" : "NORMAL"
},
"distance" : 214.68099999999998,
"transitLeg" : false,
"arrivalDelay" : 0,
"to" : {
"departure" : 1445648520000,
"arrival" : 1445648519000,
"stopCode" : null,
"name" : "Portofino Stop",
"vertexType" : "TRANSIT",
"stopId" : "248:778154",
"lon" : -117.91547,
"lat" : 33.80284,
"stopIndex" : 1,
"stopSequence" : 2
}
}, {
"rentedBike" : false,
"departureDelay" : 0,
"agencyTimeZoneOffset" : -25200000,
"startTime" : 1445648520000,
"routeLongName" : "Santa Ana Line",
"endTime" : 1445649600000,
"steps" : [ ],
"mode" : "BUS",
"duration" : 1080.0,
"route" : "19",
"interlineWithPreviousLeg" : false,
"legGeometry" : {
"points" : "wbimEbjunU??dRM?lJQJAZNPTCNV@v@?nCHJR@F_AKoCGYYSEsKfUS?kV?u^uJHmOBqO@@gM`C@n@Od@a@\\sAJ{G^oArDuDl@|@PQFu@\\a@??FKYi@~FmGHUdR_SAkL?mUBwMCcL?}OHaAn@{EFoB?qK?mP@kOb@cEb@eB|@uBZiCBsNMoAYqBEy@Fi@vP?~OB|@Ph@h@b@d@f@^nAPtBB|MEhIDtLD|N@pG@pKBrOAIvGAtEAnAIn@Qh@q@l@}DtBcAuAd@u@EC[@OBW\\",
"length" : 90
},
"agencyName" : "Anaheim Resort Transportation",
"realTime" : false,
"routeColor" : "2C0093",
"serviceDate" : "20151023",
"agencyUrl" : "http://www.rideart.org/",
"routeUrl" : "http://rideart.org/routes-and-schedules/mainplace-line/",
"pathway" : false,
"routeHumanFrequency" : "See schedule",
"headsign" : "Disneyland Resort",
"from" : {
"departure" : 1445648520000,
"arrival" : 1445648519000,
"stopCode" : null,
"name" : "Portofino Stop",
"vertexType" : "TRANSIT",
"stopId" : "248:778154",
"lon" : -117.91547,
"lat" : 33.80284,
"stopIndex" : 1,
"stopSequence" : 2
},
"tripId" : "107507A1639B2933",
"agencyId" : "248",
"routeId" : "1713",
"distance" : 5950.749039460567,
"transitLeg" : true,
"arrivalDelay" : 0,
"routeTextColor" : "FFFFFF",
"routeType" : 3,
"routeShortName" : "19",
"to" : {
"departure" : 1445649601000,
"arrival" : 1445649600000,
"stopCode" : null,
"name" : "Main St. & Mainplace Mall",
"vertexType" : "TRANSIT",
"stopId" : "248:780771",
"lon" : -117.87105,
"lat" : 33.77476,
"stopIndex" : 4,
"stopSequence" : 5
},
"routeSpan" : {
"early" : {
"source_table" : "frequencies",
"route_id" : "1713",
"feed_name" : "anaheim-ca-us",
"departure_time" : "2015-10-23T17:00:00Z"
},
"late" : {
"source_table" : "stop_times",
"route_id" : "1713",
"feed_name" : "anaheim-ca-us",
"departure_time" : "2015-10-24T05:30:00Z"
}
}
}, {
"rentedBike" : false,
"departureDelay" : 0,
"agencyTimeZoneOffset" : -25200000,
"startTime" : 1445649601000,
"endTime" : 1445651365000,
"steps" : [ {
"streetName" : "service road",
"elevation" : [ ],
"relativeDirection" : "DEPART",
"absoluteDirection" : "SOUTHEAST",
"bogusName" : true,
"lon" : -117.87121581965805,
"lat" : 33.77466979795216,
"stayOn" : false,
"area" : false,
"distance" : 388.331
}, {
"streetName" : "North Main Street",
"elevation" : [ ],
"relativeDirection" : "RIGHT",
"absoluteDirection" : "SOUTH",
"bogusName" : false,
"lon" : -117.86741230000001,
"lat" : 33.7737568,
"stayOn" : false,
"area" : false,
"distance" : 105.541
}, {
"streetName" : "Memory Lane",
"elevation" : [ ],
"relativeDirection" : "LEFT",
"absoluteDirection" : "EAST",
"bogusName" : false,
"lon" : -117.86734580000001,
"lat" : 33.7728151,
"stayOn" : false,
"area" : false,
"distance" : 18.891
} ],
"mode" : "WALK",
"duration" : 1764.0,
"route" : "",
"interlineWithPreviousLeg" : false,
"legGeometry" : {
"points" : "srcmEbvlnUJIRWT[N_@He@DUFOT[RWRYRYBk@@g@?iC?k@?{EvCAb@KJe@",
"length" : 20
},
"realTime" : false,
"pathway" : false,
"from" : {
"departure" : 1445649601000,
"arrival" : 1445649600000,
"stopCode" : null,
"name" : "Main St. & Mainplace Mall",
"vertexType" : "TRANSIT",
"stopId" : "248:780771",
"lon" : -117.87105,
"lat" : 33.77476,
"stopIndex" : 4,
"stopSequence" : 5
},
"distance" : 512.763,
"transitLeg" : false,
"arrivalDelay" : 0,
"to" : {
"name" : "Memory Lane",
"lon" : -117.86715233781749,
"lat" : 33.772752637963684,
"arrival" : 1445651365000,
"orig" : "",
"vertexType" : "NORMAL"
}
} ],
"transfers" : 0,
"transitTime" : 1080,
"elevationLost" : 0.0
} ]
}
wiki with JSON comparison here.
https://github.com/ed-g/otp-api-proxy/wiki/0.18-versus-1.0-JSON-responses-on-trip-planner.
Set a maximum walking cut off, and do not include itineraries which have this much walking in the OTP proxy results.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.