Skip to content
Technical use case7 min read

Room Adjacency Graphs: From Floor Plans to Connections

By Floor Plan Analyzer, an AxcelerateAI practice

Two rooms can share a wall while their occupants must walk through a hallway to reach each other. A graph built from touching polygons alone can create a shortcut through that wall. Defining what each edge means is the first integration decision.

Fictional plan and graph connecting Entry, Hall and Office, with a restricted Storage connection kept separate
Original schematic for the downloadable graph. A dashed connection marks a restricted doorway excluded from the visitor query.

At a glance

Represent spaces as nodes and explicit relationships as edges. Build possible adjacency from room geometry, then use opening evidence to identify connections. Preserve the source doorway, level, review status and access rules so applications can query the appropriate graph.

Download the fictional adjacency and connectivity example

Choose the relationship before constructing the graph

A geometric adjacency edge says spaces share a boundary under a defined rule. A connectivity edge records a passage between spaces. A permitted route also depends on who is moving, when and under which access conditions. Keep these meanings in separate fields or graph views so a spatial query cannot silently become a navigation instruction.

OGC IndoorGML models indoor spatial information for navigation and distinguishes spatial representation from topological relationships. It provides a reference for discussing spaces and links across applications. The downloadable JSON here is an illustrative application model with its own fields.

References: OGC IndoorGML standard overview

Establish stable spaces and source evidence

Identify the intended plan views and revisions, reconstruct room polygons and associate labels with the right spaces. Give each space an internal ID independent of its printed name. An Office label can appear on several levels, while one room can be renamed in a later issue.

Retain the building, level, view and revision with the geometry and observations. Mark open-plan subdivisions as a chosen convention. For example, a reception desk and waiting zone may share one enclosure but need separate destinations in the product. Agree that convention before annotating training data or scoring an extraction.

Check polygon gaps and overlaps before deriving neighbors. Define the tolerance in the coordinate system’s units and inspect narrow walls, shafts and corner contacts. A corner touch alone gives weak evidence of a shared boundary and provides no opening evidence.

Attach openings to both sides of a boundary

For each door or passage, find the host boundary and the spaces on its two sides. Use the opening span, wall geometry and neighboring polygons together. Keep ambiguous assignments in a review queue. A door drawn near an intersection can be closer to the wrong room’s centroid.

Preserve the opening ID on each connection. Two different doors between the same spaces may have different permissions or closure states. Export multiple edge records or model doorway nodes if the consumer needs to distinguish them. A simple neighbor list loses that evidence.

A window should not become a walking edge merely because its span touches two spaces. Distinguish a blank wall gap from a verified passage using the project legend and context. Unknown endpoints need an unresolved state; they should not silently point to outside.

Work through Entry, Hall, Office and Storage

In the fictional example, Entry connects to Hall through D1. Hall connects to Office through D2 and to Storage through D3. Office and Storage share a wall without a door. The geometric record includes that shared wall, while the connectivity records require D1, D2 or D3 as evidence.

D3 is restricted under the example’s stipulated visitor policy. The visitor query therefore keeps Entry, Hall and Office connected and excludes D3. Entry reaches Office in two opening transitions through Hall. Storage is unreachable for that query, even though its doorway is drawn and its node remains in the data.

If a privileged query allows D3, Storage becomes reachable through Hall. The sample encodes a static fictional policy. A deployed application needs an authoritative source and update process for permissions and closures.

Different questions over the same plan
QuestionAnswer in the exampleEvidence or rule
Do Office and Storage touch?Yes, a shared wallGeometric adjacency record
Can the visitor go directly between them?No connection recordedNo doorway in their shared wall
Can the visitor reach Office from Entry?Entry → Hall → OfficeReviewed D1 and D2 connections
Can the visitor reach Storage?No path under this policyRestricted D3 excluded

Keep reachability separate from distance and accessibility

A room graph can answer whether a sequence of connections exists. An unweighted shortest-path query minimizes the number of edges. It does not establish shortest walking distance. NetworkX documents this distinction through unweighted queries and explicit edge weights.

For distance-based navigation, add paths through walkable space and lengths in verified units. Joining room centroids with straight lines can cross a wall or obstacle. Model hallway junctions and doorway approach points where geometry affects routing. Keep the higher-level room graph available for space queries.

A drawn door does not establish clear width, threshold condition, operability or an accessible route. Those properties require their own evidence and review. Likewise, vertical circulation needs explicit level-linked connectors and operational rules. A room graph should state which questions its evidence can support.

References: NetworkX shortest-path query and weight behavior

Frequently asked questions

Can I infer a doorway from two touching rooms?

Touching boundaries establish a geometric relationship. Use opening evidence and review to support a connection between the rooms.

Does a room graph provide walking distances?

It provides relationships. Distance queries need suitable path geometry, calibrated units and explicit edge weights.

How should restricted rooms be represented?

Keep the space and physical connection records, then apply sourced permission rules when producing a graph for a particular user or task.

Start here

Try it on a drawing of your own

Reading about this is one thing. Send one sheet and we will run it through our models and send back what they find, with an overlay you can hold against the original.
  • One sheet is enough — PDF, DXF or a scan
  • Back in about 2 business days, with an annotated overlay
  • No call required, NDA on request

Send us one sheet

We run it through our floor plan models and send back the extracted data with an annotated overlay, so you can see what comes off your own drawings before anyone books a call.

  • Back in about 2 business days
  • PDF, DXF or a scan
  • NDA on request

After your enquiry is sent, you’ll go to Calendly to choose a discovery-call time. Booking is optional.

This is our base model, before any tuning for you. On a paid project we train it further on your own drawings, which is where the rest of the accuracy comes from. So this shows you the starting point, not the best we can do.

By submitting, you agree to our Privacy Policy. We never share your details.

Get in touch

Tell us what is on your drawings

Describe the sheets you get and what you need off them. We will tell you what our models already handle, what needs fine-tuning on your drawings, and what is not worth automating at all.

Reply time
Within 1 business day

Would rather show than tell? Send one sheet for a free analysis

After your enquiry is sent, you’ll go to Calendly to choose a discovery-call time. Booking is optional.

We reply within 1 business day.

By submitting, you agree to our Privacy Policy. We never share your details.

Drawing intelligence

Let’s start with your drawing.

Where should we send the next step?