-
Notifications
You must be signed in to change notification settings - Fork 472
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
Vector Tiles #228
Vector Tiles #228
Conversation
@bagnell please target this to a new branch: |
Styling/README.md
Outdated
@@ -1309,6 +1309,20 @@ For example: | |||
|
|||
**TODO : add note about GLSL implementations requires strict type comparisons among other things: https://github.com/AnalyticalGraphicsInc/3d-tiles/issues/140** | |||
|
|||
#### Vector Data |
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.
Also update the TOC at the top of this file.
Styling/README.md
Outdated
@@ -1309,6 +1309,20 @@ For example: | |||
|
|||
**TODO : add note about GLSL implementations requires strict type comparisons among other things: https://github.com/AnalyticalGraphicsInc/3d-tiles/issues/140** | |||
|
|||
#### Vector Data | |||
|
|||
A [Vector Tile](../TileFormats/VectorData/README.md) is a collection of points, polygons, and polylines. All vector data can be styled similar to other features with `color` and `show`. Points have several other styling options: |
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.
is a collection of points, polygons, and polylines
Reword to something like "a collection of vector feature such as points, polygons, and polylines."
Throughout, we want our messaging to be consistent that 3D Tiles vector tiles go beyond traditional points/poylines/polygons to true 3D use cases.
Styling/README.md
Outdated
| Style | Description | Default | | ||
| --- | --- | --- | | ||
| pointSize | The size of the point in pixels. | 8.0 | | ||
| image | A URL to an image to be displayed instead of a point. | " " | |
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.
Here and below
" "
to
''
?
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.
- Is a data URI valid?
- This could go into the tasklist or a future PR, but I wonder if folks will want to this point to a subset of some payload like
buffer
/bufferView
in glTF so they can put all their images in one atlas.
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.
Also, explicitly say that pointSize
is ignored when image
is defined.
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 could be a data URI.
Would another option for the future be to have an atlas as part of the payload and the image be a subregion of the atlas? That way implementations wouldn't have to rebuild an atlas.
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.
Atlas - exactly. Can you submit an issue for this for future work?
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.
Submitted #239
Styling/README.md
Outdated
|
||
A [Vector Tile](../TileFormats/VectorData/README.md) is a collection of points, polygons, and polylines. All vector data can be styled similar to other features with `color` and `show`. Points have several other styling options: | ||
|
||
| Style | Description | Default | |
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.
We could improve this table with the datatype, bounds, etc. Instead, just put a TODO here to generate this table from the JSON schema.
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.
Include an example or two of these properties being used, including some use cases like directly mapping per-feature properties to these and using per-feature properties to compute these.
Styling/README.md
Outdated
| image | A URL to an image to be displayed instead of a point. | " " | | ||
| text | The text to display for the point | " " | | ||
| font | The font of the displayed text. | "30px sans-serif" | | ||
| labelStyle | The label style: fill(0), outline(1), or both(2). | 0 | |
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 add a table with screenshots for fill
, outline
, and both
? Devs writing their own renderer would fine this useful.
TileFormats/VectorData/README.md
Outdated
|
||
### Positions | ||
|
||
The positions buffer contains up to three sub-buffers for the polygons, polylines and points. The positions are encoded according to the quantized-mesh-1.0 format[1]. |
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.
Use serial comma. "polylines,"
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.
Just link to quantized-mesh-1.0 format in a Resources section. I don't think it's a good intro here.
TileFormats/VectorData/README.md
Outdated
|
||
The positions buffer contains up to three sub-buffers for the polygons, polylines and points. The positions are encoded according to the quantized-mesh-1.0 format[1]. | ||
|
||
The bounding volume for the tile must be a tile bounding region containing the north, south, east, and west bounds of the tile. The positions are represented by u, v, and height values that are quantized and delta encoded. |
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.
Throughout, order lower-left (x,y) to upper-right (x,y). west, south, east, north.
TileFormats/VectorData/README.md
Outdated
|
||
| Field | Meaning | | ||
| --- | --- | | ||
| u | The horizontal coordinate of the vertex in the tile. When the u value is 0, the vertex is on the Western edge of the tile. Then the value is 32767, the vertex is on the Eastern edge of the tile. For other values, the vertex's longitude is a linear interpolation between the longitudes of the Western and Eastern edges of the tile. | |
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.
Throughout this table, are you sure words like Western should be capitalized? Use bold if they need focus.
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.
Use consistent wording: vertex vs. position.
TileFormats/VectorData/README.md
Outdated
|
||
#### Polygon positions | ||
|
||
The first section of the positions buffer, from offset 0 to `polygonPositionsByteLength`, contains the polygon positions. Polygon positions only have u and v values. The u values are from offset `0` to `polygonPositionsByteLength / 2`. The v values are from offset `polygonPositionsByteLength /2` to `polygonPositionsByteLength`. The number of positions for each polygon is determined by the value of its `POLYGON_COUNT`. |
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.
"polygonPositionsByteLength /2" -> "polygonPositionsByteLength / 2"
TileFormats/VectorData/README.md
Outdated
|
||
#### Polygon positions | ||
|
||
The first section of the positions buffer, from offset 0 to `polygonPositionsByteLength`, contains the polygon positions. Polygon positions only have u and v values. The u values are from offset `0` to `polygonPositionsByteLength / 2`. The v values are from offset `polygonPositionsByteLength /2` to `polygonPositionsByteLength`. The number of positions for each polygon is determined by the value of its `POLYGON_COUNT`. |
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.
For each of these three sections, perhaps replace/augment the first sentence with a small table showing the start byte length and end byte length.
Bump @bagnell |
@pjcozzi This is ready for another look. |
Tweaked the styling spec in 13e14ca. |
@@ -51,6 +51,7 @@ Contents: | |||
* [Notes](#notes) | |||
* [Batch Table Hierarchy](#batch-table-hierarchy) | |||
* [Point Cloud](#point-cloud) | |||
* [Vector Data](#vector-data) |
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.
Add yourself to the contributors list in this file.
| Style | Type | Description | Default | | ||
| --- | --- | --- | --- | | ||
| `show` | `Boolean` | Whether or not to show the feature. | `true` | | ||
| `color` | `vec4` | The color of the feature. | `color('#FFFFFF')` | |
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.
What does this mean? The color multiple with the image and label? How does this relate to pointColor
?
Styling/README.md
Outdated
| `labelStyle` | `Number` | The label style: **fill** (`0`), **outline** (`1`), or **both** (`2`). This is ignored when `labelText` is undefined. | `0` | | ||
| `labelOutlineColor` | `vec` | The color of the text outline. This is ignored when `labelText` is undefined. | `color('#FFFFFF')` | | ||
| `labelOutlineWidth` | `Number` | The width of the text outline. This is ignored when `labelText` is undefined. | `1.0` | | ||
| `font` | `String` | The font of the displayed text. This is ignored when `labelText` is undefined. | `"30px sans-serif"` | |
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 thought I mentioned this before but the format of the font string needs to be referenced, e.g., like this spec does for CSS colors.
Styling/README.md
Outdated
|
||
For example: | ||
|
||
```json |
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 thought I mentioned this before, but please add more examples showing more of the vector tile-specific properties.
TileFormats/VectorData/README.md
Outdated
|
||
If `featureTableJSONByteLength` equals zero, the tile does not need to be rendered. | ||
|
||
The body section immediately follows the header section, and is composed of four fields: `Feature Table`, `Batch Table`, `Indices`, and `Positions`. |
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.
Here - and/or maybe in the ** Positions** section below - we should explicitly state the order and how to compute the offsets for the indices and positions for each type of feature. We did to be explicit as opposed to relying on the order of the fields in the header and making an assumption.
TileFormats/VectorData/README.md
Outdated
|
||
| Semantic | Data Type | Description | Required | | ||
| --- | --- | --- | --- | | ||
| `POLYGONS_LENGTH` | `uint32` | The number of pre-triangulated polygons in the tile. | :white_check_mark: Yes, unless one of `POLYLINES_LENGTH` or `POINTS_LENGTH` is defined. | |
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.
Sounds like we require that at least one polygon, polyline, or point is defined. Should this be required? Does this mirror b3dm, i3dm, and pnts?
TileFormats/VectorData/README.md
Outdated
|
||
| Semantic | Data Type | Description | Required | | ||
| --- | --- | --- | --- | | ||
| `POLYGON_COUNTS` | `uint32[]` | The number of vertices that belong to each polygon. This refers to the polygon section of the positions buffer in the body. Each polygon count refers to a contiguous number of vertices in the position buffer that represents the polygon. | :white_check_mark: Yes, unless `POLYGONS_LENGTH` is zero or not defined. | |
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.
Here and similar below, this is probably better stated as
Yes, when
POLYGONS_LENGTH
is greater than zero.
TileFormats/VectorData/README.md
Outdated
| `POLYGON_COUNTS` | `uint32[]` | The number of vertices that belong to each polygon. This refers to the polygon section of the positions buffer in the body. Each polygon count refers to a contiguous number of vertices in the position buffer that represents the polygon. | :white_check_mark: Yes, unless `POLYGONS_LENGTH` is zero or not defined. | | ||
| `POLYGON_INDEX_COUNTS` | `uint32[]` | The number of indices that belong to each polygon. This refers to the indices buffer of the body. Each index count refers to a contiguous number of indices that represent the triangulated polygon. | :white_check_mark: Yes, unless `POLYGONS_LENGTH` is zero or not defined. | | ||
| `POLYGON_MINIMUM_HEIGHTS` | `float32[]` | The minimum height of each polygon in meters above the WGS84 ellipsoid. | :red_circle: No. If the minimum height for each polygon is not specified, the global `MINIMUM_HEIGHT` will be used. | | ||
| `POLYGON_MAXIMUM_HEIGHTS` | `float32[]` | The maximum height of each polygon in meters above the WGS84 ellipsoid. | :red_cricle: No. If the maximum height for each polygon is not specified, the global `MAXIMUM_HEIGHT` will be used. | |
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.
Should be : red_circle:
TileFormats/VectorData/README.md
Outdated
|
||
See the [Batch Table](../BatchTable/README.md) reference for more information. | ||
|
||
### Indices |
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.
Rename to Polygon Indices
|
||
#### Polygon positions | ||
|
||
**Figure 3**: Polygon layout. |
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.
Nice diagrams!
@bagnell is the tasklist at the top of this up-to-date? |
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.
This looks good.
The two biggest areas are:
- Vector vs. classification tile
- Making this non-Earth centric, e.g., for BIM models in a local coordinate system
There's also some cleanup to make sure all the updates needed for classification volumes are in the text.
I added roadmap ideas to #25 - I don't think any of these need to be done as part of this PR.
Styling/README.md
Outdated
|
||
A [Vector Tile](../TileFormats/VectorData/README.md) is a collection of vector features such as points, polygons, and polylines. Vector features can be styled similar to other features with `color` and `show`. Points have several other styling options: | ||
|
||
**TODO : generate these tables from the JSON schema** |
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 remove this TODO and add a note to #37?
|
||
| Style | Type | Description | Default | | ||
| --- | --- | --- | --- | | ||
| `show` | `Boolean` | Whether or not to show the feature. | `true` | |
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 point's just use color
instead of pointColor
so basically point features inherit all the geometry features' style properties and add new ones - as opposed to removing some as well.
Styling/README.md
Outdated
| `pointColor` | `vec4` | The color of the point. `pointColor` is ignored when `image` is defined. | `color('#FFFFFF')` | | ||
| `pointOutlineColor` | `vec4` | The color of the point outline. `pointOutlineColor` is ignored when `image` is defined. | `color('#000000')` | | ||
| `pointOutlineWidth` | `Number` | The width, in pixels, of the point outline. `pointOutlineWidth` is ignored when `image` is defined. | `0.0` | | ||
| `labelText` | `String` | The text to display for the point. | `undefined` | |
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.
Are \n
line breaks allowed? If so, explicitly mention it.
Styling/README.md
Outdated
| `pointOutlineColor` | `vec4` | The color of the point outline. `pointOutlineColor` is ignored when `image` is defined. | `color('#000000')` | | ||
| `pointOutlineWidth` | `Number` | The width, in pixels, of the point outline. `pointOutlineWidth` is ignored when `image` is defined. | `0.0` | | ||
| `labelText` | `String` | The text to display for the point. | `undefined` | | ||
| `labelColor` | `vec4` | The color of the label. This is ignored when `labelText` is undefined. | `color('#FFFFFF')` | |
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.
Here and throughout below probably remove:
This is ignored when
labelText
is undefined.
It is obvious and keeping the text makes the table more verbose.
Styling/README.md
Outdated
| `labelText` | `String` | The text to display for the point. | `undefined` | | ||
| `labelColor` | `vec4` | The color of the label. This is ignored when `labelText` is undefined. | `color('#FFFFFF')` | | ||
| `labelStyle` | `Number` | The label style: **fill** (`0`), **outline** (`1`), or **both** (`2`). This is ignored when `labelText` is undefined. | `0` | | ||
| `labelOutlineColor` | `vec` | The color of the text outline. This is ignored when `labelText` is undefined. | `color('#FFFFFF')` | |
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.
Should this be vec4
?
TileFormats/VectorData/README.md
Outdated
|
||
### Polygon Indices | ||
|
||
TODO: `uint16` indices? |
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.
Does it have a big impact on file size? Is this consistent with b3dm?
uint32
implies using the WebGL extension (which is probably fine) or a lot of runtime slicing.
TileFormats/VectorData/README.md
Outdated
|
||
### Polygon Indices | ||
|
||
TODO: `uint16` indices? |
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.
Does it have a big impact on file size?
After gzip...
|
||
See the [Batch Table](../BatchTable/README.md) reference for more information. | ||
|
||
### Polygon Indices |
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.
Also for meshes?
TileFormats/VectorData/README.md
Outdated
|
||
| Field | Meaning | | ||
| --- | --- | | ||
| u | The horizontal coordinate of the vertex in the tile. When the u value is 0, the vertex is on the western edge of the tile. Then the value is 32767, the vertex is on the eastern edge of the tile. For other values, the vertex's longitude is a linear interpolation between the longitudes of the western and eastern edges of the tile. | |
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.
With just a few wording tweaks and maybe a property tweak or two - couldn't we word this so that it is not geo specific? For example, I suspect the code doesn't care that something is "west" or "east", it is just "min" and "max."
TileFormats/VectorData/README.md
Outdated
| v | The vertical coordinate of the vertex in the tile. When the v value is 0, the vertex is on the southern edge of the tile. When the value is 32767, the vertex is on the northern edge of the tile. For other values, the vertex's latitude is a linear interpolation between the latitudes of the southern and northern edges of the tile. | | ||
| height | The height of the vertex of the tile. When the height value is 0, the vertex's height is equal to `MINIMUM_HEIGHT` from the feature table. When the value is 32767, the vertex's height is equal to `MAXIMUM_HEIGHT` from the feature table. For other values, the vertex's height is a linear interpolation of the minimum and maximum heights. | | ||
|
||
The values are then delta and ZigZag encoded. The delta encoding ensures the values are small integers. The ZigZag encoding ensure the values are positive integers. Example encoding code is listed 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.
"The ZigZag encoding ensure" -> "ensures"
Instead of a separate PR, I added the geometry spec to this. |
Add a link to it from the main README.md. |
TileFormats/GeometryData/README.md
Outdated
@@ -0,0 +1,108 @@ | |||
# Geometry Data |
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.
Just call it "Geometry" - no need to have a parallel to "Vector Data."
TileFormats/GeometryData/README.md
Outdated
|
||
The body section immediately follows the header section, and is composed, in order, of two fields: `Feature Table` and `Batch Table`. | ||
|
||
Code for reading the header can be found in |
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.
Throughout just like to Cesium's master branch - later this can be a tag so it never breaks. The PR will be merged soon.
TileFormats/GeometryData/README.md
Outdated
|
||
### Semantics | ||
|
||
Per-feature semantics specific to a feature type are prefixed with the name of the feature type. e.g. `BOXES` for boxes, `CYLINDERS` for cylinders and `ELLIPSOIDS` for ellipsoids. |
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.
We use the "serial comma" - put a comma after "cylinders."
TileFormats/GeometryData/README.md
Outdated
Per-feature semantics specific to a feature type are prefixed with the name of the feature type. e.g. `BOXES` for boxes, `CYLINDERS` for cylinders and `ELLIPSOIDS` for ellipsoids. | ||
|
||
At least one global `LENGTH` semantic must be defined. | ||
If `BOXES_LENGTH` in not defined, or zero, no boxes will be rendered. |
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 make each of this "If" statements, a bullet.
TileFormats/GeometryData/README.md
Outdated
|
||
| Semantic | Data Type | Description | Required | | ||
| --- | --- | --- | --- | | ||
| `BOXES` | `float32[]` | The boxes in the tile. The length of the array will be `19 * BOXES_LENGTH`. The first three elements of each box are the x, y, and z dimensions. The following 16 elements are the 4x4 model matrix in column-major order. | :white_check_mark: Yes, when the global `BOXES_LENGTH` is greater than zero. | |
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.
Let's be super explicit - are the dimensions the full length or half length?
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.
Do we even need this since it could just be the translation part of the 4x4 matrix? Just all boxes are unit boxes transformed by the matrix?
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'm OK with just a model matrix, that's how the implementation works.
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.
Should it mention anything about scaling the unit geometry? The only one I thought worth mentioning was the cylinder for which axes scaled the radius and which one was the length.
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.
+1 for the cylinder axes. I don't think anything else is needed for the box.
TileFormats/GeometryData/README.md
Outdated
| --- | --- | --- | --- | | ||
| `BOXES` | `float32[]` | The boxes in the tile. The length of the array will be `19 * BOXES_LENGTH`. The first three elements of each box are the x, y, and z dimensions. The following 16 elements are the 4x4 model matrix in column-major order. | :white_check_mark: Yes, when the global `BOXES_LENGTH` is greater than zero. | | ||
| `BOX_BATCH_IDS` | `uint16[]` | The `batchId` of the box that can be used to retrieve metadata from the `Batch Table`. | :red_circle: No. | | ||
| `CYLINDERS` | `float32[]` | The cylinders in the tile. The length of the array will be `18 * CYLINDERS_LENGTH`. The first element is the radius of the cylinder. The second element is the length along the z axis. The following 16 elements are the 4x4 model matrix in column-major order. | :white_check_mark: Yes, when the global `CYLINDERS_LENGTH` is greater than zero. | |
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.
Similar comment for cylinders.
TileFormats/GeometryData/README.md
Outdated
| `BOX_BATCH_IDS` | `uint16[]` | The `batchId` of the box that can be used to retrieve metadata from the `Batch Table`. | :red_circle: No. | | ||
| `CYLINDERS` | `float32[]` | The cylinders in the tile. The length of the array will be `18 * CYLINDERS_LENGTH`. The first element is the radius of the cylinder. The second element is the length along the z axis. The following 16 elements are the 4x4 model matrix in column-major order. | :white_check_mark: Yes, when the global `CYLINDERS_LENGTH` is greater than zero. | | ||
| `CYLINDER_BATCH_IDS` | `uint16[]` | The `batchId` of the cylinder that can be used to retrieve metadata from the `Batch Table`. | :red_circle: No. | | ||
| `ELLIPSOIDS` | `float32[]` | The ellipsoids in the tile. The length of the array will be `19 * ELLIPSOIDS_LENGTH`. The first three elements are the radii in the x, y, and z axes. The following 16 elements are the 4x4 model matrix in column-major order. | :white_check_mark: Yes, when the global `ELLIPSOIDS_LENGTH` is greater than zero. | |
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.
Same comment.
Styling/README.md
Outdated
|
||
A [Vector Tile](../TileFormats/VectorData/README.md) is a collection of vector features such as points, polygons, and polylines. Vector features can be styled similar to other features with `color` and `show`. Points have several other styling options: | ||
|
||
The following style properties apply to geometry features in vector tiles: |
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.
Probably clearer to say polygons
and polylines
here.
"description" : "The size of points in pixels.", | ||
"default" : 8.0 | ||
}, | ||
"pointColor" : { |
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.
This was removed.
Styling/README.md
Outdated
| `labelColor` | `vec4` | The color of the label's text. | `color('#FFFFFF')` | | ||
| `labelStyle` | `Number` | The label style: **fill** (`0`), **outline** (`1`), or **both** (`2`). See **Table1**.| `0` | | ||
| `labelOutlineColor` | `vec4` | The color of the text outline. | `color('#FFFFFF')` | | ||
| `labelOutlineWidth` | `Number` | The width of the text outline. | `1.0` | |
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.
Include in pixels
here and in the schema.
Styling/README.md
Outdated
| `labelStyle` | `Number` | The label style: **fill** (`0`), **outline** (`1`), or **both** (`2`). See **Table1**.| `0` | | ||
| `labelOutlineColor` | `vec4` | The color of the text outline. | `color('#FFFFFF')` | | ||
| `labelOutlineWidth` | `Number` | The width of the text outline. | `1.0` | | ||
| `font` | `String` | The font of the displayed text. | `"30px sans-serif"` | |
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.
Mention that this is a CSS font string, here and in the schema.
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.
Styling/README.md
Outdated
| `labelOutlineColor` | `vec4` | The color of the text outline. | `color('#FFFFFF')` | | ||
| `labelOutlineWidth` | `Number` | The width of the text outline. | `1.0` | | ||
| `font` | `String` | The font of the displayed text. | `"30px sans-serif"` | | ||
| `backgroundColor` | `vec4` | The label background color. | `rgba(42, 42, 42, 0.8)` | |
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.
All the other color defaults are specified as css color strings, this should probably as well. (Also in schema).
|
||
**Figure 4**: Polyline layout. | ||
|
||
![](figures/polyline.jpg) |
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.
In the diagram polylinePositionsByteLength / 2
should be polylinePositionsByteLength / 3
|
||
**Figure 5**: Point layout. | ||
|
||
![](figures/point.jpg) |
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.
In the diagram pointPositionsByteLength / 2
should be pointPositionsByteLength / 3
|
||
**Figure 3**: Polygon layout. | ||
|
||
![](figures/polygon.jpg) |
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.
Should this diagram also include height values?
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.
Polygons don't have height values.The heights are either given by th epolygon minimum and maximum heightsd in the feature table or the global minimum and maximum for the tile. Only points and polylines need ber-vertex heights.
schema/vctr.featureTable.schema.json
Outdated
}, | ||
"RECTANGLE" : { | ||
"type" : "array", | ||
"description" : "A floating-point 4 element array that defines a rectangle bounding all of the vector data. The elements in the array are, in order, west, south, east, and north.", |
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.
This description is out of date compared to the spec text.
schema/vctr.featureTable.schema.json
Outdated
"POINTS_LENGTH" : { | ||
"$ref" : "featureTable.schema.json#/definitions/globalPropertyScalar" | ||
}, | ||
"MESHES_LENGTH" : { |
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.
Remove meshes, boxes, etc.
@lilleyse Updated. This is ready for another look. |
}, { | ||
"$ref" : "style.condition.schema.json" | ||
}], | ||
"description" : "Sets near and far scaling properties of a feature based on the features's distance from the camera. A feature's scale will interpolate between the `y` and `w` values while the camera distance falls within the upper and lower bounds of the specified `x` and `z` value. Outside of these ranges, the features's scale remains clamped to the nearest bound. If undefined, `scaleByDistance` will be disabled.", |
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.
There are minor differences between the descriptions in the schema and in the spec text, it's probably worth going through all of these to make sure they are the same.
For example this one does not include "in meters".
That's all my comments. This is really close now. |
@lilleyse Updated. |
The updates look good. I'll check over the Cesium PR quickly and then this will be good to go. |
👍 |
Updated vector tiles draft. This reflects the current implementation in the
vector-tiles
branch of Cesium.A few things we may want to add: