Stops
The stops call returns the stops within a defined distances from a geodetic reference. This call integrates the stop data of all agencies loaded in an TransiCast web server instance.
Call format
| Part | Description | Optional | Example |
| URL | TransiCast web server instance | http://transicast.appspot.com/ws/V1 | |
| Servlet descriptor | stops | stops | |
| Parameter: ll=<lat>,<lon> | Geodetic reference point coordinates (WGS-84) | ll=33.2241,-122.5198 | |
| Parameter: meters=<value> | Distance from reference point | meters=1500 | |
| Parameter: max=<value> | Maximum number of stops returned | max=7 |
http://transicast.appspot.com/ws/V1/stops?ll=37.794543,-122.394922&meters=350&max=4&appid=sample1
Response format
The <resultSet> tag of a stops response contains two additional attributes, <queryLat> and <queryLon>, containing the query coordinates of the call.
Individual stops are returned through the <location> tag. The tag contains the following attributes:
| Attribute | Description | Key | Used in | Example | |||||||||||||||||||||||||||||||||||
| desc | Stop description | desc="Market & Steuart" | |||||||||||||||||||||||||||||||||||||
| dir | Stop direction (not used) | dir="" | |||||||||||||||||||||||||||||||||||||
| lat | Stop latitude (WGS-84) | lat="37.7944499"| lat | Stop longitude (WGS-84) | lon="-122.39492" | locid | Stop ID | Next bus and train times | Route detail responses Service Messages locid="37227" | route | Comma separated list of route ids which serve the stop | route="2" | routeDesc | Comma separated list of descriptions of routes which serve the stop | routeDesc="2 Inboud to Market & Steuart St." | desc2 | Alternative stop description | desc=" " | agency | Name of the stop's agency | Agency list, as key value | agency="SFMTA" | rt | Flag. true for stops that offer service messages and next bus and train times even if the agency globally does not offer service messages and next bus and train times | rt="true" | |
<?xml version="1.0" encoding="UTF-8"?> <resultSet queryTime="1319338341769" ct="5" queryLat="37.794543" queryLng="-122.394922"> <location desc="Market & Steuart" dir="" lat="37.7944499" lng="-122.39492" locid="37227" route="2" routeDesc="2 Inbound to Market & Steuart St." desc2=" " agency="SFMTA"/> <location desc="Market & Steuart" dir="" lat="37.7944499" lng="-122.39492" locid="7227" route="2" routeDesc="2 Outbound to Clement & 14 Ave" desc2=" " agency="SFMTA"/> <location desc="Market St & Steuart St" dir="" lat="37.7942599" lng="-122.39491" locid="5693" route="N OWL,14L,T OWL,14X,14" routeDesc="T OWL Inbound to Visitacion Valley,14X Inbound to Mission St. & Spear St.,N OWL Inbound to Townsend & 4th St.,N OWL Outbound to La Playa & Judah,14L Inbound to Mission St. & Main,14 Inbound to Steuart & Mission" desc2=" " agency="SFMTA"/> <location desc="Steuart St & Market St" dir="" lat="37.7944299" lng="-122.3945499" locid="6501" route="K OWL,21,N OWL,6,31,T OWL,M OWL,L OWL" routeDesc="T OWL Outbound to Van Ness & Market,K OWL Outbound to Balboa Park Station,31 Outbound to Cabrillo & La Playa,N OWL Outbound to La Playa & Judah,L OWL Outbound to Wawona & 46th Av.,21 Outbound to Fulton St & Shrader St,M OWL Outbound to Balboa Park Station,6 Outbound to Quintara & 14th Av." desc2=" " agency="SFMTA"/> <location desc="Ferry Plaza" dir="" lat="37.7941099" lng="-122.39387" locid="4726" route="F,N OWL,T OWL" routeDesc="T OWL Outbound to Van Ness & Market,F Outbound to Castro Station,N OWL Outbound to La Playa & Judah" desc2=" " agency="SFMTA"/> </resultSet>
Notes
- • When the max parameter is set, the number of stops returned is counted against the unique stop descriptions. In cases where multiple individual stops share a stop description, the number of <location> records returned may be greater than the value of the max parameter
- • Commas within the route descriptions are substituted for the %2C character. The client implementation should convert %2C characters to commas
Contact
By email  
| © 2011, 2012 Joachim Pfeiffer |
|
