OpenStreetMap

My Understanding of how OSM data is used to display the map on a PC.

Posted by andy mackey on 30 April 2014 in English (English)

Hi All Some hiking pals and I were talking about openstreetmap and how it works. This is my explanation of how the data is used to make the map. The map is stored first as a big database of co-ordinates or nodes each with a description or tag, strings of them could be a road, path, a village boundary, a coastline. a single node could be a pub or bus stop, several could form a factory outline. These nodes and ways (strings of nodes) and their tags can then be processed or rendered into a map. The map can have different styles so that its shows what is important to the user. for example a walkers map may show a red dotted foot paths and small streams and foot bridges but not street names. a road map will have a smaller scale with readable roads and towns only. The view-able Openstreetmap is also stored as sets of maps or tiles or images at different scales or zoom levels. Zoom 1 shows the whole world as one map or tile. and each click of the + or scroll of the mouse halves the area and increases the numbers of tiles by a factor of four. When we have clicked to Zoom 19 we have a map tile of about 150 meters wide in detail, roads names and house numbers if mapped will then be readable. At zoom 19 there will be quite a lot of tiles (90000000000 of them ), although many map tiles will be of remote areas of ocean and land without anything on. Openstreetmap decided to supply its maps in this way as they can be put on screen faster than calculating and drawing each screen individually. Another advantage is the maps are easy to read. just imagine the zoom one coastline 262144 times wider than on Zoom 1 or Zoom 19 house 262144 times smaller. I hope this explains a bit how the data is used to display a map quickly and clearly. Happy Mapping Andy.

Comment from RobJN on 30 April 2014 at 18:30

Openstreetmap decided to supply its maps in this way as they can be put on screen faster than calculating and drawing each screen individually.

That may change at some point in the future with the introduction of something called "Vector tiles" but acknowledging that would just over complicate your basic description without adding much to it.

Rob

Hide this comment

Comment from Harry Wood on 1 May 2014 at 15:05

The Slippy Map wiki page does a reasonable job of explaining some of this too. I've also covered in some slide decks e.g. my My OpenTech 2011 talk has some noddy slides like this: tile serving

You said at zoom 19 there will be quite a lot of tiles 90000000000 of them, indeed that's a lot of tiles, and in fact the way a lot of tile servers are set-up, they do not store all these files pre-rendered. It's an interesting curiosity of tile serving, that you might expect there to be lesser visited areas of the map, but in fact that's an understatement. When it comes to higher zoom levels the vast majority of the surface of the earth is of so little interest, that nobody ever zooms in to look at it. Less than 1% of zoom level 18 tiles are ever looked at. Taking that into account, and also to cope with changing data from OpenStreetMap, OSM tile servers are often set-up to do a combination of serving cached files, and queuing up requests for "on-the-fly" rendering.

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment