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.

  • 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.0a4

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.0a4
File Size Uploaded Provenance Actions
plangeom-0.1.0a4.tar.gz 120.0 kB Without provenance Details for plangeom-0.1.0a4.tar.gz

Built distribution (wheel)

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

Total release size: 232.6 kB

Release files / plangeom-0.1.0a4.tar.gz

Download URL plangeom-0.1.0a4.tar.gz
Size 120.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7addcb81b95a90c32a4791b1949ea0c1d6738992c3d34e96f9d700e90b5ff4c1
BLAKE2b-256 checksum
How to use checksums
ec570233ecfcbd5532a0ca4cf4959c7f310d4b1b56a7c492a6cee1acb5e27610
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.0a4-py3-none-any.whl

Download URL plangeom-0.1.0a4-py3-none-any.whl
Size 112.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
279121d69e9ea036f2aae3bb3a0a6b7fb872c92da668f4235631b650c11a5373
BLAKE2b-256 checksum
How to use checksums
80d915c978c29467d9c9743026903e160f10fe903eb22629cce87b5422cb441b
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.0a4

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