Expand description
Rebuilding a CityJSON geometry from the flat arrays FlatCityBuf stores.
The nesting depth of everything here comes from the geometry type, which
is stored in the Geometry table alongside the arrays. Nothing infers depth
from which of solids/shells/surfaces/strings happen to be populated.
That inference is what produced finding #8: material.values on a Solid
with exactly one shell, and texture.values on a single-string
MultiLineString, came back one level deeper than they went in — because a
Solid and a one-solid MultiSolid flatten to byte-identical arrays, and
only the type tells them apart.
The depths, from geomprimitives.schema.json and CityJSON 2.0 §6:
| type | boundaries | semantics.values | material.values | texture.values |
|---|---|---|---|---|
MultiPoint | 1 | 1 | forbidden | forbidden |
MultiLineString | 2 | 1 | forbidden | forbidden |
MultiSurface, CompositeSurface | 3 | 1 | 1 | 3 |
Solid | 4 | 2 | 2 | 4 |
MultiSolid, CompositeSolid | 5 | 3 | 3 | 5 |
MultiPoint and MultiLineString name neither material nor texture in
their schema and declare additionalProperties: false, so a material or
texture on one of them is not valid CityJSON and has no depth to decode to.