Skip to main content

Module geom_decoder

Module geom_decoder 

Source
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:

typeboundariessemantics.valuesmaterial.valuestexture.values
MultiPoint11forbiddenforbidden
MultiLineString21forbiddenforbidden
MultiSurface, CompositeSurface3113
Solid4224
MultiSolid, CompositeSolid5335

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.