Stops


The stops call returns stops of all available agencies within a defined distance from a geodetic reference.

Call format


PartDescriptionOptionalExample
URLTransiCast web server instancehttp://transicast.appspot.com/ws/V3
Servlet descriptorstopsstops
Parameter:
ll=<lat>,<lon>
Geodetic reference point coordinates (WGS-84)ll=33.2241,-122.5198
Parameter:
meters=<value>
Distance (radius) from reference point to fetch stopsmeters=1500
Parameter:
max=<value>
Filter for maximum number of distinct stops to return. Two or more stops are distinct if their stop descriptions differ. The sequence of the stops returned is ordered by distance from the request coordinates
+
max=7
Parameter:
types=<value[,value]>
List of route types to filter stops, in accordance with the GTFS definition
+
types=0,3
Parameter:
locIDs=<stop id, ...>
Request specific stops by stopIDs: Comma separated list of stop IDs
+
locIDs=2337
Parameter:
loccodes=<stop code, ...>
Request specific stops by stop codes: Comma separated list of stop codes, as published by the agency
+
loccodes=14505

http://transicast.appspot.com/ws/V3/stops?ll=37.794543,-122.394922&meters=350&max=4&appid=sample1

Response format


The <resultSet> tag of a stops call contains three attributes, the <queryLat> and <queryLon> coordinates of the call, and <ct>, which is the number of stops within the requested radius (parameter meters=<value>).
The stops are returned through the <location> tag. It contains the following attributes:

AttributeDescriptionKeyUsed inExample
descStop descriptiondesc="Market & Steuart"
latStop latitude (WGS-84)lat="37.7944499"
lngStop longitude (WGS-84)lng="-122.39492"
locidStop ID
+
Next bus and train times
Route detail responses
Service Messages
locid="37227"
loccodeTraveler facing stop code. Stop codes are often printed on stop signage or included in handout schedules to make it easier for travelers to request a stop schedule or real-time arrival information for a particular stop.loccode="137227"
parentStop ID of stop's parent, if it existsparent="stoparea:11652"
URLStop URLURL="http://hea.thebus.org/nextbus.asp?s=346"
location_typeLocation type, in accordance with the GTFS definitionlocation_type="1"
destRoutes and destinations, see below
desc2Alternative stop description, if provided by the agency
agencyAgency ID for the stopAgencies, as key valueagency="SFMTA"
rtFlag. true for stops that offer service messages and next bus and train times based on real-time estimatesrt="true"
typeRoute type. Values are following the definition of route_type in GTFStype="3"
destTag: Routes and destinations that service the stop, see below
childTag: Child stop, see below

Routes and the destinations of the trips servicing a stop are provided through the <dest> tag, which is nested inside <location>:

AttributeDescriptionKeyUsed inExample
routeRoute IDRoute, as provided in the route listid="2"
descDestinationDestinations of the trips servicing the stopdesc="Inbound to Market & Steuart St."

Where the original feeds provide stop parent/child relationships. Parent stops are included in the response as a collection of children stops. The <child> tag lists the children:

AttributeDescriptionKeyUsed inExample
locidStop ID of the childStop ID of the child stoplocid="33979"

Parents do not have associated routes. This means that next bus and train times cannot be called using a stop ID of a parent.
<?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" loccode="137227" agency="SFMTA" rt="true">
	<dest route="2" desc="Inbound to Market & Steuart St." type="3"/>
</location>
<location desc="Market & Steuart" dir="" lat="37.7944499" lng="-122.39492" locid="7227" loccode="71227" agency="SFMTA" rt="true">
	<dest route ="2" desc="Outbound to Clement & 14 Ave" type="3"/>
</location>
<location desc="Market St & Steuart St" dir="" lat="37.7942599" lng="-122.39491" locid="5693" loccode="15693" agency="SFMTA" rt="true">
	<dest route="N OWL" desc="Inbound to Townsend & 4th St." type="3"/>
	<dest route="N OWL" desc="Outbound to La Playa & Judah" type="3"/>
	<dest route="14L" desc="Inbound to Mission St. & Main" type="3"/>
	<dest route="T OWL" desc="Inbound to Visitacion Valley" type="3"/>
	<dest route="14X" desc="Inbound to Mission St. & Spear St." type="3"/>
	<dest route="14" desc="Inbound to Steuart & Mission" type="3"/>
</location>
</resultSet>

Notes

Contact

By email  

© 2011 - 2017 TransiCast

Powered by Google App Engine