Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The document "The Generic Point-cloud Model (GPM): Implementation and Exploitation, Version 1.2, 2024-02-29" from the National Geospatial-Intelligence Agency (NGA) is published at https://nsgreg.nga.mil/csmwg.jsp . It defines two extensions:
NGA_gpm
: A 3D Tiles extension which stores tileset-level GPM metadataNGA_gpm_local
: A glTF extension that stores local GPM metadataThis PR adds support for the validation of
NGA_gpm_local
.(Support for the validation of
NGA_gpm
will be added soon - probably, in a dedicated PR)Even though this is a glTF extension, the support is implemented here, and not in the glTF-Validator. There have been considerations to add this to the glTF-Validator, but implementing it here allows for faster iterations (independent of the glTF-Validator releases), it does not have the "language barrier" (the glTF Validator is implemented in Dart), and the validation for the other Cesium glTF extensions (like
EXT_structural_metadata
andEXT_mesh_features
) have also been implemented as part of the 3D Tiles Validator. Technically, the validation of the glTF extensions in the context of the 3D Tiles validator is implemented by using the glTF validator to perform the "main" validation of the glTF, and - when the glTF is valid in general - diving into the extension-specific validation steps.For reviewers:
There is one commit that splits the existing glTF extension validation classes into several subdirectories. But basically all the functionality here is added with a single commit, a61e50b , which adds the
NgaGpmLocalValidator.ts
. This receives the glTF data and performs the validation. (Subsequent PRs add the specs, which mainly consist of list of glTFs that contain the extension, and that are 'invalid' in one way or another).The validation currently covers only the JSON-level. There are a few ways in which certain aspects could be made more strict. For example: The extension may contain "correlation matrices", and one could add checks whether these matrices are always
positive semi-definite. The matrices are usually given as "upper triangles", meaning that they are always symmetric. An additional check could be whether the lengths of these "upper triangles" indeed are triangular numbers (1, 3, 6, 10, 15, 21...). Some of the details here are still being discussed internally.