Skip to content
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 Tile: Polygons #24

Closed
7 of 9 tasks
pjcozzi opened this issue Oct 2, 2015 · 2 comments
Closed
7 of 9 tasks

Vector Tile: Polygons #24

pjcozzi opened this issue Oct 2, 2015 · 2 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 2, 2015

See the originial notes for Vector Data.

Considering only polygons and no styling:

Header
------
magic            // uchar[4], "vctr"
version          // uint32,   1
byteLength       // uint32,   length, in bytes, of the entire tile.  See #23
batchTableLength // uint32,   length, in bytes, of the batch table.  Can be zero.

Batch Table
-----------
// Same as Batched 3D Model.  Optional.

Polygons
--------
polygonsLength    // uint32, number of polygons in the tile

There are polygonsLength of these (each is variable length):
* batchId         // uint32, index into batchTable, zero when Header.batchTableLength === 0
* minimumHeight   // float,  for shadow volume extrusion optimization
* maximumHeight   // float,  for shadow volume extrusion optimization
* positionsLength // uint32, number of vertex positions in this polygon
* x, y, z ...     // doubles in WGS84 coordinates
* indicesLength   // uint32, number of triangle indices
* i0, i1, i2, ... // uint16, every three indices form a triangle

This design assumes server-side triangulation and client-side subdivision and shadow volume extrusion. It includes metadata to optimize shadow volume rendering (which makes a huge difference).

Polygons with holes can be represented as multiple polygons (with or without the same batchId) or as one polygon with disconnected triangles.

The geometry is well behaved: there are no degenerate triangles nor are the duplicate vertex positions.

Cesium should render these tiles with RTC instead of GPU RTE.

Easy Questions

  • batchId is the first field here, but the last field in i3dm (Instanced 3D Model and Composite Tile Formats #23). Which do we prefer?
  • Should indices be uint16 or uint32? When using uint16, a big polygon could be represented as several polygons with the same batchId.
  • minimumHeight and maximumHeight are for rendering optimization. Most likely, they should be a semantic in the Batch Table instead.
  • minimumHeight and maximumHeight just need to be conservative. Is uint16 more appropriate?

Less Easy Questions

  • Tight representation for vertex positions, e.g., RTC, EXT_quantized_attributes, delta encoding, Open3DGC SOA vs. AOS, cartographic, etc.
  • As we add more geometries, including geometries with optional fields, will a hybrid JSON/binary approach, like Binary glTF, be better?
  • As we add more geometries, do we need to introduce multiple Batch Tables - one per geometry type. Or do we break this into many tile formats and use a Composite (Instanced 3D Model and Composite Tile Formats #23) tile?
  • How bad are cracks and what are we going to do about them?
  • Can additive refinement just add new vertices to polygons? Perhaps this is a completely different progressive tile format.
@pjcozzi pjcozzi changed the title Vector/Polygon Tile Format Vector Tile: Polygons Oct 2, 2015
@pjcozzi pjcozzi mentioned this issue Oct 2, 2015
15 tasks
@pjcozzi
Copy link
Contributor Author

pjcozzi commented Aug 9, 2016

Initial Cesium implementation: CesiumGS/cesium#4186

@pjcozzi pjcozzi mentioned this issue Aug 29, 2016
1 task
@pjcozzi
Copy link
Contributor Author

pjcozzi commented Aug 29, 2016

Largely addressed in #124.

For easier tracking, moved the rest of the issues to #25.

@pjcozzi pjcozzi closed this as completed Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant