Donate using PayPal

CycleStreets blog

News from CycleStreets

Summer intern sought to help develop our codebase

June 3rd, 2015

CycleStreets is seeking a Cambridge (UK) -based intern over the summer, to help us improve our codebase quality.

Over many years we have built up a very large codebase, which runs our Journey planner and Photomap. There are also other sections, such as a collision data viewer, points of interest pages, a (somewhat out-of-date) help/about section, geocoder, user profile system, information pages, etc. This codebase primarily consists of over 225 PHP classes, averaging about 500 lines of code each. Interactive elements of the site are underpinned by a stable API.

We are in the middle of a major redesign (hence our quietness on this blog lately!) to solve various usability issues, modernise the look and feel of the site, add new facilities such as drag-routing/waypoints, and fundamentally unify the many sections of the site into a coherent whole. We have a powerful API under the hood, but we feel this is not reflected positively in our user interface.

We are sometimes slowed down in development by older code, pointing to the need for refactoring in several key areas. For instance, we want to complete our migration to a fully-templatised MVC structure. We want to deprecate our current mobile website by making the new design responsive while retaining the mobile site’s current innovations. We want to replace direct database calls with new API-based calls, so that the site effectively becomes a fairly independent consumer of its own API.

The two-month paid internship will be based in Cambridge (UK). We consider that regularly in-person discussions are likely so that the code can be understood properly before commencing with refactoring.

The intern will be hired as an proper salaried employee, and we understand that a going rate in the area for an internship is around £380/week; we will also come to a flexible arrangement regarding working locations and/or expenses for public area working to ensure that the successful employee is never out-of-pocket.

The position would be suitable for someone with:

  • A passion for refactoring, continual code quality improvement, and with an eye for detail;
  • Experience of writing good-quality object-orientated PHP code, based on traditional class structures, which runs without any notices/warnings;
  • Interest in user interface design, particularly with reference to mobile interfaces;
  • Some javascript knowledge would be helpful, as this needs some improvement, but this is lower priority than solid object-PHP skills;
  • A desire to promote practical cycling and support the cycle advocacy movement – we want someone who believes in what we’re doing, rather than just seeing this as a general coding job.

We are not expecting someone with many years of development experience, as such a person would be in a stable job, and the salary level is not intended to reflect this. What is more important to us is someone with the right mindset, a fast learner, who can work at a good rate. Being an internship, this will be a two-way arrangement, with us helping give the student knowledge of working in a large codebase and the challenges this brings – though we do want someone who is a self-starter that doesn’t need prodding constantly.

To apply, drop us a line via e-mail by the end of Wednesday 17th June 2015, explaining your interests, with your thoughts on our site (such as a critical analysis, maximum 2 pages at most), and point us to any code you have written (public code on Github is always a good sign).

(Edit on 6th June: We’ve extended the deadline slightly; previously 15th.)

Photo from a developer day, 2012

Planning application integration now live on Cyclescape

April 7th, 2015

We’re very excited to announce a major new feature on Cyclescape, our online toolkit for cycle campaign groups: integration of planning applications, which we pushed live last week after much work over the last 18 months.

Cambridge Cycling Campaign is the group we’ve been testing this with and where the work has mainly been undertaken.

The feature means that group members will be able to know about a new planning application within a day of it being submitted to the council. This gives potentially an extra 6 weeks of time to study a planning application, so that the group can see:

  • how it could affect cycling conditions in an area
  • whether measures are needed (Section 106 / CIL funding) to mitigate any problems
  • whether cycle parking is sufficient
  • whether it could create opportunities such as a new route

This is 6 weeks of extra time to talk to the developers, and the Council, rather than deal with everything last minute – e.g. just before it goes to Planning Committee, as has happened in the past!

List of planning applications, from the ‘My Cyclescape’ page:

Planning applications

Click on ‘Convert to an issue’, and this pre-fills the usual issue form:

Cloned planning application

