Skip to main content

BatchPlan: A large scale solution for floor plan extraction

Project description

BatchPlan

About

BatchPlan as a robust large-scale floor plan extraction tool designed to be highly customizable, extensible, and pluggable in various capacities. The design decisions are meticulously crafted, particularly for the processing of extensive BIM data stored in IFC files.

Installation

BatchPlan is dependent to pythonocc-core which is curretly only available as conda package. Thus we need to create a conda environment as follows:

First we need to copy environment.yml to your machine and run the following command to create the environment with needed dependencies:

conda env create -f environment.yml

Now we need to install BatchPlan. There is two ways:

  1. Building from source (recommended):
git clone https://github.com/byildiz/BatchPlan.git
cd BatchPlan
pip install .
  1. Installing with pip:
pip install BatchPlan

Usage

Extract Floor Plan

extract_floor_plans module is used to extract floor plans.

% python -m batchplan.extract_floor_plans --help
usage: extract_floor_plans.py [-h] [--output OUTPUT] [--use-storey] [--load-plugin] [--formatter FORMATTER] [--filter-fn FILTER_FN] [--filter FILTER] [--color-fn COLOR_FN] [--skip-colorless]
                              [--width WIDTH] [--height HEIGHT]
                              ifc_paths

positional arguments:
  ifc_paths

options:
  -h, --help            show this help message and exit
  --output OUTPUT       output directory
  --use-storey          use IfcBuildingStorey elements to infer floors
  --load-plugin         load plugin module (plugin.py)
  --formatter FORMATTER
                        selected formatters
  --filter-fn FILTER_FN
                        filter function for filter out elements
  --filter FILTER       filter string to filter aout elements using IfcOpenShell's builtin filtering feature
  --color-fn COLOR_FN   color function to determine elements' colors in floor plan
  --skip-colorless      skip elements if the color function doesn't return a color for an element
  --width WIDTH         floor plan width
  --height HEIGHT       floor plan height

Extract floor plans in PNG format

python -m batchplan.extract_floor_plans examples/data/Shependomlaan/IFC\ Schependomlaan.ifc --output output

After the above command successfully runs, an output directory will be created with the following structure and content:

output
└── IFC Schependomlaan
    ├── -1 fundering_3D.png
    ├── -1 fundering_floor_plan.png
    ├── 00 begane grond_3D.png
    ├── 00 begane grond_floor_plan.png
    ├── 01 eerste verdieping_3D.png
    ├── 01 eerste verdieping_floor_plan.png
    ├── 02 tweede verdieping_3D.png
    ├── 02 tweede verdieping_floor_plan.png
    ├── 03 derde verdieping_3D.png
    ├── 03 derde verdieping_floor_plan.png
    └── 3D.png

Extract floor plans in WTK format

python -m batchplan.extract_floor_plans examples/data/Shependomlaan/IFC\ Schependomlaan.ifc --formatter FloorWKTFormatter --output output

After the above command successfully runs, an output directory will be created with the following structure and content:

output
└── IFC Schependomlaan
    ├── -1 fundering.csv
    ├── 00 begane grond.csv
    ├── 01 eerste verdieping.csv
    ├── 02 tweede verdieping.csv
    ├── 03 derde verdieping.csv
    └── 3D.png

Mark Floors

mark_loors module is used to mark floors and save them in csv file.

% python -m batchplan.mark_floors --help
usage: mark_floors.py [-h] [--use-storeys] root

positional arguments:
  root

options:
  -h, --help     show this help message and exit
  --use-storeys  pre-fill floors using IfcBuildingStorey elements

Example usage:

python -m batchplan.mark_floors --use-storeys examples/data/Shependomlaan

If you run the above command, you will see a GUI like the one below:

mark_floors

Known Issues and Limitations

  • There is memory leakage which makes processing huge projects hard.
  • BatchPlan currently can't run on a machine without a GUI environment.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batchplan-0.1.2.tar.gz (9.4 MB view details)

Uploaded Source

Built Distributions

BatchPlan-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

BatchPlan-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (15.0 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

BatchPlan-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

Details for the file batchplan-0.1.2.tar.gz.

File metadata

  • Download URL: batchplan-0.1.2.tar.gz
  • Upload date:
  • Size: 9.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for batchplan-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2052ea4e7c0a8106ab4954e7b890dda1025c246298075d2e36cdd7c2b21e0c88
MD5 674824a2c3a7717e5ae2c4211f876fc5
BLAKE2b-256 e9a6f2340ba0899b6ec2adf0ccbd444570dd890929c980c8d0b52f283d8a0310

See more details on using hashes here.

File details

Details for the file BatchPlan-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for BatchPlan-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6bd1ccd88021b0d2241daf80119686f2972cc254cc34235880f9037235c6073
MD5 09ede5d24d6bf708b5213d2aa1c9ec24
BLAKE2b-256 a3be06458d6a1a535c6ae3a972e8e02556077ab6fbc1fc1436eff4f17ff35e3d

See more details on using hashes here.

File details

Details for the file BatchPlan-0.1.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for BatchPlan-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bcae0d685f6da14c42c71a4de37523a90dc219f108823512596cbfe4901e8d77
MD5 3b1c705fa12018717f64ce548987cb5f
BLAKE2b-256 a5bdfe1ff7128071dd4aa750df0ad5b0d28d6a27e6db0c1b8aa27eee6d719ccf

See more details on using hashes here.

File details

Details for the file BatchPlan-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for BatchPlan-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d91204d86beb6396ac0075e5b16bd9ad0d100810e3f95aedd439900dbdea2a3d
MD5 643387fef5669bcfa7ce13a81c13806d
BLAKE2b-256 f57c17a3622f746236d51db1a82ca3ab0b46e86ba02334caa996580640e63adc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page