Trasy trolejbusów

Żeby nanieść na mapę trasy autobusów/trolejbusów możemy wykorzystać powiązanie zbiorów z systemu Tristar poprzez pola tripId / routeId oraz stopId.

W otwartych danych jest zbiór o liniach:

http://otwartedane.gdynia.pl/pl/dataset/aktualne-dane-o-liniach

 {"routeId":10712,"agencyId":8,"routeShortName":"710","routeLongName":"… - Grabówek SKM","routeDesc":null,"routeType":3,"routeURL":null,"routeColor":null,"routeTextColor":null,"routeSortOrder":null}

Wybieramy na przykład linię 710 i w zbiorze o odjazdach wyszukujemy wpisy dotyczące tej linii:

http://otwartedane.gdynia.pl/pl/dataset/aktualne-statyczne-dane-o-odjazdach

 {"tripId":10712,"arrivalTime":"23:27:00","departureTime":"23:27:00","stopId":37340,"stopSequence":0,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1}

Wybieramy przykładowy przystanek o stopId = 37340 i wyszukujemy w zbiorze o przystankach:

http://otwartedane.gdynia.pl/pl/dataset/aktualne-dane-o-przystankach

 {"stopId":37340,"stopName":"Cisowa Sibeliusa 01","stopDesc":"","stopLat":"54.5478387","stopLon":"18.4348756","zoneId":"Gdynia","stopURL":null,"locationType":null,"parentStation":null,"stopTimezone":"Europe/Warsaw","wheelchairBoarding":null,"ticketZoneBorder":null}


Kolejny przykład dla linii W:

http://otwartedane.gdynia.pl/pl/dataset/aktualne-dane-o-liniach

 {"routeId":10607,"agencyId":6,"routeShortName":"W","routeLongName":"Pustki Cisowskie - Redłowo Szpital","routeDesc":null,"routeType":3,"routeURL":null,"routeColor":null,"routeTextColor":null,"routeSortOrder":null}

odjazdy z kolejnych przystanków z tej trasy (32 wpisy):

http://otwartedane.gdynia.pl/pl/dataset/aktualne-statyczne-dane-o-odjazdach

 {"tripId":10607,"arrivalTime":"22:16:00","departureTime":"22:16:00","stopId":32240,"stopSequence":0,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:16:00","departureTime":"22:16:00","stopId":32250,"stopSequence":1,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:30:00","departureTime":"22:30:00","stopId":33210,"stopSequence":10,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:31:00","departureTime":"22:31:00","stopId":33220,"stopSequence":11,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:32:00","departureTime":"22:32:00","stopId":33230,"stopSequence":12,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:33:00","departureTime":"22:33:00","stopId":33240,"stopSequence":13,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:35:00","departureTime":"22:35:00","stopId":35060,"stopSequence":14,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:37:00","departureTime":"22:37:00","stopId":35070,"stopSequence":15,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:38:00","departureTime":"22:38:00","stopId":35080,"stopSequence":16,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:39:00","departureTime":"22:39:00","stopId":35090,"stopSequence":17,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:41:00","departureTime":"22:41:00","stopId":35110,"stopSequence":18,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:42:00","departureTime":"22:42:00","stopId":35120,"stopSequence":19,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:17:00","departureTime":"22:17:00","stopId":32260,"stopSequence":2,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:43:00","departureTime":"22:43:00","stopId":35130,"stopSequence":20,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:44:00","departureTime":"22:44:00","stopId":35140,"stopSequence":21,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:46:00","departureTime":"22:46:00","stopId":35800,"stopSequence":22,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:47:00","departureTime":"22:47:00","stopId":35170,"stopSequence":23,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:49:00","departureTime":"22:49:00","stopId":35180,"stopSequence":24,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:50:00","departureTime":"22:50:00","stopId":37040,"stopSequence":25,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:51:00","departureTime":"22:51:00","stopId":37050,"stopSequence":26,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:52:00","departureTime":"22:52:00","stopId":37060,"stopSequence":27,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:53:00","departureTime":"22:53:00","stopId":37070,"stopSequence":28,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:54:00","departureTime":"22:54:00","stopId":37090,"stopSequence":29,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:19:00","departureTime":"22:19:00","stopId":32470,"stopSequence":3,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:56:00","departureTime":"22:56:00","stopId":37110,"stopSequence":30,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:57:00","departureTime":"22:57:00","stopId":37640,"stopSequence":31,"stopHeadsign":"Grabówek SKM","pickupType":1,"dropOffType":1,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:20:00","departureTime":"22:20:00","stopId":32480,"stopSequence":4,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:21:00","departureTime":"22:21:00","stopId":33150,"stopSequence":5,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:24:00","departureTime":"22:24:00","stopId":33170,"stopSequence":6,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:25:00","departureTime":"22:25:00","stopId":33180,"stopSequence":7,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:27:00","departureTime":"22:27:00","stopId":33190,"stopSequence":8,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1},{"tripId":10607,"arrivalTime":"22:29:00","departureTime":"22:29:00","stopId":33200,"stopSequence":9,"stopHeadsign":"Grabówek SKM","pickupType":0,"dropOffType":0,"shapeDistTraveled":null,"timepoint":1,"ticketZoneBorder":0,"onDemand":0,"wheelchairAccessible":1}

i położenia kolejnych przystanków:

http://otwartedane.gdynia.pl/pl/dataset/aktualne-dane-o-przystankach

 {"stopId":32240,"stopName":"Dąbrowa Miętowa 01","stopDesc":"","stopLat":"54.4713174","stopLon":"18.4500875","zoneId":"Gdynia","stopURL":null,"locationType":null,"parentStation":null,"stopTimezone":"Europe/Warsaw","wheelchairBoarding":null,"ticketZoneBorder":null}

 {"stopId":32250,"stopName":"Tymiankowa 01","stopDesc":"","stopLat":"54.4723982","stopLon":"18.4529924","zoneId":"Gdynia","stopURL":null,"locationType":null,"parentStation":null,"stopTimezone":"Europe/Warsaw","wheelchairBoarding":null,"ticketZoneBorder":null}

itd…

Warto skorzystać z Dokumentacji dostawcy API (Zarząd Dróg i Zieleni w Gdyni): 

1. Zbiór danych: 
Dokumentacja TRISTAR API 
http://otwartedane.gdynia.pl/pl/dataset/dokumentacja-tristar-api

2. Zasób PDF: 
http://otwartedane.gdynia.pl/pl/dataset/dokumentacja-tristar-api/resource/a426e7b7-7261-4f43-8acb-59a5eca167aa

3. Dokument dostawcy: 
http://otwartedane.gdynia.pl/pl/dataset/fc4f3a7c-b877-4fe1-ab22-3fb54e6513f7/resource/a426e7b7-7261-4f43-8acb-59a5eca167aa/download/tristar_api.pdf