Ero sivun ”Journeys API” versioiden välillä

267 merkkiä lisätty ,  6. lokakuuta 2014 kello 02.05
Rivi 259: Rivi 259:
First : separated value is 6131429,2375268. First pair of coordinates can be obtained by dividing comma separated values with 1e5. Therefore first coordinate pair would be
First : separated value is 6131429,2375268. First pair of coordinates can be obtained by dividing comma separated values with 1e5. Therefore first coordinate pair would be
<pre>
<pre>
lat: 6131429 / 10000
lat1: 6131429 / 100000 = 61.31429
lon: 2375268 / 10000
lon1: 2375268 / 100000 = 23.75268


==> 61.31429,23.75268
==> lat1,lon2 = 61.31429,23.75268
</pre>
</pre>


A client can search ROUTES by issuing following requests:<br>
Second coordinate pair would be obtained by substracting:
* 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
<pre>
lat2: (6131429 - (-349)) = 6131778 => 6131778 / 100000 = 61.31778
lon2: (2375268 - 183) = 2375085 =>  2375085 / 100000 = 23.75085
 
==> lat2,lon2 = 61.31778,23.75085
</pre>
 
Respectively, third coordinate pair would be obtained by substracting:
 
<pre>
lat3: (6131778 - (-259)) = 6132037 => 6132037 / 100000 = 61.32037
lon3: (2375085 - 177) = 2374908 =>  2374908 / 100000 = 23.74908
 
==> lat3,lon3 = 61.32037,23.74908
</pre>


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

muokkausta