building_prisms — DRIVE japan op

• Data kinds: any → any

• Call: import fullseye as fs; fs.ledger.building_prisms(buildings: 'Iterable[dict[str, Any]]', *, color_fn: 'Callable[[dict[str, Any]], Sequence[float]] | None' = None, base_z: 'float | None' = 0.0, roof_shade: 'float' = 0.92) -> 'tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]' (to call the implementation directly, import driveplateau; driveplateau.building_prisms(buildings: 'Iterable[dict[str, Any]]', *, color_fn: 'Callable[[dict[str, Any]], Sequence[float]] | None' = None, base_z: 'float | None' = 0.0, roof_shade: 'float' = 0.92) -> 'tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]'; from the registry, opsdrive.get("building_prisms"))

Usage

Extrudes building footprints up to their heights and merges them into one triangle mesh.

Args:

buildings: the plateau_parse of buildings (footprint, height, ground_z).

color_fn: building -> (r,g,b) 0..1. If None, _default_building_color.

base_z: bottom z of all buildings [m]. If None, each building's ground_z is used (for worlds with relief).

0.0 suits a home-made flat road world.

roof_shade: colour multiplier for roof faces (a modest shade to tell them apart from the sides).

Returns:

(V (n,3) float64, F (m,3) int64, colors (m,3) float64 0..1, ids (m,) int64). ids[f] is the number of the building that face f belongs to (index into the input sequence). With 0 buildings each array is empty.

Raises:

ValueError: the return value of color_fn is not an RGB triple in 0..1, or a building's footprint/height is invalid.

Empty input (buildings with 0 entries) returns an empty result (reason: tiles with 0 buildings are common in real data. An empty set of prisms is the correct answer).

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• gallery_drive_city_terrain — py -3.11 examples/gallery_drive_city_terrain.py

Ops the type connects to (they accept any as input)

course_crank · course_s_curve · course_turnaround · course_slope · course_intersection · course_parallel_parking · course_crossing · course_road

Same category (japan)

osm_synthetic · osm_parse · osm_road_graph · osm_road_mask · osm_road_loops · osm_route · japan_world · japan_stats


*Provenance: driveplateau.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.