-
Notifications
You must be signed in to change notification settings - Fork 470
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
Consider making a top-level tileset.json the required entry point #184
Comments
I always thought tileset.json was required to be the entry point as well. |
Requiring For #89 could this be solved from a tooling perspective? In tilesetToDatabse either a json file or folder name could be supplied (like in Cesium). The If even the root json isn't know, it should be possible to determine the root by reading each json and looking at its external tilesets. This wouldn't work with cyclical dependencies or multiple roots, but those situations don't seem likely. |
I vehemently disagree. Without a well-defined entry point it's impossible to read an arbitrary tileset without external knowledge not included in the tileset itself. That's a design flaw.
I don't understand the use case for this. Why you would store the version in the filename when the version is in the file itself? There could easily be a mismatch.
There's nothing stopping a client from reading an arbitrary json file as the root for debugging purposes, so I don't think this point is valid. Another option would be to enforce external tileset to have a tileset.json root as well; but I don't think that's necessary.
We could certainly push it to the .3dtiles level and require the root to be marked there, but that seems like a sub-par solution since it means that non-DB based tileset would still be impossible to read generically. Also, the .3dtiles file is not in any way part of the spec yet, so we're not really solving the core problem.
This sounds performance prohibitive to me, not to mention "don't seem likely" is a world away from "can't happen". Also, making clients read through an entire directory of files in a tileset in order to try and figure out the root is an undue burden, especially considering your first use case was avoiding having to read tileset.json to get the version number. Obviously I have strong opinions here, but having a well defined entry point is critical for being able to generically ready 3D Tiles tilesets. |
My experience so far has been that tileset authors tend not to name the root file If the technical issues pile up too much, I'm ok with strictly naming it |
I just uncovered another problem related to this. I have a web service that serves a tileset, let's assume the url to the root is Either Cesium has a bug and needs to be updated to never append |
Yeah, in Cesium it will tack on |
That's kinda my point. There is no "directory" concept for urls. A url that doesn't end in |
I'm wondering how these rules might apply for requesting tile contents, since they are relative to the In the case of a url like
I'm thinking the first is probably the more common convention. |
Actually I suppose case 2 wouldn't be allowed since the entry point has to be tileset.json, and referencing a file of a different name wouldn't make sense. |
@lilleyse are you still concerned with explicitly requiring |
No, I think it will be fine. Tileset writers will just need to become aware of this condition over time. |
Sounds good. |
Count me as a strong vote against requiring tileset.json to be the file name. Being able to serve dynamic content then requires weird tricks with Apache and mod_rewrite, excluding a large class of users who don't necessarily have permissions to fiddle with their server configs. I'm not sure what @mramato means by a "generic loader", but the root of a tree is whatever the end user says it is. It doesn't matter if there are "parent tiles" somewhere in the ether if the user didn't want to load them. |
@lilleyse is this something we should do for 1.0? I do not want to make the requirement in haste. |
I think @KermMartian and I would like to reiterate our opposition to the behavior requested in the initial comment for this issue. |
Despite being the person who created this issue, I'm okay with not requiring a top-level tileset.json given that we update Cesium's implementation (and toolchain) to always require a full path to the entry point. Cesium currently adds "tileset.json" to urls that do not end in json, making it impossible to load many urls. We will also need to enforce something at the .3dtiles sqlite level so that the entry-point to the tileset is known, but this can be done post 1.0. Tools like |
I'm definitely in favor of always requiring a full path to the entry point. |
Resolved in #301 |
Currently, any JSON file anywhere in the hierarchy can be the entry point of a tileset, there is also no requirement for it to be named
tileset.json
. This makes it impossible to write a generic loader because it requires whomever created the tileset to identify which JSON file to use.Requiring a
tileset.json
at the top level of the hierarchy to always be the entry point fixes this problem and shouldn't negatively impact any use cases I can think of. In fact, the way the spec is worded, I always thought this was already the case (because we use the termtop-level
in a few places.This is somewhat related to #89, since you want to be able to read a .3dtiles database without any external knowledge, but I thought it warranted it's own issue since it has come up a few times in my attempt to read tilesets generated by someone other than myself.
The text was updated successfully, but these errors were encountered: