Extend analyze command to provide subtree information
#135
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.
Addresses #131 :
This is a first draft of extending the
analyzecommand to provide detailed information about.subtreefiles.As described in the issue: Interpreting the subtree files requires external information about whether the data refers to a quadtree or an octree. And one could make a case that it is inconvenient for call the
analyzecommand for each subtree file of a tileset, always passing in that structural information. So for now, preliminarily, the implementation here takes thetileset.jsonas the input, traverses the tileset, and collects the information about the subtrees.It will collect the information about all subtrees in a single Markdown file. So the output is (intentionally) similar to the https://github.com/CesiumGS/3d-tiles-samples/blob/main/1.1/SparseImplicitQuadtree/screenshot/subtreeInfo.md that is included in some of the 3D Tiles Samples. (with small differences - the information there was created during the creation of the tilesets, with my (private) Java 3D Tiles implementation).
Until now, I only tested it with the simple examples from the 3D Tiles Samples. And it is not unlikely that for "real", larger tilesets, the resulting markdown string could become huge and a bit difficult to handle. This may not be sooo critical when the
analyzecommand is only used as intended, namely for basic tests and debugging. But one has to expect that people will apply it to larger tilesets as well. Maybe there should somehow be the possibilities to....subtreefile orsubtreefiles into individual files(The latter is what I did here initially, but ... having many output files can also be inconvenient)
As an example, the output of running the
analyzecommand on the 'SparseImplicitQuadtree' sample is attached here:tileset.json.subtrees.md