cityjson / specs

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

Semantic Surface children and parent #50

Closed balazsdukai closed 5 years ago

balazsdukai commented 5 years ago

Since there is only a one-to-many relationship between semantic surfaces (just like in case of CityObjects), do we need to explicitly define the child --> parent relationship (eg. blue Door in example), or is defining child <-- parent enough (eg. red Door)? What is the reason for having both "children" and "parent"?

I see the existence of both "children" and "parent" property as an invitation for inconsistency, just like @clausnagel in his 3rd point in https://github.com/tudelft3d/cityjson/issues/38 . Also it means that one needs to double check the links between children and parents to make sure all relationships are discovered.

Furthermore, if the "parent" property is needed, does it make sense to harmonize it with the CityObject's "parentS" property, which is an array? Even though it would be an array with a single element most (all) of the cases.

{
  "type": "MultiSurface",
  "lod": 2,
  "boundaries": [
    [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]], [[0, 2, 3, 8]], [[10, 12, 23, 48]]
  ],
  "semantics": {
    "surfaces" : [
      {
        "type": "WallSurface",
        "slope": 33.4,
        "children": [2,3]
      }, 
      {
        "type": "RoofSurface",
        "slope": 66.6
      },
      {
        "type": "Door",
        "parent": 0,
        "colour": "blue"
      },
      {
        "type": "Door",
        "colour": "red"
      }
    ],
    "values": [0, 0, null, 1, 2]
  }
}
balazsdukai commented 5 years ago

Answered in #28