As there is no way for us to determine automatically (yet) whether a planning application is relevant – and there is a lot of irrelevant stuff like tree works – we have provided a button to enable an application to be hidden. If enough users in the group vote to hide the application, it will be hidden for all. In this way, group users can crowdsource relevant applications, and make it faster for others to work through to find relevant things.

Al this has been possible thanks to work by our contact Andrew who is working on a new planning application data portal, PlanIt (building on an earlier system by Openly Local), which we in CycleStreets are hoping to collaborate on and support formally.

Not all areas of the country are yet covered – Cambridge, featured above, has been specially funded. We’d like to thank Cambridge Sustainable City for their grant support.

Get in touch with us if you are interested to have coverage in your area in future.

We’d like to thank our developers Andy Allan and Nikolai Berkoff, as well as Andrew Speakman whose work has made this possible.

How can people help improve mapping used for CycleStreets?

September 28th, 2014

Finding out about good cycle routes – where it is safe and convenient to cycle – means availability of good maps and the knowledge of local people about their area.

We’ve created a new edition of our community mapping guide, Cycle mapping for cycle routing, freshly updated for 2014. The brochure explains how people can help improve CycleStreets and OpenStreetMap to help people find their way.

For the new 2014 edition, we’ve replaced screenshots and examples for the newer iD editor and made other updates.

You can view it and download it for free:

Cycle mapping for cycle routing

You can also browse it in magazine-style on Issuu.

Thanks to our brilliant designer friend, Ayesha Garrett, who has done the updates to the design work.

The original guide was in conjunction with Cycling Scotland, and some of the updates have been made to complement the West Sussex cycle journey planner which we run for that Council.

Cambridgeshire Cycle Challenge

September 19th, 2014

This year the Cambridgeshire Cycle Challenge is running from Monday 15th September to Sunday 12th October and is a fun and FREE web based competition to see which businesses can get the most people cycling over the four week period. There’s still time to sign up!

The Challenge is open to all businesses in Cambridgeshire and aims to increase the uptake of cycling by encouraging more new people to cycle to work and spur on people who already cycle to do so more often. Following on from Le Tour de France’s exciting visit to Cambridge and South Cambridgeshire in July, the Challenge is a great way to continue the cycling spirit. Any member of staff can take part by initially registering on the challenge website.

Challenge partners

Cambridgeshire Cycle Challenge

Once registered participants record every journey they make (both to work and for leisure) during the four week period, on the website via computer, or on a tablet/smartphone. For tablet and smartphone users a PleaseCycle mobile app is available for free to download and includes GPS functionality so that journeys can be tracked as the user cycles and are automatically logged to their account.

There are lots of prizes for different categories of riders (e.g. novice, rusty rider, intermediate and advanced), awarded weekly as well as overall winners – so regular cyclists will not ride off with all the prizes! In addition prizes will be evenly distributed around the districts of Cambridge City, East Cambridgeshire, Fenland, Huntingdonshire and South Cambridgeshire.

CycleStreets is one of the partners, with our journey planner available within the website:

Cambridgeshire cycle challenge journey planner

The website also includes facilities to enable employer office locations, departments and teams to compete against one another as well as other employers. This is a great way to encourage friendly rivalry and at the same time promote cycling.

The Challenge is being run by our friends at PleaseCycle and Outspoken on behalf of Travel for Cambridgeshire (formerly the Travel for Work Partnership) and Cambridgeshire County Council.

Moving to Leaflet.js

July 27th, 2014

This is a tech post mainly for our OpenStreetMap and techie users!

During recent months we’ve quietly been working on a major change behind the scenes in preparation for some large-changes to our web interface (which has long been in need of upgrading) and to prepare for a more mobile-friendly experience:

We’ve moved the large amount of our mapping code from OpenLayers 2 to Leaflet. This is the part of the site you see whenever you come across a map that you can drag around – the ‘slippy maps’. Last Monday, our commit “Removed OpenLayers” landed.

This has been quite a major undertaking, and a rather painful one at that. It has meant not only rewriting every bit of map javascript code, but also creating a new, second-generation API (data feed) using GeoJSON, as that is the native format that makes working with Leaflet so easy. In creating the V2 API, we’ve also had to keep every part of the old V1 API running perfectly so as not to break third-party mobile apps and sites that rely on it.

