japan op• Data kinds: any → table
• Call: import fullseye as fs; fs.ledger.plateau_lod2_mesh(source: 'str | Path | bytes', *, origin: 'tuple[float, float, float] | None' = None, ids: 'Iterable[str] | None' = None, bbox_latlon: 'tuple[float, float, float, float] | None' = None, on_bad_polygon: 'str' = 'raise') -> 'dict[str, Any]' (to call the implementation directly, import driveplateau; driveplateau.plateau_lod2_mesh(source: 'str | Path | bytes', *, origin: 'tuple[float, float, float] | None' = None, ids: 'Iterable[str] | None' = None, bbox_latlon: 'tuple[float, float, float, float] | None' = None, on_bad_polygon: 'str' = 'raise') -> 'dict[str, Any]'; from the registry, opsdrive.get("plateau_lod2_mesh"))
• GPU: none (CPU reference implementation only)
Reads LOD2 buildings from PLATEAU CityGML and returns a triangle mesh (V, F) in local metric coordinates together with per-building attributes.
Streams bldg:Building with iterparse and treats the building body and each bldg:BuildingPart as one part (unit). Faces come from the lod2MultiSurface of the thematic surfaces (GroundSurface / WallSurface / RoofSurface / OuterCeilingSurface / OuterFloorSurface / ClosureSurface) and the surface type is kept in face_kind. Every face that lod2Solid references by xlink:href must be found. Holes (gml:interior) are bridged to the outer ring and ear-clipped; triangles keep the orientation of the original ring (outward normals).
Coordinates are moved exactly from EPSG:6697 (JGD2011 latitude, longitude, height) through GRS80 Earth-centred Cartesian coordinates into the ENU frame of the tangent plane at the origin (x east, y north, z up, metres). The default origin is the
ground centroid: the mean latitude/longitude of the GroundSurface vertices and their lowest height (all vertices if there is no ground).
fail-closed: an srsName other than 6697, an srsDimension other than 3, an unknown gml element in the LOD2 geometry (Triangle, OrientableSurface, pos point lists, ...), a thematic surface not in the table, an unresolved xlink and a measuredHeight unit other than m raise ValueError instead of being skipped.
Args:
source: CityGML text (starting with <), bytes, or a file path (str/Path).
origin: origin of the local frame (lat0 [deg], lon0 [deg], h0 [m]). If None, the ground centroid.
ids: gml:id of the buildings to read (the id of bldg:Building). If None, all.
bbox_latlon: (lat_min, lon_min, lat_max, lon_max). Keep only the parts whose mean vertex falls in this box.
on_bad_polygon: what to do with a Polygon that cannot be triangulated (zero area, self-intersection). "raise" (default) or
"skip" (counted in n_bad_polygons).
Returns:
{"V": (n,3) float64 [m], "F": (m,3) int64, "face_unit": (m,) int64, "face_kind": (m,) int8, "kinds": LOD2_KINDS, "units": [...], "origin": (lat0, lon0, h0), "crs": str, "n_buildings": int, "n_no_lod2": int, "n_bad_polygons": int, "max_nonplanarity_m": float}.
units[i] is {"building_id", "part", "gml_id", "measured_height", "attrs", "z_min", "z_max", "ground_z", "height_mesh", "extent_xy", "lat", "lon", "n_faces"}. height_mesh is
z_max − ground_z (the value to compare with measuredHeight); extent_xy is the ENU (x width, y width) [m].
Raises:
ValueError: the fail-closed conditions above, an empty or invalid source, broken XML, no matching part,
an unknown on_bad_polygon, or an invalid origin / bbox_latlon.
Examples:
>>> import driveplateau as PL
>>> m = PL.plateau_lod2_mesh(PL._citygml_lod2_example())
>>> [round(u["height_mesh"], 3) for u in m["units"]]
[12.0, 4.0]
>>> m["V"].shape[1], m["F"].shape[1], sorted(set(m["face_kind"].tolist()))
(3, 3, [0, 1, 2])
• 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.
• poc_plateau_venue_lod2 — py -3.11 examples/poc_plateau_venue_lod2.py
table as input)course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same
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.