Revue des autres blogs

Martijn van Exel: 2012-11-12 12_01_01-IFTTT _ OpenStreetMap Local Change Notifications on your phone by mvexel - lun 12 nov 2012 - 20:12
OpenStreetMap user Zverik built something really cool a little while ago: a map showing you recent OpenStreetMap editing activity in your area: WHODIDIT. We used to have a similar service, OWL or the OpenStreetMap watchlist, but that service has been down for a while and Zverik got tired enough of waiting to build something new. [...]

MapBox blog: How We Built USA TODAY's Election Night Maps - ven 9 nov 2012 - 9:00

Throughout the 2012 election cycle, we’ve been fascinated with idea of visualizing realtime election results. On election day starting when voting concludes on the East Coast, newsrooms race to process and visualize vote totals in each of the 50 states, 435 congressional districts, and 3,200 counties across the country. The Associated Press provides a feed of results data aggregated from staff deployed across the country on eight minute intervals. Since nearly all news outlets subscribe to this data, the race to report results first is really about having an incredibly short time to publish, while maintaining a steadfast focus on reliability during what’s often the highest traffic night for news websites. The excitement of the night and availability of a reliable source of fast data make this a really exciting problem to solve.

In the thick of a massive redesign and brand overhaul across all printed and electronic media, USA TODAY brought on our team to help them build a new realtime election mapping platform. Our work culminated in a responsively designed web application that powered a full screen dashboard, a smart phone and tablet view, and eight different embeddable views used throughout election night on the homepage and several topic and article pages. Here’s how we built it.

The maps

Our first decision was around how to render the maps in a way that would maximize reliability while reducing time to update. We considered a few options for this:

  • Live rendering tile server: We configure TileMill on a server to generate map tiles on a schedule with the release of new results data. The map tiles would be hosted on to ensure the highest possible availability. This option was appealing because we’ve worked extensively with tile-based maps, including the MapBox Streets base layer, but it would mean considerable modifications to our hosting server to allow for faster than hourly updates.
  • Server-side static map image generation: We have TileMill render full view maps instead of map tiles. These images could be hosted on any static file web server with fast update times. However the need for a dozen different views multiplied by hundreds of electoral races made this option less appealing, and we’d need to build a custom method of interactive overlays.
  • Client-side dynamic image manipulation: If we render all map images ahead of time and manipulate only the colors of the map’s features in the browser based on results data, we would have the benefit of reliable tile hosting combined with fast data refreshes and low tile generation overhead. This option had a lot of promise, and we had a working sample project that would load image tiles with each state, congressional distrcit, or county colored by a hexadecimal representation of its FIPs ID and use an HTML5 Canvas and JavasScript to evaluate the initial color of each pixel, decode its FIPs value, and recolor it according the latest results data. This scales well and preserved the high resolution of features available with image tiles. Ultimately though, it would require significant investment in a Flash fallback for Internet Explorer 8 and loading tiles from the remote origin into a Canvas element introduces cross-domain security issues.
  • SVG vectors with VML fallback: This option won for a few reasons. First, there are several well established and easy-to-use libraries for SVG vector rendering that would allow us to do all of the map processing right in the browser and require absolutely no server-side infrastructure. We figured any server would be a considerable failure point, so this was important for ensuring reliability. And it would not require as much custom development as the previous Canvas-based approach.

Rendering the maps

We chose D3.js to handle SVG map generation. D3 provides a simple interface for building SVGs, as well as native support for map projections and transitions. Since it doesn’t get bogged down with supporting legacy browsers without SVG support, we switched over to R2D3 for versions of Internet Explorer less than IE9.

D3’s projection support includes Mercator and Albers, as well as an option to set your own. For national views we used an Albers projection, but for state-wide views we instead used the spherical Mercator projection in MapBox.js so we could overlay the maps on the MapBox terrain layer. This was relatively easy to do — depending on the map’s zoom level, we changed the projection function. We also used D3 to animate the reprojection process for a smooth transition effect.

