Skip to content

Invalid feature table alignment #39

@ulrichson

Description

@ulrichson

Hello,

I was running the 3d-tiles-validator on a tileset created with ept-tools and it threw errors, mentioning that the feature table is not aligned correctly, e.g.:

{
  "type": "CONTENT_VALIDATION_ERROR",
  "path": "1-0-0-0.pnts",
  "message": "1-0-0-0.pnts caused validation errors",
  "severity": "ERROR",
  "causes": [
    {
      "type": "BINARY_INVALID_ALIGNMENT",
      "path": "1-0-0-0.pnts",
      "message": "The feature table binary must be aligned to 8 bytes",
      "severity": "ERROR"
    }
  ]
}

According to the feature table spec the start position must also be aligned:

The binary body shall start and end on an 8-byte boundary within the containing tile binary. The binary body shall be padded with additional bytes, of any value, to satisfy this requirement.

Currently, the ept-tools don't do that and thus I created a fork with following changes:

https://github.com/connormanning/ept-tools/compare/master...ulrichson:ept-tools:byte-alignment-fix?expand=1
(in these changes there is also another fix, i.e. the children array must not be empty according to the validator)

With these modifications, the 3d-tiles-validator doesn't complain.


Do you agree, that this would be the correct implementation?

I can open a PR, although tests will fail currently since they assume a different format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions