Skip to content

Indoor building mapping in OSM

Saturday, 28 June 2025  |  Volker Krause

When we were at TU Graz for the KDE Plasma Sprint and Grazer Linuxtage a few weeks ago the question came up how to practically map such buildings in OpenStreetMap given their available floor plans. As I’m mostly involved in using rather than creating OSM data I didn’t have a good answer for that back then. Thanks to input during the following quarterly OSM Indoor Meetup, you’ll find some hints on approaches and tools below.

Indoor Mapping

Navigating in complex public buildings is a similar challenge than navigating outdoors, detailed map data is crucial in both cases. And while indoor mapping is a somewhat niche topic in OSM still, there’s applications such as Itinerary and Transitous making use of that for train stations or airports, and Kongress applying this in conference venues.

For displaying maps split up by floor level we already get somewhat usable results with partial information as humans are very good in filling in the blanks.

Routing algorithms however are very dumb and very clever at the same time, dumb when it comes to making “common sense” assumptions when facing missing information and clever when it comes to finding creative shortcuts by exploiting incomplete information. So completeness is important here.

Two routes through an university building in side-by-side comparison.
Routing algorithm exploiting doors not intended for visitors (left).

And that’s even more the case when looking at accessibility usecases, no matter whether applying human or machine routing. Every single step somewhere can be a blocker for a wheelchair, and if you rely on tactile guides a mismatch between map and reality hurts a lot more than when you can fill the gaps by what you see on the spot.

Building plans

The hard part of mapping building interiors is usually to get the geometry of rooms, corridors, walls, etc. in correctly. Measuring this all by hand in reference to the outer structure is a very tedious job, tools commonly used for outdoor mapping such as GPS and geo-referenced aerial imagery wont help here.

There’s alternatives to this though:

  • Importing from digital Building Information Models (BIM). While tools exists for this getting access to these extremely detailed engineering models is hard. A group from TU Munich is currently exploring this for importing about 400 building parts of their campuses.
  • Images of to scale floor or evacuation plans are usually easier to obtain. Those generally cannot be imported automatically, but offer a similar help as aerial imagery for outdoor mapping. TU Graz has those available in their room information system in several variants and formats for example. We’ll focus on this below.

As always it’s important to make sure the material you use is available under a suitable license and/or there’s an explicit permission for use for OSM mapping.

Using building plans in JOSM

Setup

While the following assumes you have JOSM set up and connected to your OSM account, there’s additional plugins needed for this. Those can be installed via “Edit > Preferences… > Plugins”. The main one is “PicLayer”, “measurement” will also come in handy in many cases.

When using JOSM via Flatpak you’ll likely also want to give it full file system permissions for this. JOSM is based on Java Swing which has no support for XDG portals for accessing files. While that’s usually not an issue when editing OSM data it wont be able to open local build plan images otherwise.

Building outline

Editing a building starts with identifying the building outline. In practically all cases that will already exist in OSM, there might be cases with more than a single outline though, e.g. when a building has different extents on different floors.

Besides the building plan, aerial imagery available in JOSM can be a useful reference here.

JOSM editor view with a building outline highlighted.
Building outline with aerial image background.

In the above example we see that the existing outline covers the building extent at its top floor, omitting the parts on the ground floor towards lower right side as well as the small glass extension to the top.

That’s of course worth fixing on its own, and if the rooms you want to map are in that part of the building it’s the first step anyway. It’s yet another topic though, so for now we assume the part we want to map is covered by the existing outline.

Aligning the building plan

The next step is then to properly align the building plan image underneath the building outline, as that will most likely neither be scaled nor rotated correctly after adding it via “Imagery > New picture layer from file…”.

After enabling the building plan layer to be the currently active one (ie. it having the green checkmark in front of it in the “Layers” sidebar pane), controls for manually scaling and rotating become available. That works, but can be rather cumbersome to use.

Much more convenient is the automatic calibration feature of the PicLayer plugin. For this we need to know the physical length of two lines of the building outline. Whether that’s read from the building plan, measured in JOSM on the building outline or aerial imagery (which is where the measurement plugin comes handy), or measured in real life doesn’t really matter.

