citygml_synthetic — DRIVE japan op

• Data kinds: none → any (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.citygml_synthetic(n: 'int' = 4, *, origin: 'tuple[float, float]' = (35.6716, 139.765), spacing: 'float' = 30.0, size: 'float' = 12.0, heights: 'Sequence[float] | None' = None, ground_z: 'float' = 0.0, omit_measured_height: 'Iterable[int]' = (), use_lod0_footprint: 'bool' = False, ns_building: 'str' = 'http://www.opengis.net/citygml/building/2.0') -> 'str' (to call the implementation directly, import driveplateau; driveplateau.citygml_synthetic(n: 'int' = 4, *, origin: 'tuple[float, float]' = (35.6716, 139.765), spacing: 'float' = 30.0, size: 'float' = 12.0, heights: 'Sequence[float] | None' = None, ground_z: 'float' = 0.0, omit_measured_height: 'Iterable[int]' = (), use_lod0_footprint: 'bool' = False, ns_building: 'str' = 'http://www.opengis.net/citygml/building/2.0') -> 'str'; from the registry, opsdrive.get("citygml_synthetic"))

Usage

Creates a minimal CityGML 2.0 string with the same structure as the real thing (for tests and demos).

Buildings are squares of size [m] placed along x at spacing [m] intervals, and for each building bldg:measuredHeight and bldg:lod1Solid > gml:Solid > gml:exterior > gml:CompositeSurface > gml:surfaceMember × 6 > gml:Polygon > gml:exterior > gml:LinearRing > gml:posList (bottom + 4 sides + top, in lat lon alt order) are written. The equirectangular approximation is linear, so a square made in local coordinates has area equal to size² when read back.

Args:

n: number of buildings (≥ 0).

origin: (lat, lon) [deg] of the centre of building 0.

spacing: spacing of building centres [m].

size: side of the square [m].

heights: height of each building [m]. If None, 10 + 5*i.

ground_z: elevation of the bottom face [m].

omit_measured_height: do not write measuredHeight for buildings at these indices.

use_lod0_footprint: if True, also write lod0FootPrint (bottom face only) before lod1Solid.

ns_building: bldg namespace URI (can be swapped for tests of other versions).

Returns:

A CityGML string that can be written out as UTF-8.

Raises:

ValueError: n negative, size/spacing non-positive, heights length mismatch or non-positive.

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

• poc_driving_japan_town — py -3.11 examples/poc_driving_japan_town.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.