integration — GeoJSON Processing
- Source:
buem/integration/
Purpose
Batch-process GeoJSON FeatureCollections through the thermal model and assemble structured result payloads.
GeoJsonProcessor
- File:
geojson_processor.py
Workflow:
Validate the incoming GeoJSON structure (features,
properties.buem).For each feature:
Extract
building_attributesfromproperties.buem.Merge with database attributes (if a
db_fetcheris provided) and ATTRIBUTE_SPECS defaults.Run
ModelBUEM.sim_model().Compute summary statistics (total kWh, peak kW).
Return a GeoJSON FeatureCollection with
thermal_load_profileappended to each feature’s properties.
Result caching is hash-based: identical building configurations reuse previously computed results when caching is enabled.
attribute_builder.py
Merges three attribute sources in priority order:
Feature payload
Database record
ATTRIBUTE_SPECSdefaults
send_geojson.py
Utility script for submitting a GeoJSON file to the API from the command line — useful during development and integration testing.
Schema CLI
schema_cli.py is a helper tool for versioning and validating BuEM
request/response JSON Schemas. Supports list-versions,
validate <file>, test-all, and import-version.