Calibration can then be started via “Mode > PicLayer auto calibration” in the menu (again, make sure the building plan layer is enabled), which gets you the following dialog.

JOSM PicLayer auto calibration dialog with no fields filled out.
JOSM PicLayer calibration dialog.

Follow that from top to bottom:

  • Select “Add points…” and click on three points on the building plan for which there are corresponding points in the building outline.
  • The following two text input fields become enabled then, enter the physical length in meters between point 1 and 2 as well as 2 and 3.
  • Click on the left “Select a layer including the building outline as reference…” and pick the OSM data layer in the follow dialog, by default that’s called “Data Layer 1”.
  • Finally, select the “Add points…” action on the bottom, answer the following message box with “defined” (ie. we already have an existing building outline), and then pick the three OSM nodes corresponding to the points you selected on the building plan.
JOSM PicLayer auto calibration dialog with all entry fields filled out, building outline with marked corner in the background.
Completed calibration dialog.

With all that done, the “Run” action becomes available and if everything matches this results in the floor plan being correctly position behind the building outline. The process can fail e.g. if the plan and the outline can’t be made to match, e.g. because the measured values were wrong or the selected points weren’t actually the same.

For more details also see the PicLayer documentation which has a step-by-step animation of this.

Highlighted building outline in the JOSM editor with the corresponding building plan in the background.
Correctly aligned building plan in JOSM.

To avoid having to go through this process multiple times, there’s actions in the context menu of the image layer to save and restore the calibration data.

Mapping room geometry in JOSM

With the building plan correctly aligned we can start to add room geometry. As many buildings have predominantly rectangular structures, enabling “Edit > Angle Snapping” once in “Draw Mode” tends to be very helpful. That not only helps with producing 90° angles but it also provides guiding lines for aligning e.g. multiple walls on a straight line.

In most cases the so-called “thin wall” model is used, that is walls between rooms are mapped as a one-dimensional line rather than as two-dimensional geometry (“thick wall” model). Exceptions might be very old buildings with very thick or irregular walls such as castles or cathedrals. While (visual) renderers and routers would benefit from the higher level of detail of the “thick wall” model it poses a big challenge for tactile renderers as those can only output a much reduced information density and “pixel” resolution.

Adding rectangular walls with JOSM offering guiding lines.
Alignment and angle guides in JOSM.

The bare minimum tagging on new geometry would need to be the level tag containing the floor level and the indoor tag describing the general type of structure (room, corridor or open area). There’s a lot more that could be added though (see below), but that is often better and easier to do on-site.

Don’t forget to also map corridors and open areas as well as possibly missing pieces of outside walls. Humans tend to automatically fill those in when looking at a map, but routers wont.

Mapping doors

Another thing that’s easiest to add from building plans are doors. Without those routers will steadfastly claim rooms are impossible to enter.

Doors are generally mapped as points. So that’s a matter of clicking on their center on the room geometry and tagging the resulting new node with indoor=door and the corresponding level as the bare minimum.

If a door is not meant to be used by the public, e.g. because it’s locked or because it’s an emergency exit, that’s also crucial to tag as routers will otherwise happily exploit this new shortcut. See access, entrance and exit for this.

Floor level changes

Structures that allows changing between floor levels (staircases, elevators, escalators, ramps, etc) are also essential to tag as such, with the important part being the level tag containing the set of floors reachable this way.

Without that routers wont find their way up or down a building.

And everything else

There is a whole lot more details that can be tagged on the new geometry then, such as:

  • Room names (name) and numbers (ref).
  • room semantics, e.g. lecture hall or a restroom.
  • door width and opening properties, which can be quite relevant for wheelchair users. Similarly for stair and elevator properties.
  • Toilet properties.
  • Information about tactile_paving guides and handrails, which are useful for people with reduced vision.

Adding all those details is much closer to outdoor OSM mapping and can also be done e.g. with mobile editors. An editor that can do floor-level filtering is still useful, but you can get a long way there without touching geometry, making this also a much more approachable activity for new OSM contributors.

Interested in more?

For some inexplicable reason you find all this super exciting and want to get more involved? No problem, there’s plenty of opportunities: