OpenStreetMap (OSM) is an free and open-source mapping software that is an alternative to commercial maps like Google/Bing/Apple Maps.

OSM data has three types of entities, identified by a globally unique 64-bit integer identifier called an OSMid:

  • Nodes, latitude/longitude points
  • Ways, a list of points that form a path
    • i.e., a piece of a road, a shoreline, a park boundary
  • Relations, group multiple entities

Points and ways may also have optional tags (key-value pairs), i.e., name = Yonge, natural = water.

OSM in total has a huge amount of data (in an .xml file). The Earth has about 1 terabytes worth of data. Since this is hard to work with, we extract and download several cities. For example, we can download toronto_canada.osm.xml. The positive and negatives:

  • Lots of data, few restrictions!
  • XML is human-readable data.
  • But, data is low level and could be hard to interpret, i.e., computer have to parse through the text.
  • Text may be inconsistent.

osm2bin is written for ECE297 — Software Design and Communication. It reads in raw OSM data, applies consistency checks and sanitises the data, organises it, and writes out only essential data in the eact binary form needed to load our API classes.