Geodata processing

Our maps required two inputs: geographic data for the shapes of and election results values for each political division. We used Census shape files for states and counties, and newly redistricted congressional districts from Azavea. The source shape files were several megabytes each, so we needed to simplify their geographic detail considerably to get them small enough to transfer over the internet load in the browser. Our target was no more than 300kb gzip compressed size per file.

Nate processed the data with a whole suite of open source tools including QGIS, PostGIS, and GDAL OGR. The first challenge was to reduce geographic complexity and maintain adjacent boundaries — more technically known as preserving topology. Secondly, we needed to make sure the boundaries of features on different layers of data match — for example, when we layer state borders over congressional districts — which we solved by clipping congressional districts and counties to the boundary of each parent state.

Pretty quickly we realized that we could not depend on one simplification file to give us both the small file size and high resolution detail we wanted. So we produced a set of heavily simplified congressional districts to use along with D3’s included simplified counties and states. This data would be used for small maps, like the thumbnails for each race, the national House race map, and the national county-level maps. For zoomed views, like when you click on a state to see county level detail, we produced higher resolution files for each state of all of that state’s counties and congressional districts. The application then dynamically loads data as you navigate the map. When you load the initial view, you receive a few simplified files to draw low resolution thumbnails and a high resolution main map of states. When you click on a state, a high resolution file of counties for that state loads, providing better detail without needing to preload a lot of extra geographic data.

In the end, we essentially built an API for requesting geographic data at two simplification levels. To make it scale, we did not do the processing on the fly. Requesting geographic data from a live database is a completely unnecessary risk when the geographic data is not going to change. We rendered all of the data to flat geoJSON text files that we hosted will all of the applications other static files.

The web application

As with the maps, we achieved high scalability and reliability by offloading as much as possible of the web application to the browser. There was no backend server application behind the web application. A single Backbone.js web application powered all of the embeds, full screen dashboard, and smart phone and tablet views.

Initially, viewing the application only loads the most basic HTML layout and starts the Backbone router. Depending on the URL hash of the request, the router dynamically loads the rest of the HTML layout. Going to /#embed loads a particular embed view, whereas requesting /#map or /#table loads a main application map or table view. Additional values following the view parameter determine configuration settings like embed size, race, and state. For embeds, the main application with appropriate URL hash gets embedded in an iframe. For the main application, as you click through, you trigger new routes by updating the URL hash with new parameters, which updates the page without the need for a full refresh.

For a complex application like this, we spent a lot of time in partnership with USA TODAY’s staff designing and developing the web application. But the principle is simple - lazily request only the data you actually need for a given view, including the HTML template, geodata, and results data. This allows us to have a large client-side application hosted on a single html page with no server application requirement.

Results data API

With the USA TODAY team, we drew up a spec for a simple JSON API to transfer the live election results. They built a process to ingest the Associated Press’s XML data and expose it according to the API’s schema. We predetermined and calculated all possible requests so they could be cached in a CDN with a very high TTL. There was little chance requests would ever need to go back to the data API’s server. Only one API endpoint updated frequently - a simple number of the latest version of data available on the server. The web application polled this endpoint every 30 seconds to make sure it had the latest data. If the API response had a higher number, the application knew new data was available and would issue requests against the endpoints it needed to rebuild its current view. The method provided a balance between detecting and updating data changes quickly and having highly cacheable requests to protect the API server. Since this would be the only part of the entire application that would require a server-side application, it was crucial to have a reliable caching process.

Version-controlled data

We initially set up a version control process on each of the eight minute data updates as a reliability failsafe. If anything went wrong in a new version of data, we could always roll back to a previous one. But we soon realized that these versions provided an interesting by-product - we could analyze differences between the versions to produce a feed of updates to draw viewers’ attention to the latest news coming out of the results data.

The updates feed listed three main events - new states reporting results, races called for a candidate, and states that swung to a different party in the presidential election compared to 2008. Simple comparisons between the versions made it possible for us to show the narrative of the night through changes in the data. With an average time on site of about ten minutes, we were very excited by this feature.

Bonus: Now we can use the data versions replay the night later to see the results as they unfolded.

Let us know on Twitter if you have any questions or are thinking through your own realtime data mapping project.

Meridian Release SDKs for Indoor Navigation and Location

GpsBusinessNews - jeu 8 nov 2012 - 22:51
Indoor location services provider Meridian today announced the availability of two software developments kits (SDKs) allowing third party developers to use Meridian’s indoor navigation software or Meridian indoor location technology in their apps.

These SDKs, called NavKit (for indoor maps and navigation) and BluDotKit (for indoor location...

Ford Plug-in Hybrids Leverage GPS Data to Drive Longer on “Electric-Only“ Mode

GpsBusinessNews - jeu 8 nov 2012 - 18:22
"We know from our research that hybrid drivers want to drive as often as they can in electric-only mode, especially near their home or frequently visited locations," said Kevin Layden, Ford director of Electrification Programs and Engineering.

To answer this consumer request the car maker developed EV+ a feature that switches the engine i...

" User's Diaries": Potlatch 2 simple mode hides too much - jeu 8 nov 2012 - 17:59 Note that wambag changed the maxspeed (presumably correctly; the city recently took over maintenance from the state), but the source:maxspeed was not touched (and is thus incorrect now). I haven't gotten a response, but it's very likely that he was using PL2's simple mode, which allows you to choose the maxspeed from a dropdown, but has no mention of source:maxspeed.

Possible solution: put a list of all tags at the bottom (possibly ignoring certain ones like TIGER), with some sort of hint showing the correlation between the simple tags up top and the ones at the bottom. This has the beneficial side effect of easing the learning curve.

Turn-by-Turn Navigation with Openstreetmap: Growing Usage and Interest

GpsBusinessNews - mer 7 nov 2012 - 7:03
German mapping and GPS navigation developer Skobbler this week announced to have surpassed 3 million users for its services based on the free map data of the Openstreetmap (OSM) community. It added one million users since December 2011. Very recently Skobbler’s British competitor Navmii announced to have reached 10 million users for its Navfree...

" User's Diaries": Routing, it mostly works - mar 6 nov 2012 - 23:55

I've been contributing to OpenStreetMap for a while now, but I actually put OSM data to the test today.

A family member bought a new vehicle recently which has a built-in manufacturer-supplied GPS with proprietary mapping data on it. We decided to have a drive today to test it out. I brought along my Garmin eTrex 20 loaded up with OpenStreetMap-derived TalkyToaster maps. TalkyToaster's maps are routable and have a large number of points of interest.

We did a 35 mile drive down to Dungeness in Kent. While there, I did some site surveying in the freezing cold and have made a few updates to OSM.

The routing mostly worked. And the data was good. On the outward journey, I checked a lot of the side streets we passed by, and all those I checked had the correct name and There was only one problem I found with the data: there was a tiny little cul-de-sac I spotted that wasn't on the map. I added it as a waypoint on my Garmin and will add it to the map when I next transfer data off.

The routing had only one problem and that was on the return journey, while driving along Lower High Street, Wadhurst. Rather than continue on to the High Street, the Garmin device instead said that one should turn into Church Street. Church Street is a tiny single-width street that is only used for access and is tagged highway=residential. You wouldn't drive up it, especially in a larger vehicle like a van. It actually has a warning sign forbidding HGVs from entering. But the Garmin was quite insistent that one should drive up there. The manufacturer-installed GPS accurately stated to carry on along the High Street.

I shouldn't be surprised at how good OpenStreetMap data is (I've added plenty of it), but this slight routing mishap aside, certainly here in the south east of England, it is now pretty damn close to good enough that it can be used for in-car navigation. Having seen how much data upgrades are for some car GPS units (as much as £150 in some cases), the future really ought to belong to OpenStreetMap.

We've got open data, we've now got open source operating systems (Linux, Android), cheapish hardware, Kickstarter for funding: someone could build a completely open source satellite navigation system...

" User's Diaries": Mapathon - Operation Cowboy - mar 6 nov 2012 - 9:49

As the Night of the living maps was (at least in my eyes) a success, I felt motivated to start another global (but somewhat virtual) mapping party at the end of the year.

Here it is: Operation Cowboy As you might expect, this time we try to help our US/American community by bringing more details to this huge nation and assist on improving the imported TIGER data.

But hey, our community is social, so what about organizing a local party for your community?

Guess this will be fun again!

OpenGeoData: Weekly OSM Summary #55 - lun 5 nov 2012 - 22:09

October 22nd, 2012 – November 5th, 2012

A summary of all the things happening in the OpenStreetMap (OSM) world.

Did we miss something? You can contact us via

Authors: Pascal & Dennis - (thx @ “Wochennotiz”)

Permalink | Leave a comment  »

" User's Diaries": UK football Stadium mapping - ven 2 nov 2012 - 3:55

I have decided to get all the 138 English and Scottish football league stadiums on OSM. It will take me months but I'll chip away.

Some local knowledge but mostly Bing tracing.

Done the A's on my list so far.

Adams Park, Wycombe Wanderers (

Almondvale Stadium, Livingston (

Amex/Falmer Stadium, Brighton and Hove Albion (

Anfield, Liverpool (

Ashton Gate, Bristol City (

One of these wasn't on the map and Already mass confusion on the names of 2 of them.

Linking to Wikipedia pages, operators, websites, adding addresses, Stands (sometimes at the moment as a separate building entity inside the stadium, still thinking of the best way to do this) among other info

I'll update the OSM wiki stub for stadium at some point to when I have seen the pitfalls/best way to map all of this.

MapQuest Adds Traffic-based Routing to iPhone’s Navigation App

GpsBusinessNews - jeu 1 nov 2012 - 18:06
MapQuest yesterday introduced a new version of its free turn-by-turn navigation app for the iPhone that now performs routing based on the traffic situation. the new app is also optimized for the larger screen of the iPhone 5.

No name of traffic provider has been given, but INRIX has been the supplier of MapQuest for their web mapping portal fo...

Frederik Ramm: Anti Business - mer 31 oct 2012 - 21:25

I recently found myself confronted with the sentiment that, as far as OSM or the OSMF are concerend, I had an “anti business” attitude. That’s a funny allegation about someone who was among the first people on this planet to run a business based on making OSM data available commercially, or training commercial entities how to work with OSM.

I’m not anti business. I confess that my output on mailing lists and other forms of OSM project communication may be large, but anyone with a pair of eyes will find that, for example in the license discussion, I have often argued for the business side. For as long as I can think, I vehemently fought the idea that “nobody should make money from our work”, an idea that was and still is occasionally voiced by community members, notwithstanding the fact even the old CC-BY-SA license allowed commercial use.

The one thing that I do regularly say, and where this “anti business” idea might come from, is this: OSM is not a business (and neither is the the OSMF). We are a movement, or a mass membership organisation. In my eyes, the main difference between us and Google Map Maker is not that they have a proprietary license and ours is open. The main difference lies one level deeper: They are ultimately driven by the stock market and we’re not.

Making this distinction is not anti-business; it is just about saying things as they are. Organisations driven by the stock market have other kinds of goals, are optimizing for different time frames, have other forms of management, a different type of competition, a different constituency, a completely different set of rules and values. There’s also more at stake – if Google goes bankrupt, lots of people lose their jobs, but if OSM breaks down then a different group of people will just carry on where we left off.

I’m all in favour for working with businesses who can help us make OpenStreetMap better known or more widely used, or give us access to data or help us write code. Any such cooperation will only profit from getting the basic facts right: You are a business, we are not; your goal is to make money, our goal is to make a map – and now let’s see how we can do something together that helps us both! It doesn’t help anyone if OSM tries to act like a business. Dealing with OSM will always be totally different from dealing with a commercial map data provider. Our best way to be business friendly is to explain to businesses how we work – to make them understand, and ultimately embrace, the ways in which OSM is special.

MapBox blog: Server Stats from Sandy - mer 31 oct 2012 - 8:00

Our maps are critical to our users and to the wider public. They were especially crucial for predicting and tracking Sandy’s progression, communicating evacuation plans, and tracking surges.

MapBox powers maps on several storm-related services, including Weather Decision Technologies maps for hundreds of subscribers, USA Today’s main weather map, NYC Government’s evacuation map, and WNYC’s storm surge map. Sunday traffic was up 50% and spiked up 100% when Sandy hit land on Monday. During the storm, our traffic was 450% higher compared to the same time period last month.

In Sandy’s path

Predictions put Sandy on a direct course toward our Virginia data center. Our preparations focused on ensuring full availability knowing that one of our data centers was about to get clobbered. We assumed the worst in terms of physical data center impact - that the power would go out for days, generators would fail, physical equipment would be damaged, and the data center would be shut off and temporarily abandoned. But regardless of what was going to happen, our maps needed to keep working and handle the incredible traffic increase during and after the storm.

Our plan

MapBox runs hot in two data centers, one in Virginia and the other in Ireland, and our Dyn DNS fails over traffic should one go down. We assumed Virginia would go down and were not comfortable running only in Ireland for what could be several days. It was unclear what network traffic would look like if the only data center were in Ireland and with a badly damaged East coast. Based on the idea that Virginia would fail, we drew up the following plan on Friday:

  1. Setup an additional instance of MapBox at AWS’s Oregon data center.
  2. Made it hot by using Dyn’s Traffic Manager to direct all West coast traffic to Oregon.
  3. DNS failover any traffic from VA to OR in the event of a data center outage.

When Sandy hit landfall, MapBox was running in three data centers, handling 450% of normal traffic, and all traffic going to Virginia was ready to fail over to the remaining data centers.

Highly available architecture

Each instance of MapBox within a data center is also designed to be highly available based on the recommendations of AWS. Within each data center a full MapBox instance runs in at least two availability zones, which are basically like separate warehouses of servers, each with separate private networks, power, and internet uplinks. In other words, there are at least two instances of MapBox running in each data center where MapBox is deployed. The use of multiple availability zones does not guarantee an infrastructure to be 100% fail proof. Even though each availability zones has a separate power source, network, and physical location, past issues indicate how one availability zone can affect another based on how the private network across availability zones is used.

These types of issues and issues like the power outage this summer that could easily knock out multiple power supplies are examples of why MapBox runs in multiple AWS regions. However, there are sometimes smaller outages like last week’s event where running in multiple availability zones can prevent a regional outage of your service. Our approach is to design knowing core parts of our system will fail at a point. This level of persistent paranoia helps us avoid failure at as many levels as possible, and this is how we are prepared for AWS single availability zone and region-wide failures.

Track our status

Whether an event is somewhat predictable like Sandy, or unpredictable like the earthquake that affected the East coast last summer, we will be open with how MapBox is designed to cope with such unfortunate occurrences and aim to serve your maps, and to serve them as fast as possible, no matter the circumstances. Find MapBox’s current status on the MapBox status page.

Image of the Week: Surging seas climate change New York 10ft - mer 31 oct 2012 - 7:00

The "Surging Seas" map blends OpenStreetMap and aerial imagery to interactively simulate sea level rise due to climate change. Here we see New York after a 10ft rise, the maximum setting. The storm surge of Hurricane Sandy brought a rise of up to 13ft.

CycleStreets: London Cyclist magazine features OpenStreetMap & CycleStreets - mar 30 oct 2012 - 20:47

We’ve contributed a two-page article to London Cycling Campaign‘s London Cyclist magazine – sent to all its members – on OpenStreetMap. (Do join LCC if you cycle in London!)

The article introduces the LCC journey planner that we created for them, and talks about how it uses OpenStreetMap, a project that cyclists can contribute to.

The article also includes a box about the England Cycling Data project.

Thanks to LCC for this great publicity for OSM, and thanks to Shaun, Andy and Harry who had a look over the drafts for us!


" User's Diaries": calculate ways instead of drawing or: a look at average tracks - mar 30 oct 2012 - 18:55

Since I was at it I checked again Average tracks mentioned yesterday.

In the valley of Trenta there is a nice highway with a lot of logs uploaded but it isn't drawn really nice so far. I downloaded all the GPS data using JOSM, converted it to a data layer cleaned it so that only good traces remained. Saving the data as gpx again, the resulting file contained nearly fifty tracksegments. I split that file into single gpx files each containing one of the segments. These I converted into csv format since the script wants this format.

A first run on all segments I cancelled after short time remembering the runtime of osm-makeroads. I randomly selected some segments but since some covered only a part of that highway the result was unusable.
So I selected nine segments which covered the same part of the road with a length of 19 kilometres. The duration of the calculation with some seconds was satisfying short. The result itself is not to my liking. Though it is in most parts quite usable I will draw a better way by hand.

Conclusion: Most likely won't use this script in the future. It is not much advantage from drawing some kilometers of a way to checking and fixing a calculated one over its complete length before uploading.

Used scripts:
gpxsplt *cough*

(Sorry for the big screenshots, but all for the best visualisation :) The yellow line is the averaged track.)

"faulty" length: about 500m

"faulty" length: about 1200m

u-blox Acquires Competitor Fastrax for €13m

GpsBusinessNews - mar 30 oct 2012 - 17:10
Fabless GPS and wireless semiconductor maker u-blox continues in strategy of targeted investments with the acquisition of Fastrax, Oy, a Finnish company specializing in GNSS modules, technologies and antennas. u-blox spent €13 million to acquire the company.

“Over its 12 year history, Fastrax has established itself as a successful player i...

OpenGeoData: A weekend of Potlatch - lun 26 mar 2012 - 0:17

We usually talk about data on this blog, but OpenStreetMap wouldn't happen without code, too. Running the world's biggest user-editable map (and, increasingly, one of the world's biggest maps, full stop) requires thousands upon thousands of lines of code... from the low-level stuff that keeps the servers flying along, via the API and editing software that enables you to contribute, to the programs and stylesheets that turn all this raw data into pretty maps.

Much of this work happens in isolation, co-ordinated by IRC conversations or mailing lists. But we also have 'hack weekends', where developers - experienced and newcomers alike - come together to share knowledge and bounce ideas off each other.

Last weekend saw a major hack weekend in Toronto, attracting developers from the US, Britain, and the Netherlands as well as Canada. This weekend saw a rather smaller gathering in Charlbury, a tiny town in the Cotswolds, England, which coincidentally is home to the lead developers of both Potlatch (our online editing software) and Mapnik (the 'renderer' which turns OSM data into map images).

The focus for this weekend was Potlatch, with a vast list of improvements undertaken over the two days. The theme was "little things that mean a lot", so when the new version goes live soon, you'll notice quicker loading, neater appearance, more reliable operation, and so on. (Those of a technical bent can see the long list of code changes.)

OpenStreetMap's users are hungry for new features and our existing developers are run off their feet keeping up. So if you have technical skills, come and join in. Whether your knowledge is Ruby, JavaScript or design (the website), ActionScript (Potlatch), C++ (various site components) - or whatever it might be - we'd love to have you aboard. Check out the mailing lists ( site, Potlatch, full list) and the #osm-dev IRC channel, and find out how you can get involved.

Permalink | Leave a comment  »

Coming MapOSMatic hackfest

David Mentré's blog - ven 23 mar 2012 - 13:00

New week, some of MapOSMatic contributors and developers will join Rennes for a one week MapOSMatic hackfest. We hope to fix the numerous bugs and feature requests we have! Stay tuned! ;-)