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.
There have been some quirks in the handling of paths for the
merge
andmergeJson
commands.Some details are described in the conversation around a recent PR. An attempt to summarize some of the main points:
merge
command originally copied the (external) source tilesets to the target directorymergeJson
command, these "identifiers" (i.e. subdirectory names) did not make sense. The merged tileset JSON should just refer to the real source tileset JSON files, using relative URIs in thecontent.uri
This PR changes these aforementioned
tilesetSourceIdentifiers
to actually beexternalTilesetDirectories
:merge
command, these still are the (disambiguated, but somewhat arbitrary) names of the subdirectories that the sources will be copied tomergeJson
command, these are the actual relative directories that will become part of thecontent.uri
that refer to the source tilesets@jo-chemla Maybe you want to give this a try. I tried to cover some of the relevant parts in the specs, differentiating the cases of [
merge
,mergeJson
] ⨯ [directories, files]. But it could be worthwhile to consider adding "more tricky cases" there.Details:
Most of the 3D Tiles Tools commands can transparently operate on
3tz
or3dtiles
files, or on the file system. The latter generally allowed inputs and outputs to either be given as an explicit file name like"./example/tileset.json"
, or as a directory name like"./example"
, and then make the assumption that this directory contains a file calledtileset.json
. This is a leftover from CesiumGS/3d-tiles#184 . It becomes more tricky due to the fact that in3tz
and3dtiles
files, there is a requirement for the top-level tileset JSON to be calledtileset.json
. And conversely, when someone gives something like./output
as the target, it is by no means clear whether this should be a JSON file without an extension, or whether the output should be./output/tileset.json
😬 I tried to sort some of that out, using 20 lines of comments for a 5 line function ...