The spec uses C struct declarations in a few places to describe certain data structures in LAS files. This may be problematic since it could seem implied that the structs as given are directly serializable/deserializable. The binary representation of such C structs is ABI-dependent, with variable endianness and padding bytes.
While the use of C structs would be fine for documenting a LAS-handling C library, that is not what the LAS specification describes. I think it would be more appropriate to replace them with simple tables of fields instead.
The data structures currently described using C structs are:
sGeoKeys and sKeyEntry under the GeoKeyDirectoryTag Record
CLASSIFICATION under the Classification Lookup VLR
EXTRA_BYTES under the Extra Bytes VLR
The spec uses C
structdeclarations in a few places to describe certain data structures in LAS files. This may be problematic since it could seem implied that the structs as given are directly serializable/deserializable. The binary representation of such C structs is ABI-dependent, with variable endianness and padding bytes.While the use of C
structs would be fine for documenting a LAS-handling C library, that is not what the LAS specification describes. I think it would be more appropriate to replace them with simple tables of fields instead.The data structures currently described using C
structs are:sGeoKeysandsKeyEntryunder the GeoKeyDirectoryTag RecordCLASSIFICATIONunder the Classification Lookup VLREXTRA_BYTESunder the Extra Bytes VLR