Installation¶
OBIA is installed with pip. The core package includes the raster, vector, segmentation, and classification dependencies used by the standard OBIA workflow.
Requirements¶
OBIA requires Python 3.11 or newer.
Runtime dependencies are installed with the package, including:
rasteriogeopandasnumpyscikit-imagescikit-learn
For most users, installing from PyPI is the right starting point.
Install From PyPI¶
1 | |
Verify the install:
1 | |
Install With Point-Cloud Support¶
Point-cloud workflows need PDAL. Install PDAL in a conda environment first, then install OBIA with pip inside that environment:
1 2 3 | |
This gives OBIA access to the conda-forge PDAL Python bindings for LAS/LAZ reading.
If you also want the optional pyforestscan reader, install the point-cloud extra after activating the same environment:
1 | |
Optional Extras¶
Install documentation dependencies with:
1 | |
Install SHAP explanation dependencies with:
1 | |
Install experimental object-detection dependencies with:
1 | |
Docker¶
Build the image from the repository root:
1 | |
Release images are published to Docker Hub as iosefa/obia:
1 | |
The Docker image includes OBIA, PDAL, the PDAL Python bindings, and pyforestscan.
Start a Python session inside the image:
1 | |
Mount a local data directory when working with rasters, vectors, or point clouds:
1 2 3 | |
Developer Install¶
For local development, clone the repository and create the conda environment:
1 2 3 4 | |
The environment installs OBIA in editable mode and includes the documentation, point-cloud, detection, explanation, and test dependencies used during development.
If you already have a compatible environment and only want the editable package install:
1 | |
To include documentation and test dependencies in an existing environment:
1 | |
Preview The Documentation¶
Run the local documentation server from the repository root:
1 | |
Open http://127.0.0.1:8000 in a browser. If that port is already in use, choose another port:
1 | |
To build the static site:
1 | |
The generated HTML is written to site/.