Skip to content

Avoid assuming binary representation of C structs #116

@plimkilde

Description

@plimkilde

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions