tldr; Mapzen is collaborating with Amazon Web Services to release OSMLR segments through their Public Datasets program. Use OSMLR segments and IDs to attach your dynamic data to almost any stretch of roadways in OpenStreetMap, anywhere in the world.
On a long road trip, one of the most dependable ways of passing the time is watching the mile markers: Another mile down, another mile closer to your destination. Mile markers are useful if you get a flat tire and need to describe your location over the phone. And they’re even more useful to the public agencies and contractors that maintain roadways. Mile markers serve as a linear referencing system, which can be used to catalog stretches of pavement needing repair or locations along the roadway where collisions have occurred. Linear referencing is also how roadways speeds and other data about traffic conditions are collected and shared.
OSMLR is what we call the linear referencing system that we’ve built on top of OpenStreetMap. OSM has great information about roads around the world and their interconnections, but it lacks the means to give a stable identifier to a stretch of roadway. OSMLR provides a stable set of numerical IDs for every 1 kilometer stretch of roadway around the world. In urban areas, OSMLR IDs are attached to each block of roadways between significant intersections.
Just as there are many uses of the mile marker signs along a highway, there are many possible uses for OSMLR:
We developed OSMLR to associate historical traffic speeds with roadway segments for our work with the World Bank on the Open Traffic platform.
OSMLR is an effective means for associating roadways with dynamic data that doesn’t belong in a static map dataset like OSM. For example: planned construction, parade routes, or on-street parking usage statistics.
OSMLR can be used to associated OSM roadways with proprietary or confidential data that doesn’t belong in OSM.
OSMLR provides all the key ingredients to match OSM roadways with road maps from another base map provider. In the future, once more tooling is available, it it should be straightforward to transfer data associated with OSM to another base map, for example the U.S. Department of Transportation’s ARNOLD.
Since OSMLR has such a wide range of uses and users, we’re now collaborating with Amazon Web Services (AWS) to release the worldwide OSMLR segment tileset through the AWS Public Datasets program. OSMLR segments will be freely available through Amazon S3, indefinitely. AWS users wishing to run advanced analytics on OSMLR segments will find it very speedy — the entire OSMLR planet tileset is already within fast reach on the AWS network. Mapzen and AWS have already worked together to release terrain data through the Public Datasets program, and we’ve been pleased with all the options for visualization and analysis that it’s opened up.
Now that OSMLR is in the AWS Public Datasets program, we’ve moved OSMLR segments to their new canonical home in an S3 bucket called osmlr
. You can browse listings of all the available tile files. To download subsets of OSMLR tiles, we’ve created a set of shell and Python scripts you can use to fetch tiles within your choice of bounding box:
For example, fetch some tiles for Seattle like so:
./download_tiles.sh -122.4426,47.4986,-122.168,47.6894 https://s3.amazonaws.com/osmlr/v1.1/geojson ./tiles 2 json false
And you can create a map of downtown Seattle showing three OSMLR tiles: highways from the level 0 tile encompassing Seattle are in red, arterial roads from the level 1 tile are in yellow, and local roads from the level 2 tile are in orange. (For more on the three levels of the OSMLR tile hierarchy, see this blog post.)
At Mapzen, we’re excited to continue improving OSMLR. We’ll be sharing more information soon on the quarterly update process that will keep OSMLR fresh with the latest OSM edits and additions. We’ll also be exposing OSMLR segment IDs through more services hosted on Mapzen Flex. More on this in the coming months.
Our collaborators at the World Bank are also expanding their use of OSMLR beyond Open Traffic. Expect more from them on their Open Transport Partnership soon.
Want to learn more about OSMLR? Come to our to talk today at State of the Map US in Boulder. Read an introductory technical blog post and a follow-up post.
We’ll be following up more tutorials and documentation on OSMLR soon. In the meantime, we welcome your questions, comments, ideas, and creations.
Mile marker picture by Daniel Ramirez.