Skip to content
Developer reference7 min read

Floor Plan JSON Schema: Rooms, Openings and Adjacency

By Floor Plan Analyzer, an AxcelerateAI practice

A polygon array can draw a room on screen without telling your application which revision it came from, what its units mean or whether a nearby door connects to it. This reference proposes a small single-view contract and shows where additional validation belongs.

Two fictional rooms R1 and R2 connected through opening O1, with metre coordinates and source sheet A101
Original schematic of the downloadable example. Coordinates are stipulated in metres for a single plan view.

At a glance

A useful floor plan JSON model defines its coordinate frame, source evidence, stable room and opening IDs, and the relationships between them. Validate the JSON structure first, then validate references, geometry and connection semantics in the application before downstream use.

Download the illustrative JSON Schema

Choose the smallest contract your consumer can use

Start with the questions the consuming software asks. A listing application might need room labels and approximate layout. A navigation service needs verified traversable connections. An estimating workflow needs measurement rules and source-linked quantities. Agree on those meanings before choosing fields.

The downloadable schema is an illustrative Draft 2020-12 contract. It models one calibrated plan view in metres, room boundary polygons, opening spans and candidate or reviewed connections. It uses keyed objects for rooms and openings so each record has an explicit reference key. The companion sample contains two rooms and one door. Extend it deliberately for walls, floors, measurements or multiple coordinate frames.

References: Download the matching fictional JSON payload · JSON Schema Draft 2020-12 specification

Make coordinates unambiguous

The example uses a local origin with x increasing right and y increasing up. R1 occupies x = 0 to 3 and y = 0 to 4. R2 occupies x = 3 to 6 over the same height. Their boundary rings repeat the first point at the end. O1 spans from (3, 1) to (3, 2). These zero-thickness boundaries describe adjoining spaces; they do not model wall thickness or verified clear passage width.

A rendered PDF commonly uses a different coordinate convention. If extraction starts in crop pixels, retain the render size, crop offset and transformations that map those pixels into the selected plan frame. A schema containing metre coordinates does not establish that the source scale was correct. Keep calibration evidence and review it before emitting physical measurements.

For a multi-page job, add explicit frame IDs to geometry records and define transformations between frames. Never join rooms across levels using coordinate proximity alone. Keep the sheet label, zero-based PDF page index and view crop separate.

Use JSON Schema for structure and separate semantic checks

The schema declares required properties, numeric coordinate pairs and allowed status values. Internal references reuse definitions through $defs and $ref. additionalProperties is false on fixed records to catch misspelled fields. Room and opening collections allow arbitrary keys whose values must match their record definitions.

A $ref points to a schema definition. It does not verify that a string such as R1 exists in the payload’s rooms collection. In application code, build the room and opening ID sets, reject collisions with the reserved exterior ID and check every relationship. Then check ring closure, self-intersections, nonzero area and opening placement using geometry operations.

Validation should return a record path and reason, such as connections[0].opening_id referencing an absent opening. Preserve failed records with their evidence in an exception workflow and keep them out of accepted exports until resolved. Avoid repairing an invalid polygon by closing gaps without recorded evidence.

References: JSON Schema reusable definitions and references

Keep source evidence through revisions and migrations

Each sample room and opening carries sheet A101, revision 03, view main-plan and page_index 0. A production contract should add document identity or a content hash and evidence geometry or crop references. A source tag is useful evidence but may change between issues, so keep it separate from the application’s object identity.

A change in the schema version describes the data contract. A change in drawing revision describes the source. Track pipeline and mapping versions separately when reproducibility matters. Define whether an update replaces a complete snapshot or applies an explicit delta, and use stable request IDs so retries cannot duplicate objects.

Before releasing a new contract, test existing saved payloads and consumers. Adding a property to a closed record can break an older validator even if it appears additive. Keep the old version available or migrate stored records with a documented mapping, and compare geometry and references after migration.

Test a payload before integrating the extraction service

Validate the sample against the downloaded schema using a Draft 2020-12 validator. Then deliberately change a coordinate to a string, remove required source evidence and add an unexpected field. Those are structure failures. Change an endpoint to a nonexistent room and verify that your semantic checker catches it even though the JSON Schema accepts the string.

For the supplied rectangles, the shoelace area is 12 m² per room and O1 has a span length of 1 m. These are arithmetic checks on fictional coordinates. Add tests for reversed rings, crossing edges, zero-length spans, unknown endpoints and duplicated connection records as your supported scope grows.

Floor Plan Analyzer engineers extraction around the fields and workflow your software needs. Bring a sample drawing, target payload and consumer constraints so the data contract and acceptance checks can be agreed before integration.

Frequently asked questions

Is this a universal floor plan standard?

It is an illustrative single-view contract for an integration discussion. Map its coordinate and property meanings explicitly when exchanging data with BIM, GIS or another application.

Does a valid JSON payload prove the geometry is correct?

Structural validation checks declared types and constraints. Geometry, source scale, object references and intended relationships need additional checks.

Where is the API endpoint?

These downloads define a proposed output contract. A custom integration’s endpoint, authentication and request lifecycle are agreed for the project.

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?