-
Notifications
You must be signed in to change notification settings - Fork 473
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
Batch Table Hierarchy #171
Conversation
bb0c994
to
5ce4947
Compare
5ce4947
to
415bdaa
Compare
This is ready for review now. The Batch Table Hierarchy section in Batch Table is pretty long - maybe it belongs in its own file. |
@arneschilling @pmconne @jbo023 your input is very welcomed here! |
Can you add a TOC to TileFormats/BatchTable/README.md? |
Styling/README.md
Outdated
@@ -46,6 +46,7 @@ Contents: | |||
* [Variables](#variables) | |||
* [Built-in Variables](#built-in-variables) | |||
* [Built-in Functions](#built-in-functions) | |||
* [Batch Table Hierarchy](#batch-table-hierarchy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the TOC indentation is right here; a lot of this should not be under Expressions. Can you reorganize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fits ok, as those sections describe expressions related to the hierarchy and point clouds. I'm fine with placing them in a different section too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this should be in a top-level section, not under Expressions.
Class and Feature should be precisely defined; keep in mind this is a spec, not a tutorial. |
Also define Instance. Use a diagram if it is helpful. |
Although the schema is the authority, here and throughout, precisely define the types like the spec does elsewhere, e.g., "A string representing the name of the class" |
TileFormats/BatchTable/README.md
Outdated
* `length` - the number of instances of the class | ||
* `instances` - metadata for the instances. This section is similar to a standard batch table; properties may be stored as an array of values or a reference to data in the binary body. | ||
|
||
`instancesLength` is the number of instances. In this example `instancesLength` equals `batchLength`, however this is not always the case (as will be seen below). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precisely say why or link to why. The spec needs to be rigorous.
TileFormats/BatchTable/README.md
Outdated
|
||
Another limitation of the standard batch table is the difficulty in expressing metadata hierarchies. | ||
|
||
For example consider a tile that represents a city block. The block itself contains metadata, the individual buildings contain metadata, and the building components (doors, walls, roofs) contain metadata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a screenshot or a series of screenshots with different features highlighted from the Sandcastle example would be useful here.
The tutorial style content is good, but we need to better separate what is precisely written spec and what is an example. Using the example to define the spec is atypical. |
Made some tweaks in 9c2679d. |
Made a few more tweaks in 22a44e3. |
That's all my comments; this looks good. Let me know when the updates and schema are ready. |
Thanks for the first round of reviewing.
Definitely agree here, I'll work on this as well as creating some diagrams. |
"@arneschilling @pmconne @jbo023 your input is very welcomed here!" We can definitely work with this approach, thank you very much. Something is not quite clear to me. The attribute names in the classes section seem to have prefixes, e.g. "door_name" and "building_name" for classes Door and Building. Is this a naming convention or can we use the original attribute names, in our case just "name" for each class? Adding a prefix to each would alter the way we present batch table information to the user, because we cannnot always implement a dictionary mapping these strings values to more user friendly text. From a Logical Point of view, I have one comment. |
Thanks for the feedback. The attribute names don't have to have prefixes, this was just for example purposes. In my next round of edits I will clarify that. If someone is using the concept of parents with the standard batch table (no classes) I think they would be better off storing parent id's as a regular batch table property and have hierarchy logic be part of the app. |
@lilleyse what's the latest here? Is this ready? |
Having finally gotten a chance to play around with this in earnest, I have a couple of questions:
I think we may have an unusual use case - we want to use this purely for classification of features, with all the properties residing on the abstract "classification" classes. We can do that with the existing spec - redundant data notwithstanding. If the answer to question 1 is "yes" then the redundancy mentioned in question 2 will not be much of an issue. |
To answer my own question...yes, instances with no properties are fine. |
de0dacf
to
f38824a
Compare
5f685f1
to
5f4049a
Compare
5f4049a
to
48b465f
Compare
Second draft updated. I still think it may be worth splitting it off into a separate file - what do you think @pjcozzi. The batch table schema is also updated. |
06d00e2
to
df25e8c
Compare
TileFormats/BatchTable/README.md
Outdated
|
||
### Notes | ||
|
||
* In some cases a feature may have multiple ancestors of the same class, or ancestors of different classes with the same property names. It is up to the implemantation to decide how to handle overloaded properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a concrete example here.
It is up to the implemantation to decide how to handle overloaded properties.
In general, we need to avoid undefined behavior as much as possible. Are we sure we can't define reasonably behavior here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some examples:
An instance has two parents of the same class. Anytime the instance gets a property it will have to choose between which parent to get it from. Cesium's behavior is to get it from the first parent.
An instance may also have two different ancestors of different classes that happen to use the same property name, like id
. In Cesium it will just return the property from whichever ancestor it encounters first, so similar to the situation above.
I left this open ended at first, but I think this behavior could be defined pretty easily here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once I started to rewrite that section I realized it may be hard to define the exact behavior, which would be equivalent to defining how the hierarchy should be traversed. I did make the wording less open-ended - so it is not allowed to return an array of values, or just do nothing.
``` | ||
|
||
* The batch table hierarchy is self-contained within the tile. It is not possible to form metadata hierarchy across different tiles in the tileset. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below in
TileFormats/BatchTable/figures/batch-table-hierarchy-block.png
"Labelled" should be "Labeled"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And in batch-table-hierarchy-parking-lot.png.
Looks good, this is very close. |
b8f5478
to
d8eb182
Compare
d8eb182
to
49f99ea
Compare
Thanks! |
For #66
Cesium implementation : CesiumGS/cesium#4625
This is a rough draft for the batch table binary.
To-do: