Skip to content
Thomas Schwotzer edited this page Jun 6, 2019 · 16 revisions

Convert OSM to OHDM data - separate objects and geometries

I2O figure

A fresh OHDM instance is usually set up by a OSM file which was parsed into the intermediate database.

In this second step, geo objects, geometries and their relations are extracted from those original osm data. This process has three steps: processing nodes, ways and relations.

About objects and geometries in the flux of time

Geographic systems always deal with two things: objects and geometries, even if they don't do it explicitely. Geometry is the shape of something. It is best describe with a vector geometry. The described something is the object, see als n-m-relationsship between object and geometries in each GIS

OSM does mix both concepts - which is completely ok because we don't deal with time.

Examples:

<node id="xx" ... lat=".." long=".."/>

describes a pure geometry. There are no object information. This node (point) will only (!) be used as a part of a way or relation but not as a object by itself.

<node id="xx" ... lat=".." long="..">
  <tag k='highway' v='traffic_signals' />
</node>

That node describes a geometry (a point) but also an object: That is a traffic signal. OHDM considers every OSM entity to be an object if it has either a name or a map feature.

<node id="xx" lat=".." long="..">
  <tag k='name' v='here_is_a_name' />
</node>

Why? Users felt the urge to give this point a name. That is an object.

There can be more tags in each osm entity.

<node id='xx' ... lat='52.4413316' lon='13.5936747'>
    <tag k='crossing' v='traffic_signals' />
    <tag k='highway' v='traffic_signals' />
    <tag k='tactile_paving' v='yes' />
    <tag k='traffic_signals:direction' v='backward' />
    <tag k='traffic_signals:sound' v='yes' />
</node>

Here are the rules:

  • OSM entities are objects if the have a name tag or a map feature
  • all other tags are considered to describe the relationsship between object an geometry.

TODO

  1. Nodes are
Clone this wiki locally