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

Inconsistent geometry restrictions #100

Closed clausnagel closed 2 years ago

clausnagel commented 2 years ago

Building chapter:

The geometry of "Building", "BuildingPart", "BuildingStorey", "BuildingRoom", and "BuildingUnit" can only be represented with these Geometry Objects: (1) "Solid", (2) "CompositeSolid", (3) "MultiSurface". The geometry of "BuildingInstallation", "BuildingConstructiveElement", or "BuildingFurniture" objects can be represented with any of the Geometry Objects.

Bridge chapter:

The geometry of both "Bridge" and "BridgePart" can only be represented with these Geometry Objects: (1) "Solid", (2) "CompositeSolid", (3) "MultiSurface". The geometry of the four other objects can be represented with any of the Geometry Objects.

Thus, "BridgeRoom" (and also "TunnelHollowSpace") can have any geometry type, but "BuildingRoom" is restricted to solids and surfaces. Why?

hugoledoux commented 2 years ago

Why? Because I actually couldn't really find this information from the specs/UML of CityGMLv3. Perhaps it's me though...

But let's follow the data model specs here: what should it be? "Bridge" and "BridgePart" also restricted to (1) "Solid", (2) "CompositeSolid", (3) "MultiSurface"?

clausnagel commented 2 years ago

Well, I was just stumbling across the "BuildingRoom" being restricted to (1) "Solid", (2) "CompositeSolid", (3) "MultiSurface", whereas "BridgeRoom" and "TunnelHollowSpace" are not. I think this should be consistent.

"Bridge" and "BridgePart" and are already restricted to (1) ..., (2) ... and (3) ... which is consistent with "Building", "BuildingPart", "Tunnel" and "TunnelPart". So, that's fine I guess.

clausnagel commented 2 years ago

Looking at the schemas again, I realized that the allowed geometries for "_AbstractBuilding" are actually different from "Bridge" and "Tunnel".

"_AbstractBuilding" can only have "MultiSurface", "Solid" and "CompositeSolid", whereas tunnels and bridges (+ their parts) can additionally have "MultiSolid" and "CompositeSurface" in addition. The spec, however, does not mention the latter two for bridges and tunnels. So, I think this should be harmonized as well.

Just as comparison: in CityGML 3.0, a gml:MultiSolid is not allowed for spaces in general. But gml:Solid, gml:CompositeSolid, gml:MultiSurface (which may have a single gml:CompositeSurface), gml:MultiCurve and gml:Point are. And additional template geometries are possible for all descendants of AbstractOccupiedSpaces, which includes, for instance, buildings, tunnels and bridges (+ their parts).

hugoledoux commented 2 years ago

so the solution to harmonise all this would be if the 4 objects Tunnel/Part and Bridge/Part are restricted to "MultiSurface", "Solid" and "CompositeSolid", right?