Logo OpenStreetMap OpenStreetMap

Deník uživatele Augustus Kling

Nedávné deníkové záznamy

In the recent days I’ve experimented with rendering floor plans using indoor data from OSM. The Simple Indoor Tagging schema suggests pretty lean additive tagging rules to specify the floor level of features and extends to drawing room/area shapes. Well done guys! It’s a very nice and flexible suggestion to add indoor data to OSM.

Turns out coverage of indoor data in OSM is quite limited:

  • Only a few places mapped, mostly university buildings, subway stations and a few shopping centres.
  • Walls are rarely drawn and room polygons touch each other.
  • Doorways are not omitted when drawing walls, in other words there is no hole where doors are located.

This is expected given the difficulty to source indoor data paired with the limited editor support. And frankly, I don’t see much use in mapping indoor data (as part of OSM) except for POI floor levels.

The Simple Indoor Tagging is right in suggesting to map walls only if not already defined by room shapes. Having wall shapes in OSM would dramatically increase the number of nodes and make it more difficult than it already is to edit indoor data. Note that the spatially overlapping room shapes in the different floors are already troublesome to edit unless one uses things like JOSM’s filters extensively.

Being aware of these constraints I came up with the following process to generate walls on the fly:

  1. Cluster rooms, areas, walls, doors, floor level shape by floor level and spatial intersection. Basically collect what is close to each other.
  2. Create wireframes for the walls by collecting the outlines of the room shapes and explicitly drawn walls. This results in approximate centrelines of the walls.
  3. Calculate where the wall wireframe is close to door nodes, buffer (blow up) this part of the wall wireframe to gain the doorway polygons.
  4. Union buffered room polygons and the floor level polygon if available.
  5. Subtract walkable areas, add explicitly drawn walls, subtract doorways.

Zobrazit celý záznam