Ero sivun ”Journeys API” versioiden välillä

497 merkkiä poistettu ,  6. lokakuuta 2014 kello 01.49
Rivi 244: Rivi 244:
   }
   }
</pre>
</pre>
The ROUTE entity refers to LINE via the "line" property. The ROUTE entity also owns multiple POINT ON ROUTEs, which each have location property. The location property tells the latitude and longitude of the POINT ON ROUTE. Location has format: latitude,longitude.  
In addition to its own url, a ROUTE contains url to the LINE under which it is running. ROUTE has a name. ROUTE also has references to JOURNEY PATTERNs and JOURNEYs operating on it. geographicCoordinateProjection contains information on how to draw the route on a map. This field is encoded and the client must decode the fields value. The field takes form:
<pre>
number,number:number,number etc.
</pre>
 
These are encoded coordinates, in a form of:
 
<pre>
lat1,lon1:delta lat2,delta lon2:delta lat3,delta lon3
</pre>
 
a client would decode the field by following procedure:
 
 


A client can search ROUTES by issuing following requests:<br>
A client can search ROUTES by issuing following requests:<br>
* http://data.itsfactory.fi/journeys/api/1/routes will return paged list of all ROUTES
* http://data.itsfactory.fi/journeys/api/1/routes will return paged list of all ROUTES
* http://data.itsfactory.fi/journeys/api/1/routes?lineId=2 will return ROUTES which run on the LINE with id 2
* http://data.itsfactory.fi/journeys/api/1/routes?lineId=2 will return ROUTES which run on the LINE with id 2
* http://data.itsfactory.fi/journeys/api/1/routes?stopPointId=222 will return ROUTES which run via STOP POINT with id 222
* http://data.itsfactory.fi/journeys/api/1/routes?firstStopPointId=1456 will return ROUTES which start from STOP POINT with id 111
* http://data.itsfactory.fi/journeys/api/1/routes?lastStopPointId=1456 will return ROUTES which stop at STOP POINT with id 111
* http://data.itsfactory.fi/journeys/api/1/routes?stopPointShortName=5370 will return ROUTES which run via STOP POINT with short name 5370
* http://data.itsfactory.fi/journeys/api/1/routes?firstStopPointShortName=5393 will return ROUTES which start from STOP POINT with short name 5393
* http://data.itsfactory.fi/journeys/api/1/routes?lastStopPointShortName=5394 will return ROUTES which stop at STOP POINT with short name 5394


==== Journeys ====
==== Journeys ====
0

muokkausta