=== versions === python 3.12.0 | numpy 2.5.4 | rasterio 1.5.2 | shapely 2.2.0 | manifold3d 3.5.5 | pyvista 0.49.2 === Step 1: Environment Agency LIDAR DTM and DSM at 1 m === DTM 1200 x 1200 cells | no-data 0 | 26.9 - 90.8 m DSM 1200 x 1200 cells | no-data 0 | 26.9 - 130.9 m DSM - DTM: median 2.93 m | 99th percentile 25.6 m | below -0.5 m: 0.02 % of cells === Step 2: OpenStreetMap building footprints === Overpass: 1,832 elements -> 1,814 footprints inside the model area (9 multipolygons) tagged: height 4 | building:levels 107 footprint area: total 28.6 ha | median 66 m2 === Step 3: a roof height for every building from the LIDAR === LIDAR roof heights for 1,800 buildings: median 8.6 m | 90th percentile 13.4 m | max 29.5 m too small to hold a 1 m cell: 5 | no roof in the LIDAR (< 2 m): 9 -> 3 m tallest: Durham Cathedral 29.5 m above ground (427,339 E 542,127 N) buildings with building:levels and a LIDAR height: 107 | LIDAR height per storey: median 3.74 m (interquartile 3.46 - 4.23 m) === Step 4: scale and printable footprints === terrain 600 x 600 cells of 2 m | scale 1:7,488 | cell 0.267 mm model 160.0 x 160.0 mm | terrain 3.0 - 11.5 mm high | 0.8 mm on the print = 6.0 m on the ground blocks after merging touching footprints: 689 printable: 1,329 of 1,814 buildings kept | footprint area 4,648 of 5,094 mm2 (91.2 %) === Step 5: flat-roofed blocks on the terrain === terrain 1,439,996 triangles | watertight True | oriented True | volume 152.54 cm3 flat city 1,465,354 triangles | watertight True | oriented True | volume 160.14 cm3 [1,333 prisms, booleans and checks: 1.6 s] === Step 6: roofs shaped by the LIDAR surface === city 1,709,826 triangles | watertight True | oriented True | volume 158.67 cm3 buildings 528,520 triangles | watertight True | oriented True | volume 6.13 cm3 [booleans and checks: 2.4 s] terrain + buildings = 158.669 cm3 | city = 158.669 cm3 | overlap between the two parts 0.0002 mm3 buildings part: 588 separate pieces | smallest 0.541 mm3 | largest 425.6 mm3 | top of the model 16.9 mm Durham Cathedral: flat roof 29.5 m | LIDAR roof up to 66.5 m above its median ground === Step 7: write STL and 3MF === durham_city_flat_roofs.stl 73.3 MB | 1,465,354 facets | 84 + 50 x facets = file size: True durham_city.stl 85.5 MB | 1,709,826 facets | 84 + 50 x facets = file size: True durham_terrain.stl 72.0 MB | 1,439,996 facets | 84 + 50 x facets = file size: True durham_buildings.stl 26.4 MB | 528,520 facets | 84 + 50 x facets = file size: True durham_two_colour.3mf 18.0 MB | parts: terrain, buildings === figures === wrote 01-building-heights, 02-lidar-vs-levels, 03-printable-footprints, 04-stl-preview-city, 05-stl-preview-roofs