System Overview
BERA Tools is organized into clear layers:
beratools/modules: one folder per module (mapping,pc2products,raster2products, ...) with its tool entry points, their algorithms and itstools.json; the PC2Products LiDAR tools (rpy_*.py) call R processing inr_scripts_collection.rberatools/core: frame code: tool running, the tool registry and user-built pipelines (pipeline.py)beratools/cli: thebtcommandberatools/gui: desktop GUI and parameter widgetsberatools/utility: shared helpers (arguments, environment checks, spatial helpers)
Design principles
- Separation of concerns: tool wrappers stay lightweight; heavy logic stays in each module's
algo_*.pyfiles. - Single source of tool metadata: GUI and CLI parameter behavior derives from tool configuration.
- Consistent execution model: tools support CLI and GUI call modes with shared runtime behaviors.
Module responsibilities
modules/<module>/<tool>.py: validate/collect inputs, call the module's algorithms, write outputs.modules/<module>/algo_*.py: geometric/raster algorithms, optimization, line processing.modules/<module>/tools.json: the module's tools and their parameters, merged bycore/registry.py.modules/pc2products/rpy_*.py: validate inputs, check R packages, call the tool's R function through rpy2.modules/pc2products/r_interface.py,modules/pc2products/r_common.py: locate R and connect rpy2.core/tool_base.py: multiprocessing shared by the tools.core/pipeline.py: save, load, link and run pipelines of tool steps.cli/*: thebtsubcommands, built from tool metadata.gui/*: exposes tools and parameters for interactive use.
See also: Execution Pipeline