Indoor Mapping by Tim Manners


This project was an investigation into indoor mapping and the activities concerned with it.

There are a variety of use cases for indoor mapping – and each one has venue-specific peculiarities associated with it (e.g. office vs. hospital vs. shopping centre).

There is also consideration as to what source information is available/accessible for using as the basis to capture the floorplan. This information may exist as CAD drawings or existing diagrams [which may or may not be georeferenced/topologically correct]; or as some kind of internal point-cloud.

For the purposes of this project, we have concentrated on the OS head office (Explorer House) in Southampton, as it offered the most readily accessible set of source data.

This article is intended as a high level introduction of the work that has been completed to date.


Interactive Floorplan

The first component of the indoor mapping project was to create an interactive floorplan of the office. This was primarily captured from the CAD drawings and depicted the office/room locations for each of the three floors in real-world coordinates.

In addition to generating the geometries, each feature was attributed with information such as the room name/number; calculated area; and security level (i.e. publicly accessible areas and those with restricted access).

Further information about the meeting rooms (capacity, equipment, etc.) and toilets (male/female, disabled access and shower facilities) could then also be associated wherever appropriate.

Once the floorplan had been captured – the GeoDataViz team provided some assistance with the styling options to present the data.

Figure 1: Explorer House floorplan [level 0].


Extruded Floorplan

After seeing this example on the Mapbox GL JS website – we were interested to see if something similar could be achieved using the same source data to generate a 3D extruded floorplan of the office.1

The first stage was to use the mapshaper command line program to convert the floorplan polygon geometries into topological boundaries.

Once the line topologies had been extracted – they were loaded into PostGIS and 'flat-end' buffered to produce a series wall polygons.2 By attributing these polygons with height and base_height styling properties – it was then possible utilise Mapbox GL JS to render the 3D indoor map.

Figure 2: 3D extruded floorplan of Explorer House.


Indoor Routing

After capturing the floorplan, we then looked into the creation of an internal network which could be used for room-to-room routing.

Using an existing knowledge of network data models and graphs, it was possible to develop a schema which could be used for indoor routing, comprising of a link/node data structure with associated room points.

Because of the nature of the indoor network, the geometries were captured with 3-dimensional (XYZ) coordinates. This enabled distinction between features on different floors; along with the connectivity between them. For example, the start- and end-points for a link representing a lift would have the same XY positions, but different Z values.

Route calculations were based on Dijkstra's shortest path algorithm using a directed graph.

The addition of restriction attributes enabled routes to be generated which avoided obstacles [including narrow barriers/gates] and stairs; alongside the standard route.

As part of the shortest path calculation it was necessary to consider the one-to-many relationship between the rooms and door access points (e.g. the restaurant kitchen has five entrance points). This meant every possible combination of doors was processed in the algorithm to ensure that the most accurate shortest path was returned.

Along with identifying the shortest route – consideration was also put into adding an indication of the time it would take navigate the path using the calculated distance and preferred walking speed.

Figure 3: Internal path network with example shortest route. Created using the Qgistothreejs plugin within QGIS3.

In addition to creating the link/node structure we also considered the options for routing through open spaces (such as the Atrium) where users have a free flow for navigation as opposed to following a defined path.

For this component we investigated polygon routing using a rasterised version of the data in conjunction with some of the tools offered by the open source GRASS GIS4.

By rasterising the polygon features which represented the Atrium and table footprints – and assigning a cost to each of the cells (the Atrium footprint had a low cost; while the tables had a high cost) – it was possible to show the cumulative cost [and hence shortest path] of moving between different geographic locations.

Figure 4: Polygon routing (shortest path through the Atrium avoiding tables).

UPDATE: Polygon routing can also be achieved with vector features via the Turf.js shortest path function5 – which returns the shortest path from start to end without colliding with any obstacles (areas which the path cannot travel).


Desk Locations

To suppliment the floorplan, we then decided to capture some of the office furniture – namely the location of all the desks.

The first stage was to identify the various desk types that are utilised around the building. A simple template polygon was then generated for each of the desk types with a defined anchor point. Using the CAD drawings, it was then possible to position the appropriate desk in its correct geographic position and orientation.

Once the desk locations had been captured, an external listing of staff names was attached to the polygons (via the desk number) to show the correlation between the two datasets. This provided a useful insight into the current quality of the information – particularly that which is incomplete and/or outdated.

Figure 5: Desk locations (shaded to illustrate the number of staff associated with each desk).



Many of the indoor mapping components were then consolidated into a single web-based application [enabling users to view the floorplan; perform room-to-room routing; and locate staff/desk locations].

This application will act as the base to adding and displaying further feeds of information. For example, integrating calendar information as to whether a person is currently at their desk; or visualising the status of the meeting rooms on any given day/time (meaning that the booking process could potentially become more straight-forward).

It is hoped that we would be able to extend this project by linking indoor positioning (using Bluetooth beacons) to the floorplan. This would be particularly beneficial to the routing – as users would be able to track their exact location as they navigate around the building.

Figure 6: Mock-up showing floorplan overlaid with route and user position (inset map to highlights the floor/level).


1 Mapbox GL JS is a JavaScript library that uses WebGL to render interactive maps from vector tiles and Mapbox styles.
2 PostGIS is a spatial database extender for the PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.
3 QGIS (Quantum GIS) is a free and open-source cross-platform desktop geographic information system.
4 GRASS (Geographic Resources Analysis Support System) is a free geographic information system software suite used for geospatial data management and analysis.
5 Turf.js is a modular geospatial engine written in JavaScript.