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.
Summary
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 .
And I'll now try to summarize a 264 page document in one paragraph 😎 :
The "GPM" is the "Generic Point-cloud Model", and describes methods for modeling error propagation (or "uncertainty") within point clouds that have been acquired e.g. with LIDAR scanners, for the use in a geospatial context. In GPM Version 1.2, these concepts have been generalized to be applicable to meshes. The idea is to store error metadata inside a glTF, using a glTF extension. The main elements of the data can very roughly be summarized to be "anchor points", which are a sort of reference points with a known location and known error/uncertainty, and "per-point errors" (PPE), which, in the case of mesh data, are stored in a texture. The anchor points are stored at the top-level of the glTF. The per-point error textures are associated with mesh primitives, similar to Property Textures in
EXT_structural_metadata
.Description
The current (DRAFT) state of this PR:
Source/Scene/Model/Extensions/Gpm
subfolder.Cartesian3
instead of anumber[3]
array for someposition
and such). We can argue about the 1:1 mapping of the JSON schema structures. The result may be "inconvenient" in some way. But trying to find a good "convenience layer" requires a deep understanding of the goals and usage patterns.Spdcf
. It could be calledStrictlyPositiveDefiniteCorrelationFunction
. If someone thinks that it should be renamed: Please suggest sensible names for its propertiesA
andT
here as well...GltfLoader
GltfGpmLoader
andGltfMeshPrimitiveGpmLoader
, that are hooked into theGltfLoader
GltfGpmLoader
loads the top-level GPM information, and offers it as the classes described aboveGltfMeshPrimitiveGpmLoader
loads the GPM information for each mesh primitive. This involves loading the PPE (per-point error) textures. Right now, this data is translated into instances for "structural metadata", likeEXT_structural_metdata
, but there are many details to be sorted out here...Some high-level considerations:
The extension is probably not something that could be considered as "the most widely used core functionality of CesiumJS". And I think that it could make sense to have an infrastructure (or at least some ideas) about how to handle ~"highly use-case specific (vendor) glTF extensions" in general. This could go as far as establishing some "plugin-concept" that allows plugging in loaders for specific extensions into the
GltfLoader
, and transporting the parsed and loaded data back to the client.Right now, for the GPM data, this is done ... very pragmatically. The
Model/Extensions/Gpm
subdirectory already suggests that there might be other directories inModel/Extensions/...
that contain the respective extension classes. The loaders are currently hard-wired into theGltfLoader
, but it might be relatively easy to find some sort of abstraction there. The question about how to transport the extension information to the client is still open.The apprach here right now is:
ModelComponents.extensions
dictionary that can store "anything"GltfGpmLoader
loads the GPM JSON, translates it into an object, and this is eventually just stored asloader._components.extensions["NGA_gpm_local"] = gpmLoader._gltfGpmLocal;
Model3DTileContent.getExtension
that just forwards toModel.getExtension
, and allows clients to obtain that parsed data likeconst extensionObject = modelContent.getExtension("NGA_gpm_local")
(the point is: There should probably not be some
Model.getNgaGpmLocal
function in theModel
class...)Details about the point that the 'mesh primitive GPM data' is currently translated into something that resembles
EXT_structural_metadata
will be added here soon. But there are too many details to be sorted out (and that are likely to change) to explain that right now.Testing plan
TBD
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change