You are in: Home
Contents:
Cycle routing API (XML interface)
An XML interface to the routing engine (and other CycleStreets components) is available for mobile and potentially other uses. It is already being used in a range of mobile apps and we are keen to encourage wide usage.
Apply for an API key for use in your mobile/website application.
In all cases, arguments are all passed via the query string directly from the URL as a standard GET request.
An API key (see above) is required for all calls.
http://www.../api/journey.xml?key=registeredapikey&plan=quietest&…
API usage policy: Please read our API usage policy, which attempts to ensure reasonable use. We aim to be flexible where possible; if you have any concerns about provisions please contact us as we are keen not to put off potential users.
Uptime: Please see our Server reliability and uptime policy.
Compression: Support for mod_deflate is enabled on the server, so the XML should be being delivered compressed. Ensure your client library is set to send the appropriate Accept-encoding header.
Planning a journey
Journey lengths must be at least 10 metres, and not more than 380 km.
The following is based on this route:
Buckingham Palace, via Horse Guards Parade to Westminster Abbey.
http://www.cyclestreets.net/api/journey.xml?key=registeredapikey&plan=quietest&itinerarypoints=-0.140085,51.502022,Buckingham+Palace|-0.129204,51.504353,Horse+Guards+Parade|-0.129394,51.499496,Westminster+Abbey
Required parameters
- key string
- Your registered API key
- plan string
- The type of route, which can be one of the values: balanced, fastest, quietest, or shortest.
- itinerarypoints String of waypoints: longitude,latitude|… or longitude,latitude,name|…
- Each waypoint is separated by a | character and the name is optional. There can be at most 50 waypoints. There is no need for longitudes and latitudes to have more than six decimal places because this gives accuracy to less than 1 metre on the Earth's surface. Note that there is an overall limit of around 2000 characters for a URL.
Adjacent waypoints that are closer than 10 metres when resolved onto the cycle network are treated as duplicates and ignored.
Optional parameters
- leaving string
- arriving string
- A time in the current 24hrs, in the form 00hh00mm, e.g. 09hh30mm, defaults to now. Only one, not both of these parameters should be provided. This format of this parameter needs improving to a more widely recognised standard.
- speed 16|20|24
- The maximum speed at which you will ride, in km/h, defaults to 20. The three permitted speeds (in km/h) correspond roughly to 10, 12, and 15 miles per hour.
- useDom 0|1
- The format of returned values. Currently the default is 0 which returns xml containing generic marker tags. Supplying a value of 1 returns valid GML markup and which will become the default in the future.
- segments 0|1
- Whether to output the detailed route segments (in addition to the co-ordinates and summary data, which are always sent). Defaults to 1. If you are using a mobile app that doesn't need turn-by-turn navigation, but instead only shows the route on a map, you can probably set this to 0 to save bandwidth.
Extra parameters
This section is unfinished and should not be treated as final. This information is currently ignored by the CycleStreets routing engine - but in the future it is hoped this information can improve the quality of the recommended route.
- clientrouteid int
- A four-byte integer created by the client program so that re-planned journeys on route can be matched up. This should be the value of the itinerary field of the first route obtained. For instance, a sat-nav mode that repeatedly requests routes if the rider goes off-course should send the original itinerary value. This helps us keep track of which routes are 'new' and which routes are replanned sat-nav routes.
- startbearing smallint degrees, clockwise from north
- The direction the rider is travelling at the start in degrees in the range 0 - 360. The default is 360, which interpreted as 'unknown'.
- startspeed tinyint km/h
- The speed at which the rider is travelling at the start.
These parameters become camel cased in the output, i.e. clientRouteId, startBearing and startSpeed.
Extra example: Thoday Street, Cambridge via Mulbery Close to Great St Mary's Church
http://www.cyclestreets.net/api/journey.xml?key=registeredapikey&itinerarypoints=0.117950,52.205302,City+Centre|0.131402,52.221046,Mulberry+Close|0.147324,52.199650,Thoday+Street&plan=quietest&useDom=1&clientrouteid=159&startspeed=20&startbearing=317
Switching between route types or retrieving a previously-planned route
If a journey has already been planned you can re-use the journey's itinerary by specifying the journey's itinerary number and the new route type. This is useful if, for instance a user has requested the fastest route, but now wants to view the quietest route for the same start and finish points. Apart from the key and the optional useDom these are the only required parameters in this usage:
- itinerary int
- If supplied it should identify a previously planned journey. The new journey's itinerary details are extracted from it. This is the same number that is tagged as cs:itinerary in the GML output, or as the attribute itinerary in the first marker tag of the generic XML output from the journey.xml API call.
- plan string
- The type of journey planned, currently one of shortest,fastest,quietest,balanced. If the speficied plan for this itinerary exists already then it that is returned, otherwise a new route is calculated.
Example: choosing the fastest route type based on an earlier planned route http://www.cyclestreets.net/journey/345529/ from Thoday Street, Cambridge to Great St Mary's Church:
http://www.cyclestreets.net/api/journey.xml?key=registeredapikey&useDom=1&itinerary=345529&plan=fastest
Return values
Returns markers that describe the route. If an error is detected it returns a single marker:
<markers><marker type="error" id="1" code="" description="" /></markers>
In that, code is an integer, and description can be displayed to the user.
If &useDom=1 was set in the parameter list it will return GML formatted info, which is the preferred format.
The output contains a sections describing the route as a whole, and is followed by the detailed segments.
Route
- start, finish string
- Names of the ends of the route
- start_longitude, start_latitude, finish_longitude, finish_latitude float
- Co-ordinates of the ends of the route.
- crow_fly_distance int
- The distance, as the crow flies between the ends of the route, in metres.
When a route has intermediate waypoints this value is the sum of the crow fly distance between each pair of adjacent points. - event string
- How the itinerary was planned, either leaving or arriving.
- whence datetime
- The departure/arrival time.
- speed int
- The desired cycling speed in km/h.
- itinerary int
- Corresponds to the url of this journey: http://www.cyclestreets/journey/itinerary/
- plan string
- The type of journey planned, currently one of shortest,fastest,quietest,balanced.
- note string
- If there was a problem planning the route, this is an explanation.
- length int
- The travelling distance of the route, in metres.
- time int
- The travelling time of the route, in seconds.
- busynance int
- A measure of the cost of busyness of the route, in metres.
- quietness int
- A measure of the cost of quietness of the route, a percentage value from 0 to 100.
- walk int 0|1
- Whether the rider is required to dismount for any section of the route.
- west, south, east, north float
- Bounds - western, southern, eastern and northern-most points of the route.
- signalledJunctions, signalledCrossings int
- Counts of these numbers of features on the whole route.
- grammesCO2saved int
- Grammes of CO2 saved, see
/journey/help/faq/#co2 - calories int
- Number of kiloCalories burned on the journey, see
/journey/help/faq/#calories
Waypoint
These contain the resolved waypoints - which are the requested waypoints after they have been 'snapped' to the nearest point on the cycle network.
- longitude float
- Longitude of the resolved waypoint
- latitude float
- Latitude of the resolved waypoint
- sequenceId tinyint
- Index for the waypoint starting from 1.
Example:
<waypoint longitude="0.117950" latitude="52.205303" sequenceId="1"/>
Segment
These represent each stage of the journey - usually a whole street.
- turn string
- One of these values: 'straight on', 'bear right', 'turn right', 'sharp right', 'double-back', 'sharp left', 'turn left', 'bear left' or 'unknown'.
- turnAngle (proposed feature) int in the range 0 to 360 inclusive
- This could be the angle in degrees through which the rider has to turn themselves at the start of the next segment of the journey. E.g. if this value is 90 then that would be a right turn. A value of 360 should be interpreted as unknown.
- startBearing (currently included but may change name) int in range 0 to 360 inclusive.
- The bearing angle in degrees clockwise from North of the first bit of that segment of the route. A value of 360 should be interpreted as unknown.
- distance int
- The distance for this part of the route, in metres.
- time int
- The time for this part of the route, in seconds.
- signalledJunctions, signalledCrossings int
- Counts of these numbers of features on this bit of the route.
Sample results
The following two sections show sample results from journey.xml calls.
Sample GML result
Here's a sample of GML formatted output (when using &useDom=1).
<?xml version="1.0"?> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:cs="http://www.cyclestreets.net/schema/xml/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd"> <gml:featureMember> <cs:route> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335 0.124766,52.202145 0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859 0.125167,52.201862 0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389 0.130827,52.202194 0.131244,52.20229 0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851 0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968</gml:coordinates> </gml:LineString> <cs:start>King's Parade</cs:start> <cs:finish>Thoday Street</cs:finish> <cs:start_longitude>0.117950</cs:start_longitude> <cs:start_latitude>52.205303</cs:start_latitude> <cs:startBearing>0</cs:startBearing> <cs:startSpeed>0</cs:startSpeed> <cs:finish_longitude>0.147324</cs:finish_longitude> <cs:finish_latitude>52.199650</cs:finish_latitude> <cs:crow_fly_distance>2099</cs:crow_fly_distance> <cs:event>depart</cs:event> <cs:whence>2010-11-10 17:19:20</cs:whence> <cs:speed>20</cs:speed> <cs:itinerary>343830</cs:itinerary> <cs:clientRouteId>0</cs:clientRouteId> <cs:plan>quietest</cs:plan> <cs:note> </cs:note> <cs:length>3281</cs:length> <cs:time>800</cs:time> <cs:busynance>5094</cs:busynance> <cs:quietness>64</cs:quietness> <cs:signalledJunctions>2</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:west>0.117950</cs:west> <cs:south>52.199650</cs:south> <cs:east>0.147324</cs:east> <cs:north>52.205303</cs:north> <cs:name>King's Parade to Thoday Street</cs:name> <cs:walk>1</cs:walk> <cs:type>route</cs:type> <cs:leaving>2010-11-10 17:19:20</cs:leaving> <cs:arriving>2010-11-10 17:32:40</cs:arriving> </cs:route> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502</gml:coordinates> </gml:LineString> <cs:name>King's Parade</cs:name> <cs:flow>with</cs:flow> <cs:distance>27</cs:distance> <cs:time>5</cs:time> <cs:busynance>40</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>1</cs:startBearing> <cs:turn>bear left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502</cs:points> <cs:distances>0,17,5,5</cs:distances> <cs:elevations>17,17,17,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505</gml:coordinates> </gml:LineString> <cs:name>St Mary's Street, NCN 11</cs:name> <cs:flow>with</cs:flow> <cs:distance>55</cs:distance> <cs:time>10</cs:time> <cs:busynance>79</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>148</cs:startBearing> <cs:turn>sharp right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505</cs:points> <cs:distances>0,7,5,27,16</cs:distances> <cs:elevations>17,17,17,17,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089</gml:coordinates> </gml:LineString> <cs:name>Market Street, NCN 11</cs:name> <cs:flow>with</cs:flow> <cs:distance>141</cs:distance> <cs:time>39</cs:time> <cs:busynance>299</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>62</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089</cs:points> <cs:distances>0,15,18,7,33,33,35</cs:distances> <cs:elevations>17,17,17,17,19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059</gml:coordinates> </gml:LineString> <cs:name>Sidney Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>13</cs:distance> <cs:time>3</cs:time> <cs:busynance>13</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>95</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Cycle Track</cs:provisionName> <cs:color>#ff0000</cs:color> <cs:type>segment</cs:type> <cs:points>0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059</cs:points> <cs:distances>0,5,4,4</cs:distances> <cs:elevations>19,19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273</gml:coordinates> </gml:LineString> <cs:name>Sidney Street</cs:name> <cs:flow>against</cs:flow> <cs:distance>121</cs:distance> <cs:time>18</cs:time> <cs:busynance>135</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>154</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273</cs:points> <cs:distances>0,36,28,13,20,18,6</cs:distances> <cs:elevations>19,19,19,18,16,16,16</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457</gml:coordinates> </gml:LineString> <cs:name>St Andrew's Street</cs:name> <cs:flow>against</cs:flow> <cs:distance>362</cs:distance> <cs:time>110</cs:time> <cs:busynance>695</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>142</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>1</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457</cs:points> <cs:distances>0,37,26,88,10,30,27,13,82,49</cs:distances> <cs:elevations>16,15,15,17,17,17,18,18,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335</gml:coordinates> </gml:LineString> <cs:name>Link between Regent Street and St Andrew's Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>16</cs:distance> <cs:time>9</cs:time> <cs:busynance>71</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>135</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335</cs:points> <cs:distances>0,6,4,6</cs:distances> <cs:elevations>19,19,19,20</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.124595,52.202335 0.124766,52.202145 0.125005,52.201889</gml:coordinates> </gml:LineString> <cs:name>Regent Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>57</cs:distance> <cs:time>9</cs:time> <cs:busynance>68</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>151</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.124595,52.202335 0.124766,52.202145 0.125005,52.201889</cs:points> <cs:distances>0,24,33</cs:distances> <cs:elevations>20,20,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859</gml:coordinates> </gml:LineString> <cs:name>Link with Regent Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>10</cs:distance> <cs:time>3</cs:time> <cs:busynance>13</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>129</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859</cs:points> <cs:distances>0,3,3,4</cs:distances> <cs:elevations>19,19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.125135,52.201859 0.125167,52.201862 0.125266,52.201885</gml:coordinates> </gml:LineString> <cs:name>Link with Parkers Piece (east-west)</cs:name> <cs:flow>with</cs:flow> <cs:distance>9</cs:distance> <cs:time>3</cs:time> <cs:busynance>12</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>79</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.125135,52.201859 0.125167,52.201862 0.125266,52.201885</cs:points> <cs:distances>0,2,7</cs:distances> <cs:elevations>19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389</gml:coordinates> </gml:LineString> <cs:name>Parkers Piece (east-west)</cs:name> <cs:flow>against</cs:flow> <cs:distance>352</cs:distance> <cs:time>82</cs:time> <cs:busynance>456</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>81</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389</cs:points> <cs:distances>0,200,96,56</cs:distances> <cs:elevations>19,18,17,18</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.130356,52.202389 0.130827,52.202194</gml:coordinates> </gml:LineString> <cs:name>Link between Parkers Piece (east-west) and Gonville Place</cs:name> <cs:flow>with</cs:flow> <cs:distance>39</cs:distance> <cs:time>22</cs:time> <cs:busynance>38</cs:busynance> <cs:walk>1</cs:walk> <cs:startBearing>124</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Footpath</cs:provisionName> <cs:color>#008800</cs:color> <cs:type>segment</cs:type> <cs:points>0.130356,52.202389 0.130827,52.202194</cs:points> <cs:distances>0,39</cs:distances> <cs:elevations>18,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.130827,52.202194 0.131244,52.20229 0.131654,52.202339</gml:coordinates> </gml:LineString> <cs:name>Link between Mill Road and Gonville Place</cs:name> <cs:flow>with</cs:flow> <cs:distance>58</cs:distance> <cs:time>14</cs:time> <cs:busynance>73</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>70</cs:startBearing> <cs:turn>bear left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.130827,52.202194 0.131244,52.20229 0.131654,52.202339</cs:points> <cs:distances>0,30,28</cs:distances> <cs:elevations>17,17,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071</gml:coordinates> </gml:LineString> <cs:name>Mill Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>916</cs:distance> <cs:time>220</cs:time> <cs:busynance>1499</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>124</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>1</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071</cs:points> <cs:distances>0,52,11,42,29,67,58,22,41,41,21,33,12,19,14,90,2,14,63,2,34,34,87,46,1,68,9,4</cs:distances> <cs:elevations>17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,20,20,19,19,18,18,19,19,19,18,18,18</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615</gml:coordinates> </gml:LineString> <cs:name>Cavendish Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>177</cs:distance> <cs:time>33</cs:time> <cs:busynance>210</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>15</cs:startBearing> <cs:turn>turn left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615</cs:points> <cs:distances>0,25,148,4</cs:distances> <cs:elevations>18,18,18,18</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992</gml:coordinates> </gml:LineString> <cs:name>St Philip's Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>173</cs:distance> <cs:time>49</cs:time> <cs:busynance>301</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>115</cs:startBearing> <cs:turn>turn right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992</cs:points> <cs:distances>0,6,99,8,7,47,6</cs:distances> <cs:elevations>18,19,17,17,17,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851</gml:coordinates> </gml:LineString> <cs:name>Catharine Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>329</cs:distance> <cs:time>59</cs:time> <cs:busynance>383</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>21</cs:startBearing> <cs:turn>turn left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851</cs:points> <cs:distances>0,238,20,21,21,15,14</cs:distances> <cs:elevations>19,16,15,15,15,15,16</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.147,52.201851 0.14705,52.201942</gml:coordinates> </gml:LineString> <cs:name>Link joining Roundabout, Cromwell Road, Catharine Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>11</cs:distance> <cs:time>2</cs:time> <cs:busynance>13</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>19</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.147,52.201851 0.14705,52.201942</cs:points> <cs:distances>0,11</cs:distances> <cs:elevations>16,16</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061</gml:coordinates> </gml:LineString> <cs:name>Roundabout</cs:name> <cs:flow>with</cs:flow> <cs:distance>50</cs:distance> <cs:time>22</cs:time> <cs:busynance>133</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>350</cs:startBearing> <cs:turn>bear left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061</cs:points> <cs:distances>0,13,12,15,10</cs:distances> <cs:elevations>16,16,13,13,15</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053</gml:coordinates> </gml:LineString> <cs:name>Fairfax Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>85</cs:distance> <cs:time>19</cs:time> <cs:busynance>115</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>111</cs:startBearing> <cs:turn>sharp right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053</cs:points> <cs:distances>0,9,10,41,8,17</cs:distances> <cs:elevations>15,15,15,13,13,14</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968</gml:coordinates> </gml:LineString> <cs:name>Thoday Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>280</cs:distance> <cs:time>69</cs:time> <cs:busynance>448</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>232</cs:startBearing> <cs:turn>sharp right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968</cs:points> <cs:distances>0,8,10,38,29,50,145</cs:distances> <cs:elevations>14,14,14,14,14,16,17</cs:elevations> </cs:segment> </gml:featureMember> </wfs:FeatureCollection>
Sample generic XML result
Here's a sample of generic XML formatted output (when using &useDom=0).
<?xml version="1.0" encoding="UTF-8"?> <markers xmlns:cs="http://www.cyclestreets.net/schema/xml/"> <marker start="King's Parade" finish="Thoday Street" start_longitude="0.117950" start_latitude="52.205303" startBearing="0" startSpeed="0" finish_longitude="0.147324" finish_latitude="52.199650" crow_fly_distance="2099" event="depart" whence="2010-11-10 16:39:50" speed="20" itinerary="343767" clientRouteId="0" plan="quietest" note="" length="3281" time="800" busynance="5094" quietness="64" signalledJunctions="2" signalledCrossings="0" west="0.117950" south="52.199650" east="0.147324" north="52.205303" name="King's Parade to Thoday Street" walk="1" type="route" leaving="2010-11-10 16:39:50" arriving="2010-11-10 16:53:10" coordinates="0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335 0.124766,52.202145 0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859 0.125167,52.201862 0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389 0.130827,52.202194 0.131244,52.20229 0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851 0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968" /> <marker name="King's Parade" flow="with" distance="27" time="5" busynance="40" walk="0" startBearing="1" turn="bear left" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502" distances="0,17,5,5" elevations="17,17,17,17" /> <marker name="St Mary's Street, NCN 11" flow="with" distance="55" time="10" busynance="79" walk="0" startBearing="148" turn="sharp right" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505" distances="0,7,5,27,16" elevations="17,17,17,17,17" /> <marker name="Market Street, NCN 11" flow="with" distance="141" time="39" busynance="299" walk="0" startBearing="62" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089" distances="0,15,18,7,33,33,35" elevations="17,17,17,17,19,19,19" /> <marker name="Sidney Street" flow="with" distance="13" time="3" busynance="13" walk="0" startBearing="95" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Cycle Track" color="#ff0000" type="segment" points="0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059" distances="0,5,4,4" elevations="19,19,19,19" /> <marker name="Sidney Street" flow="against" distance="121" time="18" busynance="135" walk="0" startBearing="154" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273" distances="0,36,28,13,20,18,6" elevations="19,19,19,18,16,16,16" /> <marker name="St Andrew's Street" flow="against" distance="362" time="110" busynance="695" walk="0" startBearing="142" turn="straight on" signalledJunctions="1" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457" distances="0,37,26,88,10,30,27,13,82,49" elevations="16,15,15,17,17,17,18,18,19,19" /> <marker name="Link between Regent Street and St Andrew's Street" flow="with" distance="16" time="9" busynance="71" walk="0" startBearing="135" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335" distances="0,6,4,6" elevations="19,19,19,20" /> <marker name="Regent Street" flow="with" distance="57" time="9" busynance="68" walk="0" startBearing="151" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.124595,52.202335 0.124766,52.202145 0.125005,52.201889" distances="0,24,33" elevations="20,20,19" /> <marker name="Link with Regent Street" flow="with" distance="10" time="3" busynance="13" walk="0" startBearing="129" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859" distances="0,3,3,4" elevations="19,19,19,19" /> <marker name="Link with Parkers Piece (east-west)" flow="with" distance="9" time="3" busynance="12" walk="0" startBearing="79" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.125135,52.201859 0.125167,52.201862 0.125266,52.201885" distances="0,2,7" elevations="19,19,19" /> <marker name="Parkers Piece (east-west)" flow="against" distance="352" time="82" busynance="456" walk="0" startBearing="81" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389" distances="0,200,96,56" elevations="19,18,17,18" /> <marker name="Link between Parkers Piece (east-west) and Gonville Place" flow="with" distance="39" time="22" busynance="38" walk="1" startBearing="124" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Footpath" color="#008800" type="segment" points="0.130356,52.202389 0.130827,52.202194" distances="0,39" elevations="18,17" /> <marker name="Link between Mill Road and Gonville Place" flow="with" distance="58" time="14" busynance="73" walk="0" startBearing="70" turn="bear left" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.130827,52.202194 0.131244,52.20229 0.131654,52.202339" distances="0,30,28" elevations="17,17,17" /> <marker name="Mill Road" flow="with" distance="916" time="220" busynance="1499" walk="0" startBearing="124" turn="bear right" signalledJunctions="1" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071" distances="0,52,11,42,29,67,58,22,41,41,21,33,12,19,14,90,2,14,63,2,34,34,87,46,1,68,9,4" elevations="17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,20,20,19,19,18,18,19,19,19,18,18,18" /> <marker name="Cavendish Road" flow="with" distance="177" time="33" busynance="210" walk="0" startBearing="15" turn="turn left" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615" distances="0,25,148,4" elevations="18,18,18,18" /> <marker name="St Philip's Road" flow="with" distance="173" time="49" busynance="301" walk="0" startBearing="115" turn="turn right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992" distances="0,6,99,8,7,47,6" elevations="18,19,17,17,17,19,19" /> <marker name="Catharine Street" flow="with" distance="329" time="59" busynance="383" walk="0" startBearing="21" turn="turn left" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851" distances="0,238,20,21,21,15,14" elevations="19,16,15,15,15,15,16" /> <marker name="Link joining Roundabout, Cromwell Road, Catharine Street" flow="with" distance="11" time="2" busynance="13" walk="0" startBearing="19" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.147,52.201851 0.14705,52.201942" distances="0,11" elevations="16,16" /> <marker name="Roundabout" flow="with" distance="50" time="22" busynance="133" walk="0" startBearing="350" turn="bear left" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061" distances="0,13,12,15,10" elevations="16,16,13,13,15" /> <marker name="Fairfax Road" flow="with" distance="85" time="19" busynance="115" walk="0" startBearing="111" turn="sharp right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053" distances="0,9,10,41,8,17" elevations="15,15,15,13,13,14" /> <marker name="Thoday Street" flow="with" distance="280" time="69" busynance="448" walk="0" startBearing="232" turn="sharp right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968" distances="0,8,10,38,29,50,145" elevations="14,14,14,14,14,16,17" /> </markers>
Nearest point on the cycle network
Example: Thoday Street, Cambridge.
http://cambridge.cyclestreets.net/api/nearestpoint.xml?key=registeredapikey&longitude=0.117950&latitude=52.205302
Nearestpoint returns the id of the point nearest the given longitude / latitude. Use this method as a way of finding the actual start and finish co-ordinates that the journey planner will choose to find a route. They may be upto about a kilometre away from where you want to start.
- longitude float
- The longitude of the point.
- latitude float
- The latitude of the point.
Returns markers that describe the point - inspect the returned xml for the self explanatory details.
Note: in future we plan to make this more GML compliant, like the route listing. This is not yet implemented.
Geocoder
This is mainly a wrapper to OSM's Nominatim. However, we add other logic (e.g. bounding box, name near) and data (postcodes, station codes), so please use our geocoder interface rather than Nominatim directly, for consistency.
Please ensure you comply with the Nominatim Usage Policy. Normal bona-fide use should be perfectly compliant.
Example: Thoday Street
http://cambridge.cyclestreets.net/api/geocoder.xml?key=registeredapikey&w=0.113937&s=52.201937&e=0.121963&n=52.208669&zoom=16&street=thoday%20street
returns a list of results, including the name, latitude, longitude and where it is 'near'.
- key string
- Your registered API key
- street string
- The search string, e.g. for a name/street/place/postcode, URL-encoded (e.g. 'thoday%20street')
- n float (optional, but strongly recommended)
- The latitude at the top (north) of the bounding box (visible area).
- e float (optional, but strongly recommended)
- The longitude at the right (east) of the bounding box (visible area).
- s float (optional, but strongly recommended)
- The latitude at the bottom (south) of the bounding box (visible area).
- w float (optional, but strongly recommended)
- The longitude at the left (west) of the bounding box (visible area).
- zoom int (optional)
- Current map zoom level.
If the boundaries are supplied, then the geocoder will tend to prefer results in this part and near surrounding parts of the country when the zoom is 12 or higher (this logic may change in future to be zoom-agnostic if the bounding box is sent).
Sending z= will be treated as zoom= . z= is now deprecated and will be disabled in due course.
POIs (Points of interest)
This is an interface to the same data used for the Points of interest pages.
To get the supported types:
http://www.cyclestreets.net/api/poitypes.xml?key=registeredapikey
To include square icons (as base64 encoded string), with the sizes available being 12/16/20/24/32/48/64px, default 16px (with unsupported sizes equivalent to not supplying the flag), amend this to:
http://www.cyclestreets.net/api/poitypes.xml?key=registeredapikey&icons=16
Having now selected a type, e.g. 'cycleparking' using poitypes, now get the actual POIs within a specified radius from a centre-point. For instance, this call will return all bike shops in Cambridge within a 5km distance in order of proximity, nearest first (this call is is the standard scenario for mobile use) :
http://www.cyclestreets.net/api/pois.xml?key=registeredapikey&type=cycleparking&longitude=0.117950&latitude=52.205303&radius=5
or this similar call, which instead works on a bounding box basis, spreading the points out evenly within the bounding box (and therefore will be more useful for desktop applications) instead:
http://www.cyclestreets.net/api/pois.xml?key=registeredapikey&type=cycleparking&n=52.209285&e=0.125325&s=52.201395&w=0.111035
The default is a limit of 50 items returned. If you add &limit=… you can set a different limit. The maximum limit available is 400; if you supply a larger limit than 400, it will be replaced with 400.
If you add &editlinks=1 the output will include a field showing the URL where the source data for the POI may be edited; if it is not an editable POI, this field will be present but empty.
If you add &useDom=1 the format will be GML instead of generic XML.
Notes [updated 22nd September 2011] on this API function:
- At present, the bike shop data is coming from a local database and not from OpenStreetMap. However, that will change once newly-received bike shop data has been merged into OSM.
- useDom=1 is likely to be be renamed soon to format=gml. We will update this page when that happens.
Photos
The photomap is filled with icons from an XML feed. It is not yet a stable interface, and may change without notice. It is currently optimised for filling the photomap viewer. To do that that it breaks the visible map into a 10x10 grid and chooses one photo from each grid cell. It behaves differently according to the zoom level and the number of available photos.
http://cambridge.cyclestreets.net/api/photos.xml?key=registeredapikey&useDom=1&latitude=52.209124&longitude=0.127299&zoom=13&w=0.085500&s=52.182195&e=0.169099&n=52.236053&category=cycleparking&metacategory=good&limit=25&suppressplaceholders=1&minimaldata=1
Optional parameters
- limit int
- Maximum number of photos returned. It is strongly recommended to use this parameter. A value of 25 is recommended for mobile apps. Photos will be spread evenly around the viewport where possible.
- thumbnailsize int 60|120|150|180|200|250|300|350|400|400|425|450|500|640 (default 425)
- The thumbnail size used in the thumbnail URLs shown within the XML. If you require another size, please let us know and we will add it as a supported size.
- suppressplaceholders int (0|1) (default 0)
- Suppress locations that have no attached image. Recommended for mobile apps.
- minimaldata int (0|1) (default 0)
- Send back fewer fields in the response, to get a smaller download. Recommended for mobile apps.
The values for category and metacategory can be found using the photomapcategories API call documented below.
Photomap categories
This API function returns all the photo categories (e.g. cycleparking,obstruction,etc.) and metacategories (e.g. good,bad,event,etc.) available in the Photomap (e.g. see the categorisation page or the legend on the main Photomap page).
Note that, amongst the data in the returned XML, there will be included a unixtime value indicating the cache validity, e.g.: <validuntil>1284497262</validuntil>
http://www.cyclestreets.net/api/photomapcategories.xml?key=registeredapikey
Photo
Retrieves data on a single photo from the Photomap.
Required data:
- id binary
- The photo ID.
http://www.cyclestreets.net/api/photo.xml?key=registeredapikey&id=80
Add photo
The Photomap is intended as a campaigning tool to enable citizens to geolocate and tag problems such as lack of cycle parking, or to highlight good practice, so that this data can be used by cycle campaign groups. A variety of sites (e.g. Cycling Sorted) are being built around this database, and photos are used within route listings on the main site, and on the Photomap for general browsing.
This function is used to add photos to the Photomap.
Clients should initially call (and then cache the result of) photomapcategories.xml so that a list of categories and metacategories can be displayed. This then enables the user to say that their photo represents e.g. a cycle parking problem (category=cycleparking,metacategory=bad) when uploading the photo as detailed below. A caption should ideally also be added.
Currently this assumes the client will extract the lat/long/datetime from the photo. However, this may be changed in future.
If an error occurs, the (normally-empty) <error> XML node will be filled with a code node and a human-readable message node whose value can be shown to the user. Error handling responses via the API are not yet complete; please contact us if this is a priority for you.
The license for the photo content will be taken from the user's default settings, which currently have to be set on the site.
It requires a POST request and sends back standard XML:
POST values listed below to
https://www.cyclestreets.net/api/addphoto.xml?key=registeredapikey
Note that this should be sent to https://... as this call transmits user credentials, which should not be sent over the network unencrypted. This is not yet enforced but is likely to be shortly.
Required and recommended data:
- mediaupload binary
- The photo file, as if posting from a standard HTML form.
username string- The username of a validated user.
- password string
- The password of a validated user.
- latitude float or 'auto'
- Latitude of the location of the photo (not the place it was uploaded), which some devices put in the EXIF data.
(If set to 'auto', the server will try to read this from the EXIF, setting to 0 if not found.) - longitude float or 'auto'
- Longitude of the location of the photo (not the place it was uploaded), which some devices put in the EXIF data.
(If set to 'auto', the server will try to read this from the EXIF, setting to 0 if not found.) - datetime int or 'auto'
- Time of the photo, which you can usually extract from EXIF data.
(If set to 'auto', the server will try to read this from the EXIF, setting to 0 if not found.) - category string
- The category (e.g. 'cycleparking') selected from the list of available tag values listed in a photomapcategories.xml call.
- metacategory string
- The metacategory (e.g. 'bad') selected from the list of available tag values listed in a photomapcategories.xml call.
caption text (optional but strongly recommended)- Text for a caption, which users should be strongly encouraged to add.
Additional optional metadata:
- bearing int (0|45|90|135|180|225|270|315|360) (default: 360, i.e. unknown) (optional)
- Direction the camera was facing; note that 0 is north, and 360 indicates unknown.
- zoom int (number between 1 and 19) (optional)
- The map zoom at which the photo location was set (which helps us determine the accuracy)
- tags string (optional)
- Tags (keywords), space- or comma- separated, to provide an optional way to enable automatic matching/linking of photo themes.
There are other metadata key/value pairs which can be sent but which may not be supported in future, so are not listed here.
User create
Photo addition requires a signin username and password. There is therefore a user creation API call.
It requires a POST request and sends back standard XML:
POST values listed below to
https://www.cyclestreets.net/api/usercreate.xml?key=registeredapikey
Note that this should be sent to https://... as this call transmits user credentials, which should not be sent over the network unencrypted. This is not yet enforced but is likely to be shortly.
Required data:
- username string, regexp: ^([a-z0-9]{5,})$
- The desired username.
- password string
- The desired password.
- email string
- The user's e-mail address, which must be syntactically valid.
- name string (optional)
- The name of the user which can appear next to the user's contributions online. If this is not available, the username will be shown.
Response example:
<signin> <request>therequestedusername</request> <result> <code>1</code> <message>Please check your e-mail later to confirm the account creation.</message> </result> </signin>
where code is either 0 (=failure) or 1 (=success), and message is a human-readable message (which is present for both success or failure) that should be passed on to the user.
Feedback
Submits an item of feedback (e.g. on a route). Clients are strongly encouraged to implement this call, so that we get feedback from users on problematic routes.
It requires a POST request and sends back standard XML:
POST values listed below to
https://www.cyclestreets.net/api/feedback.xml?key=registeredapikey
Note that this should be sent to https://... as this call can transmit a name and e-mail address, which, being personal data, should not be sent over the network unencrypted. This is not yet enforced but is likely to be shortly.
Required data:
- type string, fixed value: routing
- The type of feedback. At present, only the string 'routing' is supported in the API. (Others are used internally by the website and may be available externally in due course.)
- itinerary int
- Route itinerary ID, received from the journey.xml call.
- comments string
- Comments from the user. Clients should encourage users to put useful text here rather than 'bad route', as the latter is almost useless in terms of our diagnosing what the problem is. (Clients should not simply dump a 'Good/Bad' type boolean response here.) More advanced use here might see clients send data which indicates exactly which route segments were poor, and for what reason. (Please discuss the latter with us if you have ideas on this, as we may be able to amend this API call to accept such data in a more structured fashion.)
- email string (optional)
- The user's e-mail address, which must be syntactically valid. This optional field enables us to respond to the user, perhaps to reply that route problems have been fixed or seeking more information.
- name string (optional)
- Name of the user. Purely a vanity field that enables us to respond more politely than 'Dear user,'.
Response example:
<feedback>
<request>theitineraryid</request>
<result>
<code>1</code>
<message>Thank you for submitting this feedback. [possibly more text here if the user has given an e-mail address]</message>
<url>http://www.cyclestreets.net/journey/{theitineraryid}/</url>
<feedbackid>1845</feedbackid>
</result>
</feedback>
where code is either 0 (=failure) or 1 (=success), and message is a human-readable message (which is present for both success or failure) that should be passed on to the user.
The URL value currently gives the webpage of the journey, but in future this might change.
The feedbackid value currently does not relate to any URL but may become used in the future.
Site status
Information about the current availability and performance of the site.
http://www.cyclestreets.net/api/status.xml?key=registeredapikey


Request cycle parking and report obstructions
