Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid feature table alignment #39

Open
ulrichson opened this issue Jul 5, 2023 · 2 comments
Open

Invalid feature table alignment #39

ulrichson opened this issue Jul 5, 2023 · 2 comments

Comments

@ulrichson
Copy link

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.

@connormanning
Copy link
Owner

Something like this is likely correct, I remember fixing this once on a development branch I was working on internally.

This issue aside, you might consider using viewer.copc.io instead, which will translate your dataset from EPT/COPC to 3D Tiles in the browser so you are not required to translate them to 3D Tiles on disk or use an EPT Tools server - just point at your data over HTTP. See for example COPC and EPT (the Cesium links here) sample data.

I should update the readme for this repo to point at that... and I'll see if I can dig up my existing fix for this issue.

@ulrichson
Copy link
Author

@connormanning thanks! I will look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants