Roof JSON Parser

Parses roof data from JSON

JSON Masterplan (Beta) Nickname: Roof_Parser

Overview

Parses roof data from JSON

Inputs (7)

  • Roof_JSON (Text): JSON string containing roof data
  • Filter_Building (Text): Building names to filter
  • Filter_Tower (Text): Tower IDs to filter
  • Filter_Type (Text): Roof types to filter
  • Filter_Program (Text): Programs above to filter
  • Filter_Level (Integer): Levels to filter
  • ExactMatch (Boolean): Use exact matching

Outputs (5)

  • SlabBounds (Curve): Slab bounds curves
  • TowerBounds (Curve): Tower bounds curves
  • RoofAreas (Number): Roof areas
  • TrueZ (Number): True Z elevation
  • Labels (Text): Roof labels

Method, assumptions and simplifications

The same notes appear in the component's Info output.

Method

  1. Reads Roof_JSON (an object of buildings, each with a list of roofs) and keeps a roof only if it passes every filter that is not empty: Filter_Building, Filter_Tower, Filter_Type, Filter_Program (any program above) and Filter_Level (floor_index).
  2. Text filters are case-insensitive. Flexible mode matches when the name contains the filter text, or with * and ? wildcards; ExactMatch needs the whole name (still case-insensitive).
  3. For each roof it outputs slab and tower outlines rebuilt from Line, Arc and Polyline segments and moved up to true_z, plus roof_area, true_z and a label (building, tower, type, level). Branch paths are building index and roof index in the JSON, so they stay stable when filtering.

Assumptions

  • The JSON comes from JSON MP Engine V2 (Roof_JSON): outlines at Z = 0 and true_z in metres.

Simplifications and limits

  • Only the first joined curve of each outline is kept.

Workflow

  • JSON MP Engine V2 Roof_JSON -> Roof_JSON. SlabBounds and TowerBounds -> roof landscape, PV or amenity studies.