We had to rewrite Javascript modules for the every one of the types of slippy map used around on the site:

The V2 API (the technical interface to the underlying data that gets shown on the maps) emits data in the easily-parsable GeoJSON format. The V2 API, to be made public soon, is something we’ve wanted to do anyway for a while now. As we’ve moved to GeoJSON, we’ve found that throwing objects of all kinds onto a map is far easier compared to generating GML using XML DOM structures and writing Javascript to handle that.

When we launched CycleStreets back in 2009, GML was in vogue, and OpenLayers was the only real choice available. In fact, in 2009, many of the wonderful tools like Leaflet, jQuery, and autocomplete were either not available or were in their infancy. Now these tools are available, we no longer have to deal with the pain of generating XML DOM (for GML) structures and that is a very welcome relief.

It’s fair to say that we’ve always struggled with OpenLayers 2. OpenLayers is a very powerful map framework, basically letting you do almost anything on top of a map canvas, and with a very ‘correct’ object-orientated style. But with things like a standard web projection and GeoJSON standardisation now the norm for web mapping, the swiss-army-knife approach has not been ideal for us.

The force-point came for us when we ran into an intractable problem where a clickable layer of shop icons, used on a journey planner we run for a third party, had the odd behaviour that one of the two start/finish itinerary waypoint markers could not be moved if an icon had been clicked. We spent two days trying to debug this, even going as far as picking through the OpenLayers source code. Long ago we had learnt which of the five popup types to use, but we simply could not work out the mechanism for changing focus between layers. So we changed tack, generating GeoJSON for the icon layer and got a prototype working in Leaflet pretty quickly, and it ‘just worked’. From that point our V2 API project really got going.

It’s great to see that a new version of OpenLayers, OpenLayers 3, is in the works, which will undoubtedly take that very respected project forward. But for us, for now, Leaflet is where we plan to put our development focus.

PS The V2 API is going live shortly. All of our site is running from it and documentation is in place – we’ve just resolving the remaining few format issues now.

Our debugging view, now running from a GeoJSON data endpoint in our V2 API

Our debugging view, now running from a GeoJSON data endpoint in our V2 API.

The redesign upgrade project, of which the above work is part, has been possible thanks to part-funding from the Cambridge City Council Cycling & Walking Grants scheme, helping get more people cycling in Cambridge. We are most grateful to them for their support.

Cycle Hackney app created by CycleStreets

July 6th, 2014

cyclehackneylogo

We’ve created a new app for Hackney Council, the Cycle Hackney app.

Available for both iPhone and Android, the app aims to provide information to the Council on where people cycle for their daily journeys, and where improvements to the street and path network are most needed. This combines crowsourced GPS traces to help create a heatmap of utility cycle journeys.

Download on the App Store    Get it on Google Play

The app is aimed at utility journeys – everyday cycle journeys, rather than being an app for the sport or time-trialling demographic that can be found elsewhere.

Cycle Hackney app - screenshot     Cycle Hackney app - screenshot

After each journey, a short questionnaire appears to obtain some basic demographic information – this only takes a few seconds to complete:

Finished recording

In a press release for the app, we said:

“We’ve been pleased to create the Cycle Hackney app for Hackney Council. Although there are other apps for leisure route sharing, none have focussed on utility cycling data. The app will help identify streets and paths heavily used for everyday cycle journeys, as well as letting people report problems on the network. Local people can therefore use it to help the Council improve cycle infrastructure that will enable more people to cycle. Higher cycling levels are crucial for economic, environmental and health reasons, and Hackney is a leading borough in this.”

The app was launched at the Hackney Cycling Conference 2014. Hackney Council asked attendees of the conference to come up with an unusual or notable route to the conference. Here were the two winning entries:

One person, the winning entry, cycled the boundary of Hackney – an impressive feat!

Hackney boundary

Another person took the opportunity to create some ‘GPS art’ to spell out ‘I Love Hackney Cycling':

