Transit stores platform length for clearance calculations in USD. Which value-type choice is correct?
Select an answer to reveal the explanation.
Short Explanation
Platform length is a number—store it as double or float, not a poetic token or a boolean flag. Typed numerics let scripts compute clearances. Matrices are for transforms, not tape measures.
Full Explanation
Transit platform length used for clearance calculations is a numeric measure and must be stored as a double (or float) attribute typed for that length. Typed floating-point values support arithmetic, tolerance checks, and schema validation in automation that compares train consists against platform extents. OpenUSD’s value-type system exists so civic measures remain computable rather than decorative strings.
A string token that spells the length with units in the text forces parsers to scrape English and breaks localization and unit conversion. A boolean that flips when length exceeds 100 meters loses the actual length and cannot support nuanced clearance math. A matrix4d whose translation coincides with length only by accident is the wrong type domain—matrices express transforms, not scalar civil measures—and invites silent misuse of transform stacks.
Exam caveat: prefer documenting units (meters) in attribute naming, schema, or metadata while keeping the value numeric; do not embed unit words inside the number’s type. Double is preferred when precision matters for long corridors.
Operational check: author platform length as double/float, run the clearance script against a known consist length, confirm pass/fail thresholds, and ensure DCC round-trips do not coerce the attribute into a string or token.