Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

plangeom

Reads construction floor plans from vector PDFs by geometry alone and writes a checked JSON description. No model training.

pip install plangeom
plangeom plan.pdf --page 0 --summary -o sheet.json

--summary prints the short answer: scale, rooms by type, wet rooms with their fixtures, doors, windows, stairs, risers, and doubts, what not to take on trust, item by item. The full description goes to the file.

from plangeom import parse_page
sheet = parse_page("plan.pdf", 0)
print(sheet["summary"])

For AI agents

plangeom --guide says how to use it and how far to trust it; help(plangeom) is the same text. plangeom --fields gives the meaning of every field. Importing the library shows nothing by itself. To change the library, not only use it: plangeom-dev get plangeom_code, then AGENTS.md in that folder.

  • Start from summary. The full JSON is hundreds of kilobytes: filter it, do not print it.
  • verdict: accepted means the geometric checks passed, not that fixtures and room types are complete. Pass summary.doubts on to your reader.
  • Drain routes, extract points, heaters: plangeom.mep.plan_services(sheet), planning defaults, not a design.

A whole set of drawings, one PDF or several volumes of a project:

plangeom ar.pdf kr.pdf --all --summary -o building.json
from plangeom import parse_document
result = parse_document(["ar.pdf", "kr.pdf"], workers=4)
print(result["summary"])

What it does

  • Scale from the axis grid. Axes are found as circles of paper-fixed size with a long line through the centre. Values printed between axes give millimetres. With no text, axis spacing as multiples of a building module does, with door leaves and round wall thickness settling the harmonic.
  • Walls from filled bodies, thickness from opposite edges, centrelines from parallel edge pairs.
  • Materials as clusters of hatch geometry, without reading colour. Clusters have no names until a legend or a person names them.
  • Doors as a circular arc plus a radial leaf. The sweep angle is deliberately not a criterion.
  • Rooms as exact planar faces where walls close them, a watershed from room tags where they do not, and a clearance watershed when the sheet has no text.
  • Repeated symbols by D2 shape distribution and size, confirmed by modified Hausdorff distance.
  • Windows and openings as gaps between wall ends, in a belt along the slab edge, looking out.
  • Stairs as rows of treads, drawn or painted, with flights, landings and the hole in the slab.
  • Fixtures and cars by real sizes and shape; a room's type from its name or from what stands in it.
  • Whole sets. Stamps give the section, floor, typical floors and level. Sheets on one axis grid under one name are one building; risers, stair wells and lifts run through its floors, and what a floor could not read is taken from the floors around it and marked as taken. Structural sheets judge the wall roles of architectural ones.

Sections of the documentation

A sheet goes to the reader of its section by the code on its stamp. core is shared by all. ar (architecture) is working. kr, ov, vk and eo are placeholders: axes, scale, stamp and wall bodies are read, the section's own elements are not, and summary.reader says so. To work on a section with no accounts and no version control: plangeom-dev, see CONTRIBUTING.md.

It does not guess silently

Every stroke ends in one row of a ledger. Whatever no rule owns goes to queue. Checks come from the sheet itself: printed values against axes, room areas against the schedule, thickness and door plausibility. A sheet that fails any of them gets "verdict": "needs_review".

Status: alpha

Tested on synthetic drawings in tests/, and by hand on a private corpus of real sheets. Known limits today:

  • Most real sheets end as needs_review: read them with their checks, not as finished models.
  • Room areas agree with schedules at a median error of 4 to 9 % on real projects, and much worse on garages.
  • Stamps are read in Russian.
  • The scale from axes without text can land on a harmonic of the true scale.
  • Scanned pages are not handled: a page with no vector strokes returns not_a_vector_drawing.
  • The plan for services in plangeom.mep is a first pass with planning defaults, not a design.

Output

JSON Schema with the meaning of every field: plangeom.schema.SCHEMA. Lengths are millimetres in a sheet frame with y down.

License

No license has been granted yet: all rights reserved.

Metadata

Release files for plangeom 0.1.0a6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plangeom 0.1.0a6
File Size Uploaded Provenance Actions
plangeom-0.1.0a6.tar.gz 121.9 kB Without provenance Details for plangeom-0.1.0a6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plangeom 0.1.0a6
File Interpreter ABI Platform Actions
plangeom-0.1.0a6-py3-none-any.whl Python 3 none any Details for plangeom-0.1.0a6-py3-none-any.whl

Total release size: 234.8 kB

Release files / plangeom-0.1.0a6.tar.gz

Download URL plangeom-0.1.0a6.tar.gz
Size 121.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e0b81cfec797042f10a3f8e1a01ed71fea22a6f0669069436d845e0060c07140
BLAKE2b-256 checksum
How to use checksums
f31110ac9bf8558c9d468e2f91b8540148fe039997ea7b747906def144b0318f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / plangeom-0.1.0a6-py3-none-any.whl

Download URL plangeom-0.1.0a6-py3-none-any.whl
Size 112.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8abce2194c4b4b02adb6910c87d96a16d880d1f8c8e326791fe42d46674d1f6f
BLAKE2b-256 checksum
How to use checksums
bc76eee391925982ef0869538c9abdd887d168dd1f4dd9f10d80e3cb580a5a99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for plangeom 0.1.0a6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page