Skip to content

Commit ebeb26c

Browse files
Olivier Bernardclaude
authored andcommitted
docs: Reorganize objects documentation into modular structure
Split monolithic objects.md into organized subdirectory with focused modules: - building.md, terrain.md, vegetation.md, structure.md, barrier.md, bridge.md, aeroway.md, water.md, landuse.md, generic.md - Updated cross-references in data-pipeline.md, contextual.md, elevation-sampler.md, README.md to point to new locations - Removed version numbers from tech stack links (use latest docs) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent e2a4056 commit ebeb26c

13 files changed

Lines changed: 698 additions & 733 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ The `docs/` directory contains 79 comprehensive files organized by topic:
222222

223223
- **[visualization/canvas-rendering.md](docs/visualization/canvas-rendering.md)** — Feature rasterization (9-layer painter's algorithm)
224224
- **[visualization/ground-surface.md](docs/visualization/ground-surface.md)** — Terrain mesh generation
225-
- **[visualization/objects.md](docs/visualization/objects.md)** — Buildings, structures, drone
225+
- **[visualization/objects/README.md](docs/visualization/objects/README.md)** — Buildings, structures, drone
226226

227227
### Reference
228228

docs/data-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ flowchart LR
284284
- **Contextual data details**: [`data/contextual.md`](data/contextual.md)
285285
- **Canvas rendering**: [`visualization/canvas-rendering.md`](visualization/canvas-rendering.md)
286286
- **Ground surface (terrain mesh)**: [`visualization/ground-surface.md`](visualization/ground-surface.md)
287-
- **3D objects**: [`visualization/objects.md`](visualization/objects.md)
287+
- **3D objects**: [`visualization/objects/README.md`](visualization/objects/README.md)
288288
- **Coordinate system**: [`coordinate-system.md`](coordinate-system.md) — geographic → Three.js local tangent plane math
289289
- **Tile ring system**: [`tile-ring-system.md`](tile-ring-system.md) — ring loading details
290290
- **Glossary**: [`glossary.md`](glossary.md)

docs/data/contextual.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ Nine categories of contextual features are parsed and rendered:
305305
For colors, widths, heights, and detailed rendering specs, see:
306306

307307
- **[Canvas Rendering](../visualization/canvas-rendering.md)** - layer ordering, colors, widths, dash patterns, drawing algorithms
308-
- **[3D Object Visualization](../visualization/objects.md)** - heights, shapes, geometry, materials, roof types
308+
- **[3D Object Visualization](../visualization/objects/README.md)** - heights, shapes, geometry, materials, roof types
309309

310310
## Graceful Degradation
311311

docs/data/elevation-sampler.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ matrix.setPosition(treeX, terrainY + trunkOffset, -treeY);
498498

499499
### Lifecycle Integration
500500

501-
ElevationSampler is initialized once at app startup and distributed to all mesh factories. It samples terrain elevation when creating 3D feature objects. For complete integration details, see **[3D Object Visualization](../visualization/objects.md#rendering-pipeline)** and **[Ground Surface Rendering](../visualization/ground-surface.md#integration-with-drone-system)**.
501+
ElevationSampler is initialized once at app startup and distributed to all mesh factories. It samples terrain elevation when creating 3D feature objects. For complete integration details, see **[3D Object Visualization](../visualization/objects/systems.md#rendering-pipeline)** and **[Ground Surface Rendering](../visualization/ground-surface.md#integration-with-drone-system)**.
502502

503503
### Coordinate System Consistency
504504

@@ -536,4 +536,4 @@ This ensures:
536536

537537
- **[Elevation Data System](./elevations.md)** — Terrarium format, tile loading, caching
538538
- **[Coordinate System](../coordinate-system.md)** — Complete coordinate transformation mapping
539-
- **[3D Object Visualization](../objects.md)** — How mesh factories use ElevationSampler
539+
- **[3D Object Visualization](../visualization/objects/README.md)** — How mesh factories use ElevationSampler

docs/visualization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
|------|-------------|
55
| [ground-surface.md](ground-surface.md) | Two-stage terrain: elevation geometry + contextual canvas texture |
66
| [canvas-rendering.md](canvas-rendering.md) | 9-layer painter's algorithm, feature rasterization to 2048×2048 |
7-
| [objects.md](objects.md) | 3D objects: buildings, vegetation, structures, barriers, bridges |
7+
| [objects/README.md](objects/README.md) | 3D objects: buildings, vegetation, structures, barriers, bridges |

docs/visualization/objects.md

Lines changed: 0 additions & 727 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 3D Object Visualization
2+
3+
## Overview
4+
5+
The simulator visualizes five categories of real-world objects extracted from Overture Maps data. Each type is rendered as 3D geometry in the Three.js scene using specialized mesh factories that transform geographic data into spatial meshes.
6+
7+
**Object Categories:**
8+
9+
1. **Buildings**: Extrusion-based 3D structures with parametric roofs (gabled, hipped, domed, etc.)
10+
2. **Vegetation**: Distributed trees, forests, shrubs, orchards, and vineyards using instanced mesh for efficiency
11+
3. **Structures**: Man-made objects like towers, chimneys, water towers, and cranes built from parametric shapes
12+
4. **Barriers**: Linear features like walls, hedges, and fences extruded along their paths
13+
5. **Bridges**: Elevated deck segments for roads and railways with layer-based height control
14+
15+
## Object Types
16+
17+
| File | Description |
18+
|------|-------------|
19+
| [buildings.md](buildings.md) | Walls, roofs (gabled, hipped, domed, pyramidal, etc.), material colors, height defaults |
20+
| [vegetation.md](vegetation.md) | Trees, forests, scrub, orchards, vineyards; instanced mesh optimization; per-tree sampling |
21+
| [structures.md](structures.md) | Towers, chimneys, cranes, water towers; parametric shapes; structure-specific materials |
22+
| [barriers.md](barriers.md) | Walls, hedges, fences; linear extrusion; segment-based elevation sampling |
23+
| [bridges.md](bridges.md) | Elevated decks; layer-based height control; road/rail deck width |
24+
25+
## Systems & Architecture
26+
27+
| File | Description |
28+
|------|-------------|
29+
| [systems.md](systems.md) | Rendering pipeline, spatial organization, tile ring system, performance optimization |
30+
31+
## See Also
32+
33+
- **[Data Pipeline](../../data-pipeline.md)** — Overview of feature extraction and mesh generation
34+
- **[Elevation Sampling & Interpolation](../data/elevation-sampler.md)** — Bilinear interpolation for terrain heights
35+
- **[Coordinate System & Rendering](../coordinate-system.md)** — Geographic to Three.js transformation
36+
- **[Glossary](../glossary.md)** — Technical terminology
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Barriers
2+
3+
## Visual Characteristics
4+
5+
Barriers appear as linear features running across the landscape. Walls are thin, tall, and rigid. Hedges are wider, lower, and green. Retaining walls are squat and sturdy. City walls are massive stone structures.
6+
7+
**Examples:**
8+
- Garden wall: 0.3m wide, 2m tall, beige (#c0b8b0)
9+
- Hedge: 1m wide, 1.5m tall, dark green (#4a7030)
10+
- City wall: 2m wide, 6m tall, stone (#c8c0b0)
11+
- Retaining wall: 0.5m wide, 1.5m tall, gray (#a8a098)
12+
13+
## Data Sources
14+
15+
Barriers identified by Overture fields:
16+
- `barrier=wall`, `city_wall`, `retaining_wall`, `fence`, `hedge`, `guardrail`
17+
- `height` tag (in meters)
18+
- `width` tag (in meters, defaults based on type)
19+
- `material` tag (brick, concrete, stone, wood, metal) — overrides type color
20+
- `colour` tag (explicit RGB override)
21+
22+
## Rendering Strategy
23+
24+
**Line Extrusion**: Each LineString segment is converted to a box mesh:
25+
26+
1. For each consecutive pair of coordinates in the LineString:
27+
- Compute segment midpoint and length
28+
- Calculate rotation angle to align with path
29+
- Create `BoxGeometry(width, height, segmentLength)`
30+
- Position at midpoint with appropriate rotation
31+
- Sample elevation at midpoint
32+
33+
2. **Rotation**: `rotation.y = -angle` where `angle = atan2(dx, dy)` aligns box along path
34+
35+
## Geometry Details
36+
37+
**Box Mesh per Segment:**
38+
- Dimensions: (width, height, length)
39+
- Width: configured per type or tag (0.3m wall, 1m hedge)
40+
- Height: configured per type or tag (2m wall, 1.5m hedge)
41+
- Length: segment length in Mercator coordinates
42+
- Material: `MeshLambertMaterial` with type or material-based color
43+
- Positioning: Centered at segment midpoint, terrain elevation + height/2
44+
45+
**Example (Garden Wall, 50m segment):**
46+
```
47+
BoxGeometry(0.3, 2.0, 50) // 0.3m thick, 2m tall, 50m long
48+
Position: (midX, terrainY + 1.0, -midY)
49+
Rotation.y: -angleToAlignWithPath
50+
Color: #c0b8b0
51+
```
52+
53+
## Configuration
54+
55+
| Barrier Type | Default Width | Default Height | Default Color |
56+
|---|---|---|---|
57+
| wall | 0.3m | 2.0m | #c0b8b0 |
58+
| city_wall | 2.0m | 6.0m | #c8c0b0 |
59+
| retaining_wall | 0.5m | 1.5m | #a8a098 |
60+
| hedge | 1.0m | 1.5m | #4a7030 |
61+
62+
**Material Color Overrides:**
63+
Same palette as buildings: brick (#c87060), concrete (#c8c4b8), stone (#b8b0a0), wood (#c8a878), metal (#888888), etc.
64+
65+
## Elevation Handling
66+
67+
- **Midpoint sampling**: Elevation sampled at segment midpoint
68+
- **Vertical positioning**: Height/2 above terrain, so base touches ground
69+
- **Slope following**: Each segment independently samples elevation, creating stepped appearance on steep terrain
70+
- **Precision**: Segments reconnect seamlessly across segment boundaries
71+
72+
## See Also
73+
74+
- **[Bridges](bridges.md)** — Linear elevated features
75+
- **[Structures](structures.md)** — Point-based objects
76+
- **[Systems](systems.md#spatial-organization)** — Coordinate system and spatial layout
77+
- **[Data Pipeline](../../data-pipeline.md)** — Feature extraction process
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Bridges
2+
3+
## Visual Characteristics
4+
5+
Bridges appear as elevated flat decks spanning roads and railways. They float above terrain, supported by layer height (vertical separation). Decks are proportionally wider than the underlying road/rail to show structural overhang.
6+
7+
**Examples:**
8+
- Highway overpass: wide gray deck (#b0a898) elevated 1 layer (5m) above road
9+
- Railway bridge: thinner deck elevated 2 layers (10m) above terrain
10+
- Pedestrian bridge: narrow deck at 1 layer height
11+
12+
## Data Sources
13+
14+
Bridges identified by Overture fields:
15+
- `bridge=yes` on `highway=*` or `railway=*` features
16+
- `layer=N` (integer, default 1) — vertical separation in multiples of 5m per layer
17+
- `width` tag for road width, default rail width from `railway=*` type
18+
- Deck margin: automatically adds 2m on each side of road/rail width
19+
20+
## Rendering Strategy
21+
22+
**Deck Extrusion**: Similar to barriers but simpler — just a flat box at elevated height:
23+
24+
1. For each consecutive pair of coordinates in LineString:
25+
- Compute midpoint and length
26+
- Calculate rotation angle
27+
- Create flat `BoxGeometry(deckWidth, DECK_THICKNESS, segmentLength)` where:
28+
- deckWidth = road/rail width + 4m (2m margin per side)
29+
- DECK_THICKNESS = 0.5m
30+
- Position at terrain elevation + layer × 5m
31+
32+
## Geometry Details
33+
34+
**Deck Mesh per Segment:**
35+
- Dimensions: (width, 0.5m thickness, length)
36+
- Width = vehicle width + 4m (represents deck overhang)
37+
- Motorway (25m): deck 29m
38+
- Railway (4m): deck 8m
39+
- Footway (2m): deck 6m
40+
- Material: Tan/beige Lambert (#b0a898)
41+
- Positioning: Centered at midpoint, terrain elevation + layer height offset
42+
43+
**Layer Height Calculation:**
44+
```
45+
verticalOffset = layer × 5m
46+
Examples:
47+
layer=1: 5m above terrain
48+
layer=2: 10m above terrain
49+
layer=-1: 5m below terrain (underpass)
50+
```
51+
52+
## Configuration
53+
54+
| Parameter | Value |
55+
|---|---|
56+
| Deck color | #b0a898 (tan, resembles concrete) |
57+
| Deck thickness | 0.5m |
58+
| Deck margin | 2m on each side (total +4m to road width) |
59+
| Layer height multiplier | 5m per layer unit |
60+
| Default layer | 1 (if not specified) |
61+
62+
## Elevation Handling
63+
64+
- **Base elevation**: Sampled at segment midpoint (same as road/rail below)
65+
- **Vertical offset**: Added to base elevation based on layer tag
66+
- **No tilt**: Deck remains horizontal even on slopes (realistic for bridge engineering)
67+
- **Precision**: Each segment samples independently
68+
69+
## See Also
70+
71+
- **[Barriers](barriers.md)** — Linear ground-level features
72+
- **[Systems](systems.md#spatial-organization)** — Coordinate system and spatial layout
73+
- **[Data Pipeline](../../data-pipeline.md)** — Feature extraction process

0 commit comments

Comments
 (0)