I Love Hackney Cycling

As well as giving a list of routes, enabling users to track their distance and calorie usage, the app allows people to upload reports of problems they encounter in their daily journeys.

Cycle Hackney app - screenshot     Cycle Hackney app - screenshot

We’re pleased that the new app was a finalist for the London Cycling Campaign Awards 2014, in the Digital Campaign of the Year category.

Hackney Council’s transport team would welcome any feedback on the app, for instance, new features that would be useful to add, or other feedback. We’ve enjoyed working with Hackney on this project.

The app uses code from Cycle Atlanta and our own CycleStreets apps. The app has been created by our developers,  Neil Edwards (iPhone) and Jez Higgins (Android).

PS We can create apps for Local Authorities and others that combine our portfolio of cycle mapping solutions – journey planner, photomap for reporting problems, GPS tracking, and information updates. Do get in touch if this may be of interest.

Quietly working away…

June 23rd, 2014

This blog has been a bit quiet recently, as we’ve been quietly working away very hard on a range of projects which are now being launched. We’ll have blog posts on each of these in the coming weeks:

  • The new Halfords cycle journey planner is live on their website, complementing their wide range of bikes and advice to help people get cycling. It includes map markers for easy directions to their stores.
  • We’ve created the Cycle Hackney app (iPhone and Android) for Hackney Council, which aims to provide information to the Council on where people cycle for their daily journeys, and where improvements to the street and path network are most needed. This combines crowsourced GPS traces to help create a heatmap of utility cycle journeys. The app was launched at the Hackney Cycling Conference 2014.
  • We created the Urban Cycle Parking website for London Cycling Campaign, which enables cyclists in London to pinpoint where cycle parking is needed and where it already exists, with all data being fed to Transport for London (plus existing parking data to OpenStreetMap)
  • We’ve created a batch routing system (with a job control web interface) for one of our app routing data users, which creates a matrix of all possible routes between cycle hire stations (e.g. the London Cycle Hire scheme) or within a grid of squares within a city.
  • We’ve supported the CTC’s Space for Cycling portal, whose photos also go into our Photomap, helping build on the fantastic library of over 50,000 locations (all fully-categorised) already present.
  • We’re finalising the launch of our API (data interface) Version 2 – this is a modern JSON-only API interface to the many parts of our system, and corrects many of the frustrations of our current API. As well as making things much easier for mobile and other websites to obtain routes and integrate with other facilities we offer, it adds new API calls, GeoJSON output for all geographical features by default, new  features, standardised error handling, and a fresh set of documentation complete with clear examples.
  • We’ve almost completed replacing all the code that powers our slippy maps from OpenLayers-based to Leaflet. Changes like that happen ‘inside the crankcase’ and give us more power and flexibility to develop the system while users are often unaware that there have been changes – which is generally a good thing. This will enable us finally to add long-demanded features such as multiple waypoints, draggable routing and leisure routing options, which our underlying data interface (API) has supported now for quite some time. This has been a large task, with much knock-on internal reworking, including the need to have GeoJSON output in the API while not disrupting other users of our API. This work is part of a project to overhaul and modernise our web interface, which has been partly funded thanks to a Cambridge Cycling & Walking Promotion grant. We’d like to thank Cambridge City Council for enabling this long-awaited project to move forward. We’ll shortly be seeking out a designer and blogging more about our aims with this large project.
  • We’ve added a user profile available to each user on the site, so all photos by a user are grouped together. This facility will continue to evolve.
  • Cyclescape, our toolkit for cycle campaigners [read more], has seen a range of improvements and fixes.
  • For Cambridge Cyclescape, we’re pleased to announce a grant from Cambridge Sustainable City who have kindly given a grant to fund some changes specifically requested by the Cambridge group – we’ll report on the Cyclescape blog soon about these developments.

Stay tuned to the blog for articles on each of these.

