cityjson / specs

Specifications for CityJSON, a JSON-based encoding for 3D city models
https://cityjson.org
Creative Commons Zero v1.0 Universal
109 stars 25 forks source link

How deep is the City Object family of 2nd-level objects? #148

Closed balazsdukai closed 2 years ago

balazsdukai commented 2 years ago

The CityObjects objects contains all CityObjects at the root and we represent a hierarchy by having 1st and 2nd level City Objects, plus the children and parents members.

For 1st level CityObjects it is clear that only 2nd level CityObjects can be their children. But in the specs currently we have the example of a BuildingInstallation (2nd-level) being the child of a BuildingPart (2nd-level). Just from this example I would assume then that one can nest as many 2nd-level objects under each other as one likes. Is this the case? Is there a limit on how many 2nd-level CityObjects can be nested? For instance a deep hierarchy of BuildingInstallations?

"CityObjects": {
  "id-1": {
    "type": "Building",
    "geographicalExtent": [ 84710.1, 446846.0, -5.3, 84757.1, 446944.0, 40.9 ], 
    "attributes": { 
      "measuredHeight": 22.3,
      "roofType": "gable",
      "owner": "Elvis Presley"
    },
    "children": ["id-2"],
    "geometry": [{...}]
  },
  "id-2": {
    "type": "BuildingPart", 
    "parents": ["id-1"],
    "children": ["id-3"],
    ...
  },
  "id-3": {
    "type": "BuildingInstallation", 
    "parents": ["id-2"],
    "children": ["id-4"],
    ...
  },
  "id-4": {
    "type": "BuildingInstallation", 
    "parents": ["id-3"],
    "children": ["id-5"],
    ...
  },
  "id-5": {
    "type": "BuildingInstallation", 
    "parents": ["id-4"],
    "children": ["id-6"],
    ...
  },
// many many more of BuldingInstallation deep
}
hugoledoux commented 2 years ago

No there is none.

But what is the alternative?