Rebuilds a geometry's whole semantics member, or null when there is
none.
ABSENT-VS-EMPTY, twice over:
The SURFACES decide whether there is a semantics member at all. A
present-but-EMPTY surface vector is {"surfaces": [], "values": ...},
not a missing member -- the writer emits exactly that shape, so a
length > 0 guard here drops the whole member.
An absent VALUES vector is "values": null: a member present with a
null value, which the schema requires and permits. It is not a missing
member and not [], which is what a present-but-empty vector gives.
Rebuilds a geometry's whole
semanticsmember, ornullwhen there is none.ABSENT-VS-EMPTY, twice over:
semanticsmember at all. A present-but-EMPTY surface vector is{"surfaces": [], "values": ...}, not a missing member -- the writer emits exactly that shape, so alength > 0guard here drops the whole member."values": null: a member present with a null value, which the schema requires and permits. It is not a missing member and not[], which is what a present-but-empty vector gives.