Save 37% off PRO during our Black Friday Sale! »

Improving the usability of 3D city models

9c7f843b850f4e4beeb53c93893c4ff0?s=47 Hugo Ledoux
January 22, 2019

Improving the usability of 3D city models

Presented at the Universität Münster GI-Forum (https://www.uni-muenster.de/Geoinformatics/en/GI-Forum/index.php)

9c7f843b850f4e4beeb53c93893c4ff0?s=128

Hugo Ledoux

January 22, 2019
Tweet

Transcript

  1. Improving the usability of 3D city models Hugo Ledoux GI-Forum,

    Münster 2019-01-22
  2. 2

  3. 3D geoinformation group, TU Delft 3

  4. We develop, design, and implement 3D GIS solutions 4

  5. More and more 3D (open) data from cities 5 Whole

    North Rhine-Westphalia: 10M+ LoD2 buildings
  6. More and more 3D (open) data from cities 6 New

    York City
  7. More and more 3D (open) data from cities 7 Helsinki:

    with textures
  8. More and more 3D (open) data from cities 8 Whole

    of the Netherlands: 10M+ LoD1 buildings + terrain, roads, forest
  9. 9 solar potential shadow analysis noise modelling energy estimation bomb

    detonation wind turbulence pollutant tracking
  10. 3D in the mainstream: NY Times shadow analysis 10 https://www.nytimes.com/interactive/2016/12/21/upshot/Mapping-the-Shadows-of-New-York-City.html

  11. BUT

  12. 1. CityGML hinders the processing of 3D data about cities

    2. Most 3D datasets are rigged with errors 2 major problems:
  13. 13 int’l standard (from OGC) for representing and storing 3D

    city models
  14. CityGML files are very complex 14 • files are deeply

    nested, and large • no parsers in JavaScript • few software packages use CityGML • many diff ways to do one thing • I personally get each time I get a new file
  15. 15 Data model a GML encoding 2 encodings

  16. CityJSON 16

  17. v0.8 released 17 1. "Building" 2. "BuildingPart" 3. "BuildingInstallation" 4.

    "Road" 5. "Railway" 6. "TransportSquare" 7. "TINRelief" 8. "WaterBody" 9. "PlantCover" 10. "SolitaryVegetationObject" 11. "LandUse" 12. "CityFurniture" 13. "GenericCityObject" 14. "Bridge" 15. "BridgePart" 16. "BridgeInstallation" 17. "BridgeConstructionElement" 18. "Tunnel" 19. "TunnelPart" 20. “TunnelInstallation” 21. “CityObjectGroup” • all modules mapped " • software for full conversion CityGML <-> CityJSON • software to visualise (azul) and to manipulate (cjio)
  18. Same information as CityGML, but in JSON format 18 {

    "type": “CityJSON", "version": “0.8”, "metadata": { "referenceSystem": "urn:ogc:def:crs:EPSG::7415", }, "CityObjects": { "id-1": { "type": "Building", "attributes": { "measuredHeight": 22.3, "roofType": "gable", "owner": “Elvis Presley" }, "geometry": [ { "type": "MultiSurface", "boundaries": [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]] ] } ] } }, "vertices": [ [23.1, 2321.2, 11.0], [111.1, 321.1, 12.0], ... ], "appearance": { "materials": [], "textures":[], "vertices-texture": [] } }
  19. A CityJSON file 19 version CityJSON { "type": “CityJSON", "version":

    “0.8”, "metadata": { "referenceSystem": "urn:ogc:def:crs:EPSG::7415", }, "CityObjects": { "id-1": { "type": "Building", "attributes": { "measuredHeight": 22.3, "roofType": "gable", "owner": “Elvis Presley" }, "geometry": [ { "type": "MultiSurface", "boundaries": [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]] ] } ] } }, "vertices": [ [23.1, 2321.2, 11.0], [111.1, 321.1, 12.0], ... ], "appearance": { "materials": [], "textures":[], "vertices-texture": [] } }
  20. A CityJSON file 20 metadata, ISO19115 “compliant” CityGML has no

    mechanism in v2.0 but we thought it’s important ALL geometries have the same CRS, unlike CityGML { "type": “CityJSON", "version": “0.8”, "metadata": { "referenceSystem": "urn:ogc:def:crs:EPSG::7415", }, "CityObjects": { "id-1": { "type": "Building", "attributes": { "measuredHeight": 22.3, "roofType": "gable", "owner": “Elvis Presley" }, "geometry": [ { "type": "MultiSurface", "boundaries": [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]] ] } ] } }, "vertices": [ [23.1, 2321.2, 11.0], [111.1, 321.1, 12.0], ... ], "appearance": { "materials": [], "textures":[], "vertices-texture": [] } }
  21. A CityJSON file 21 All City Objects listed here, indexed

    by their ID Each have geometries + attributes { "type": “CityJSON", "version": “0.8”, "metadata": { "referenceSystem": "urn:ogc:def:crs:EPSG::7415", }, "CityObjects": { "id-1": { "type": "Building", "attributes": { "measuredHeight": 22.3, "roofType": "gable", "owner": “Elvis Presley" }, "geometry": [ { "type": "MultiSurface", "boundaries": [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]] ] } ] } }, "vertices": [ [23.1, 2321.2, 11.0], [111.1, 321.1, 12.0], ... ], "appearance": { "materials": [], "textures":[], "vertices-texture": [] } }
  22. A CityJSON file 22 Geometry is ID of the vertex,

    global list compression + more “topology” { "type": “CityJSON", "version": “0.8”, "metadata": { "referenceSystem": "urn:ogc:def:crs:EPSG::7415", }, "CityObjects": { "id-1": { "type": "Building", "attributes": { "measuredHeight": 22.3, "roofType": "gable", "owner": “Elvis Presley" }, "geometry": [ { "type": "MultiSurface", "boundaries": [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]] ] } ] } }, "vertices": [ [23.1, 2321.2, 11.0], [111.1, 321.1, 12.0], ... ], "appearance": { "materials": [], "textures":[], "vertices-texture": [] } }
  23. A CityJSON file 23 material + texture possible { "type":

    “CityJSON", "version": “0.8”, "metadata": { "referenceSystem": "urn:ogc:def:crs:EPSG::7415", }, "CityObjects": { "id-1": { "type": "Building", "attributes": { "measuredHeight": 22.3, "roofType": "gable", "owner": “Elvis Presley" }, "geometry": [ { "type": "MultiSurface", "boundaries": [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]] ] } ] } }, "vertices": [ [23.1, 2321.2, 11.0], [111.1, 321.1, 12.0], ... ], "appearance": { "materials": [], "textures":[], "vertices-texture": [] } }
  24. BuildingParts: links between City Objects 24 "CityObjects": { "id-1": {

    "type": "Building", "attributes": { "roofType": "gable" }, "children": ["id-56", “id-832”, “mybalcony”] }, "id-56": { "type": “BuildingPart", "parent": “id-1", ... }, "mybalcony": { "type": "BuildingInstallation", "parent": “id-1”, ... } }
  25. BuildingParts: links between City Objects 25 "CityObjects": { "id-1": {

    "type": "Building", "attributes": { "roofType": "gable" }, "children": ["id-56", “id-832”, “mybalcony”] }, "id-56": { "type": “BuildingPart", "parent": “id-1", ... }, "mybalcony": { "type": "BuildingInstallation", "parent": “id-1”, ... } } goal == a flat schema
  26. CityJSON software? We have that.

  27. Python parser is simple 27 import json fin = open('mycity.json')

    cm = json.loads(fin.read()) print "There are", len(cm['CityObjects']), "CityObjects" # list all ids for id in cm['CityObjects']: print "\t", id
  28. citygml4j 28 full conversion CityGML <-> CityJSON

  29. Compression factor == ~7X 29 Compression (v0.6) file CityGML size

    (original) CityGML size (w/o spaces) textures? CityJSON CityJSON compressed compression factor CityGML demo "GeoRes" 4.3MB 4.1MB yes 582KB 524KB 8.0 CityGML v2 demo "Railway" 45MB 34MB yes 4.5MB 4.3MB 8.1 Den Haag "tile 01" 23MB 18MB no, material 3.1MB 2.9MB 6.2 Montréal VM05 56MB 42MB yes 5.7MB 5.4MB 7.8 New York LoD2 (DA13) 590MB 574MB no 110MB 105MB 5.5 Rotterdam Delfshaven 16MB 15MB yes 2.8MB 2.6MB 5.4 Vienna 37MB 36MB no 5.6MB 5.3MB 6.8 5
  30. cjio (CityJSON/io) 30

  31. cjio (CityJSON/io) 31 $ cjio myfile.json assign_epsg 7415 subset -cotype

    Buidling compress save out.json
  32. None
  33. 2. Most (3D) datasets are rigged with errors

  34. Fact: 2D real-world data are rarely valid 34 Validation of

    a polygon = a solved problem OGC Simple Features and ISO19107 rules: 1 no self-intersection 2 closed boundaries 3 rings can touch but not overlap 4 no duplicate points 5 no dangling edges 6 connected interior 7 etc p2 p4 p5 p6 p7 p8 p9 p3 p12 p11 p10 p1 exterior boundary interior boundary 8 / 26
  35. Can get out of hand quickly… 35 148,612 vertices 5,132

    interior rings
  36. We have developed 2 packages to auto-repair in 2D 36

    prepair pprepair
  37. Automatic repairin With my colleague John Z of the most

    common err Another fact: 3D datasets are never valid 37
  38. Many apps need *perfect* input data 38 Figure from CADFEM.de

    CFD = computational fluid dynamics
  39. We tested all freely available 3D datasets 39 • No

    CityGML dataset is 100% valid, not even LoD1 • Many simple errors, eg: • repeated vertices • non-planar polygons (most common error!) • Notice that these are often not visible
  40. 3D validation: own tool ‘val3dity’ 37 CityGML datasets from 9

    countries 40 million polygons in 3.6 million buildings (Solids + MultiSurfaces) our software: val3dity 40
  41. Error codes 41 LinearRing Polygon Point MultiSurface CompositeSurface MultiSolid CompositeSolid

    Solid CompositeSolid Solid & MultiSolid CompositeSurface MultiSurface LinearRing level 101 TOO_FEW_POINTS 102 CONSECUTIVE_POINTS_SAME 103 RING_NOT_CLOSED 104 RING_SELF_INTERSECTION Polygon level 201 INTERSECTION_RINGS 202 DUPLICATED_RINGS 203 NON_PLANAR_POLYGON_DISTANCE_PLANE 204 NON_PLANAR_POLYGON_NORMALS_DEVIATION 205 POLYGON_INTERIOR_DISCONNECTED 206 INNER_RING_OUTSIDE 207 INNER_RINGS_NESTED 208 ORIENTATION_RINGS_SAME Shell level 301 TOO_FEW_POLYGONS 302 SHELL_NOT_CLOSED 303 NON_MANIFOLD_CASE 305 MULTIPLE_CONNECTED_COMPONENTS 306 SHELL_SELF_INTERSECTION 307 POLYGON_WRONG_ORIENTATION Solid level 401 INTERSECTION_SHELLS 402 DUPLICATED_SHELLS 403 INNER_SHELL_OUTSIDE 404 SOLID_INTERIOR_DISCONNECTED 405 WRONG_ORIENTATION_SHELL Solid interactions level 501 INTERSECTION_SOLIDS 502 DUPLICATED_SOLIDS 503 DISCONNECTED_SOLIDS these 2 not possible for CompositeSurface
  42. ISO19107 for 3D primitives 42 s1 s2 s3 s4 invalid

    invalid valid valid s9 s10 s11 s12 invalid invalid valid invalid s5 s6 s7 s8 invalid invalid invalid valid
  43. Level of detail Primitive ID(a) Geometric validation Semantics(f) Schema 1xx

    2xx 3xx 4xx Total(b) LOD1 Solid 1 0 0 0 0 0 – 7 2 0 0 0 0 0 – 3 3 0 0 0 0 0 – 3 4 0 0 0 0 0 – 3 5 0 0 0 0 0 – 7 6 0 0 0 0 0 – 7 7 0 0 0 0 0 – 3 8 0 0 0 0 0 – 3 9 0 0 0 0 0 – 7 LOD2 MultiSurface 10 1 4 – – 5 (e) 3 11 0 0 – – 0 0 3 12 2 21 – – 23 45 3 13 10 2 – – 12 4 7 14 0 1 – – 1 12 3 15 0 9 – – 9 2 3 16 4 8 – – 12 1 7 17 5 0 – – 5 5 7 18 0 0 – – 0 4 7 19 0 0 – – 0 1 7 20 0 4 – – 4 6 7 21 0 1 – – 1 3 7 LOD2 Solid 22 0 42 58 0 100 – 3 23(c) – – – – – – 7 24 0 31 1 3 35 – 7 25 4 0 16 2 22 – 3 26(c) – – – – – – 7 27 22 17 50 0 89 – 3 LOD2 MultiSurface and Solid (d) 28 0 42 1 1 44 0 3 29 2 35 54 0 92 4 3 30 0 10 0 1 11 2 3 31 0 0 0 0 0 0 3 LOD3 MultiSurface 32 2 13 – – 15 54 3 33 6 5 – – 11 23 3 34 8 10 – – 19 45 3 35 5 0 – – 5 34 3 36 0 0 – – 0 1 7 LOD4 Solid 37 0 0 3 0 3 68 3 (a) % of invalid actually all between 99.5% and 99.9%
  44. Level of detail Primitive ID(a) Geometric validation Semantics(f) Schema 1xx

    2xx 3xx 4xx Total(b) LOD1 Solid 1 0 0 0 0 0 – 7 2 0 0 0 0 0 – 3 3 0 0 0 0 0 – 3 4 0 0 0 0 0 – 3 5 0 0 0 0 0 – 7 6 0 0 0 0 0 – 7 7 0 0 0 0 0 – 3 8 0 0 0 0 0 – 3 9 0 0 0 0 0 – 7 LOD2 MultiSurface 10 1 4 – – 5 (e) 3 11 0 0 – – 0 0 3 12 2 21 – – 23 45 3 13 10 2 – – 12 4 7 14 0 1 – – 1 12 3 15 0 9 – – 9 2 3 16 4 8 – – 12 1 7 17 5 0 – – 5 5 7 18 0 0 – – 0 4 7 19 0 0 – – 0 1 7 20 0 4 – – 4 6 7 21 0 1 – – 1 3 7 LOD2 Solid 22 0 42 58 0 100 – 3 23(c) – – – – – – 7 24 0 31 1 3 35 – 7 25 4 0 16 2 22 – 3 26(c) – – – – – – 7 27 22 17 50 0 89 – 3 LOD2 MultiSurface and Solid (d) 28 0 42 1 1 44 0 3 29 2 35 54 0 92 4 3 30 0 10 0 1 11 2 3 31 0 0 0 0 0 0 3 LOD3 MultiSurface 32 2 13 – – 15 54 3 33 6 5 – – 11 23 3 34 8 10 – – 19 45 3 35 5 0 – – 5 34 3 36 0 0 – – 0 1 7 LOD4 Solid 37 0 0 3 0 3 68 3 (a) % of invalid rather good, but it’s “easy”
  45. Level of detail Primitive ID(a) Geometric validation Semantics(f) Schema 1xx

    2xx 3xx 4xx Total(b) LOD1 Solid 1 0 0 0 0 0 – 7 2 0 0 0 0 0 – 3 3 0 0 0 0 0 – 3 4 0 0 0 0 0 – 3 5 0 0 0 0 0 – 7 6 0 0 0 0 0 – 7 7 0 0 0 0 0 – 3 8 0 0 0 0 0 – 3 9 0 0 0 0 0 – 7 LOD2 MultiSurface 10 1 4 – – 5 (e) 3 11 0 0 – – 0 0 3 12 2 21 – – 23 45 3 13 10 2 – – 12 4 7 14 0 1 – – 1 12 3 15 0 9 – – 9 2 3 16 4 8 – – 12 1 7 17 5 0 – – 5 5 7 18 0 0 – – 0 4 7 19 0 0 – – 0 1 7 20 0 4 – – 4 6 7 21 0 1 – – 1 3 7 LOD2 Solid 22 0 42 58 0 100 – 3 23(c) – – – – – – 7 24 0 31 1 3 35 – 7 25 4 0 16 2 22 – 3 26(c) – – – – – – 7 27 22 17 50 0 89 – 3 LOD2 MultiSurface and Solid (d) 28 0 42 1 1 44 0 3 29 2 35 54 0 92 4 3 30 0 10 0 1 11 2 3 31 0 0 0 0 0 0 3 LOD3 MultiSurface 32 2 13 – – 15 54 3 33 6 5 – – 11 23 3 34 8 10 – – 19 45 3 35 5 0 – – 5 34 3 36 0 0 – – 0 1 7 LOD4 Solid 37 0 0 3 0 3 68 3 (a) % of invalid some datasets couldn’t be read high % of invalid
  46. How to improve the situation?

  47. 1. Improve awareness most practitioners are not aware of the

    rules 47
  48. 2. Modify software with constraints TU Delft’s 3dfier is only

    but one example 48
  49. 3. Work on automatic repair 49 Related work: ‘simpler’ case

    of filling holes for smooth surfaces
  50. Superstructures not topologically connected 50

  51. Superstructures not topologically connected 51

  52. Superstructures not topologically connected 52

  53. Many walls missing 53

  54. We tried voxelisation: so-so results 54 voxelisation Voxelization CityGML input

    Preprocessing Approach 1: Marching Cubes Approach 2: Dual Contouring CityGML output parser writer
  55. Results one neighbourhood Rotterdam 55 1207 buildings 116 valid (10%

    = ) after our automatic repair: 1159 valid (96% = )
  56. Some buildings from Rotterdam 56

  57. None
  58. thank you. Hugo Ledoux h.ledoux@tudelft.nl 3d.bk.tudelft.nl/hledoux 3d.bk.tudelft.nl/code/ Open-source software