Input data

Print Previous page Top page

OSM is an exchange format for vector maps of the OpenStreetMap project.

OpenStreetMap (literally «an open street map»), in abbreviated form OSM - non-profit web- mapping project of creating a detailed free geographical map of the world by community of members - Internet users.

To create maps, data from personal GPS trackers, aerial photographs, videos, satellite images and street panoramas provided by some companies, as well as knowledge of the person drawing the map, are used. In OpenStreetMap, the Wiki principle is used when creating a map. Each registered user can make changes to a map. Project data is then made available under the Open Database License.

Data in OSM format can be downloaded from one of the sources indicated on the OpenStreetMap project page in the Export section.

 

 

 

The maximum possible size of input processed data depends on the amount of RAM in the computer.

Data files in .BZ2 format - packed .OSM format files. When downloading such files (for example, from https://download.geofabrik.de), they should be unpacked before processing.

The input data file in OSM format is an XML file containing nodes, ways, relationships, and tags. Nodes (node) - points that have a unique identifier and a pair of coordinates. Nodes can be independent objects (if there are descriptive tags), as well as be part of ways and relationships.

For example:

 

 <node id="625043" lat="42.5276604" lon="1.5690867" version="3" timestamp="2011-08-05T00:16:14Z" changeset="0"/>

 <node id="625050" lat="42.5299751" lon="1.5721059" version="5" timestamp="2016-11-28T08:42:28Z" changeset="0">

         <tag k="highway" v="crossing"/>

 

Ways - a set of nodes. They can be independent objects (if there are descriptive tags), as well as be part of  relationships.

For example:

 <way id="8880955" version="4" timestamp="2018-08-18T14:17:53Z" changeset="0">

         <nd ref="64796309"/>

         <nd ref="64796310"/>

         <tag k="waterway" v="riverbank"/>

 

Relations - can contain nodes, ways and other relations.

For example:

 

 <relation id="7380238" version="1" timestamp="2017-07-07T11:39:49Z" changeset="0">

         <member type="way" ref="6181313" role="from"/>

         <member type="node" ref="51390142" role="via"/>

         <member type="way" ref="489466870" role="to"/>

         <tag k="restriction" v="no_u_turn"/>

         <tag k="type" v="restriction"/>

 </relation>