PS One of our lead developers, Martin, has co-written ‘Making Space for Cycling‘, a new publication endorsed by the whole spectrum of UK cycling advocacy groups. It explains to UK decision-makers how best to provide cycle infrastructure that will get more people cycling. Paper copies can be obtained from Cyclenation and Cambridge Cycling Campaign.

The CycleStreets logo – a bit of history

June 23rd, 2014

Our mobile team has been working on updates to our apps recently, and we’ve been working with our designer Ayesha on a modernised icon for the Windows Phone and iPhone apps.

During the discussion, Simon (our lead developer) gave a bit of history about the CycleStreets logo, which we thought would be interesting to share.

“I can claim to be the one who designed the CycleStreets logo itself.

It came out of a fairly intensive two weeks of trying out and sharing all sorts of designs with a few of us in early 2009. It was designed with GIMP software, and based on our earlier CamCycle logo with a road going off into the distance.

It took ages to get the curve right using the paths tool to control the splines, but the moment of magic occurred when I realised that the ponytail should become a scarf with the same shape as the road.”

CycleStreets has always been about practical cycling for everyday journeys, and we think the logo, featuring a bike with basket, rack and mudguards, reflects this.

CycleStreets logo

Transition Black Isle embeds CycleStreets into its website to help cut one million car miles

April 8th, 2014

CycleStreets has worked with Transition Black Isle to provide an embedded cycle journey planner for their website. Peter Elbourne, project officer for the Million Miles project explains.

Million Miles logo

Transition Black Isle is a community organisation and registered charity that aims to take local action on issues relating to peak oil and climate change. The group decided to undertake a bold project to make local travel more sustainable and, in March 2012, they were awarded a grant of £195,000 from the Climate Challenge Fund. Transition Black Isle’s Million Miles project aims to cut one million car miles by 2015 by encouraging active travel, improving access to public transport and promoting greener car travel.

One of the key objectives of the Million Miles project is to create an active travel map of the Black Isle to signpost less confident cyclists along quiet off-road tracks through farmland and forests. However, the group had some significant hurdles to overcome:

  • The Black Isle is a large rural peninsula with a dispersed population, which makes gathering information about routes a time-consuming and arduous process and it is also difficult to know what journeys local residents make.
  • Active travel routes will change over time (e.g. alteration of forestry tracks, new purpose-built paths), which means that a map could be out-of-date soon after printing.

Transition Black Isle cycle journey planner

Transition Black Isle’s solution was to ‘crowdsource’ mapping data by asking local people to contribute information to the online map, OpenStreetMap. This innovative approach means that the group has access to a digital map that can continually be updated. A diverse network of contributors – including keen walkers, weekend cyclists and even remote mappers without a particular connection to the Black Isle – have been adding to the map since early 2013. Huge amounts of progress has been made and the peninsula is mapped on OpenStreetMap with valuable detail for walking and cycling, providing information such as track surface, barriers, access and bike parking.

Transition Black Isle is now looking to create a printed map to distribute locally, but a single map cannot convey all of the information that is available through OpenStreetMap. The group had been promoting CycleStreets locally as it was a great application for the information they collectively contributed to OpenStreetMap. Their experience of our bespoke lift-sharing website highland.liftshare.com demonstrated that it is important to promote an online service with a local connection, so Transition Black Isle decided to take advantage of an offer from CycleStreets to embed a version of the journey planner into their website. After a quick and hassle-free set up, cycleroutes.transitionblackisle.org went live in April 2014!

Peter Elbourne, project officer for the Million Miles project said:

“CycleStreets now fits seamlessly into our website and with the homepage map centred over the Black Isle, selecting the start and end points of a route is straightforward and you can toggle between a selection of useful background maps and aerial photography.”

“Quiet, Fastest and Balanced are the ideal categories for routes options from A to B because people using the journey planner will take different approaches to cycling: one cyclist may want to stick to the roads and get somewhere as quickly as possible and another may be happy meandering through the forests free from traffic.”

Culbokie Journey on embedded CycleStreets planner

The screenshot below shows some of the work that has been done to improve the OpenStreetMap map data in the area. Peter said:

“It’s particularly satisfying when CycleStreets routes you along a forest access road or farm track that you added to OpenStreetMap – it completes the circle!”

OSM Culbokie Apr 2013 to Jan 2014

Transition Black Isle will also ensure that their printed map heavily promotes OpenStreetMap and the new online cycle router. In a sense, the printed map will be an elaborate flyer for cycleroutes.transitionblackisle.org. There’s a lot going on in the Million Miles project – visit the page on the group’s website for more information.

Want an embedded cycle journey planner on your website? Read our page to find out more.

What do you call a path alongside a road?

November 28th, 2013

Cycle routes very often use un-named paths. These create a headache for anyone who tries to give directions to a cyclist:

“take the cycleway alonsidge this road, at a junction with two other paths turn right under the bridge, then go down a snicket on the left …”

It’s a key issue for us trying to produce intelligible itinerary listings — and even more important for our sat nav users where the names are called out!

Showing a fork in a cycle path.

“Bear right onto un-named link.”

Some examples include:

  • short links from a cul-de-sac onto one of a town’s radial routes
  • useful permeability links or short-cuts often known by colloquial phrases such as jitties or snickets
  • paths across open spaces
  • roads that begin paved but farther down revert to a track
  • bridleways
  • redways in Milton Keynes, cycleways in Stevenage
  • old railway lines that have become cycle routes (though these usually get a name)
  • short links addded to join cycle routes – often forming the hypotenuse of a triangle

Direct tagging

CycleStreets uses the street name if directly tagged in OpenStreetMap. If the name is not available any cycle route tagging from the way or any of it’s relations is checked. This results in names such as NCN51 or CS3.

Using only direct tagging still leaves an awful lot of un-named ways. As a fallback they can inherit names from the ways they join. Depending on how many joins there are we’ve used names following these patterns:

  • Link with …
  • Link between … and …
  • Link joining …, …, …

This has always been rather awkward and only slightly better than leaving them un-named. But when our sat nav apps call out such long conglomerations it sounds really painful — and something we just had to sort out!

Shared use path between Fulbourn and Cherry Hinton.

What’s a good name for the shared-use pavement cycleway between Fulbourn and Cherry Hinton?

Inferring better names

We’ve tackled this problem by using indirect data to invent more useful names. The result is that you’ll see the following phrases appearing in the street names of our itinerary listings:

‘Alley off …’

Where there’s a short un-named spur off a named way, for instance: Alley off Braithwaite Cresecent

‘… continuation’

An example is Gairbraid Avenue in Glasgow, the criteria used to identify these cases include:

  • Short: up to about 100 metres – renaming very long ways that match stretches the credibility of the idea
  • Only has two joints
  • Continuations of ways join to only one other way at one end
  • Cases where the joins at both ends are more complex are ignored.

‘… Blind Alley’

Like continuations but have connections only at one end, Canberra Close for example

‘Alongside …’

Some very useful cycle routes often run alongside roads, and are also often un-named in OpenStreetMap. We detect these cases by checking that the name of the nearest road at several points along the length of the cycleway. If the same name matches at least 70% of the length then the cycleway inherits the name of the road by being prefixed with ‘Alongside’. As an added bonus, we added a little easter egg relating to road names with ‘Drive’ in them.

A good example of the alongside names are shown in this route and this one.

Other names

The techniques above result in more sensible names for many tens of thousands of ways in the British Isles. We use some more techniques for fixing names across open spaces and inferring names of very short links between named ways.

As a general principle we try to make best use of what data there already is in OSM rather than suggest new rules about how it should be used. But in doing this work we’ve noticed that some ways drawn in OSM carry on round the corner to run alongside differently named roads. Such cases won’t inherit the ‘Alongside …’ name because of the 70% quality threshold. To fix that those ways should be split at the corner. We did split the long cycleway between Cherry Hinton and Fulbourn at the point where the adjacent road changed its name.

The second street named in this route shows that we’ve still got a way to go to cover more cases for choosing better names, but as ever this work is ongoing.

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * http://www.cyclestreets.net/footer.html
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.