Skip to content

Commit

Permalink
TILE_METADATA in feature table
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed May 8, 2017
1 parent b7b04a6 commit 0edd08a
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,20 @@ If both properties are present, the sooner value is used.

When the tile's content expires, its `content.url` is re-requested. Browser-based implementations may find it helpful to append a GUID or timestamp as a query parameter to the url to prevent caching.

A tile's expiration may be stored directly in the content's feature table. This allows the tile expiration date to change from request to request.

Sample b3dm feature table:
```javascript
{
"BATCH_LENGTH": 10,
"TILE_METADATA": {
"expire" : {
"date" : "2012-04-30T12:02Z"
}
}
}
```

The runtime may show the expired content while waiting for the new tile request. Once the request completes successfully the new content is shown and the expired content is unloaded. If the request fails, the runtime may continue to show the expired content or unload it.

If an expired tile's `content.url` had pointed to an [external tileset](#external-tilesets), its subtree is destroyed before new content is loaded in its place.
Expand Down
1 change: 1 addition & 0 deletions TileFormats/Batched3DModel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ These semantics define global properties for all features.
| Semantic | Data Type | Description | Required |
| --- | --- | --- | --- |
| `BATCH_LENGTH` | `uint32` | The number of distinguishable models, also called features, in the batch. If the Binary glTF does not have a `batchId` attribute, this field _must_ be `0`. | :white_check_mark: Yes. |
| `TILE_METADATA` | `object` | A json object containing tile metadata. The data layout of this object is identical to a tile defined in the tileset.json, but without the `content` and `children` properties. | :red_circle: No. |

## Batch Table

Expand Down
3 changes: 3 additions & 0 deletions schema/b3dm.featureTable.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"properties" : {
"BATCH_LENGTH" : {
"$ref" : "featureTable.schema.json#/definitions/globalPropertyScalar"
},
"TILE_METADATA" : {
"$ref" : "tile.schema.json"
}
},
"required" : ["BATCH_LENGTH"],
Expand Down
2 changes: 1 addition & 1 deletion schema/tile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"minimum" : 0
}
},
"oneOf" : [{
"anyOf" : [{
"required" : ["date"]
}, {
"required" : ["duration"]
Expand Down
58 changes: 58 additions & 0 deletions schema/tileMetadata.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"id" : "tileMetadata.schema.json",
"title" : "Tile Metadata",
"type" : "object",
"description" : "Tile metadata.",
"properties" : {
"boundingVolume" : {
"description" : "The bounding volume that encloses the tile.",
"$ref" : "boundingVolume.schema.json"
},
"viewerRequestVolume" : {
"extends" : { "$ref" : "boundingVolume.schema.json" },
"description" : "Optional bounding volume that defines the volume that the viewer must be inside of before the tile's content will be requested and before the tile will be refined based on geometricError."
},
"expire" : {
"type" : "object",
"description" : "Defines when a tile's content expires and should be re-requested. If both date and duration are present, the sooner value is used.",
"properties" : {
"date" : {
"type" : "string",
"description" : "The ISO8601 representation of the date at which the tile's content expires."
},
"duration" : {
"type" : "number",
"description" : "The number of seconds since the tile's content is loaded when the tile's content expires.",
"minimum" : 0
}
},
"oneOf" : [{
"required" : ["date"]
}, {
"required" : ["duration"]
}]
},
"geometricError" : {
"type" : "number",
"description" : "The error, in meters, introduced if this tile is rendered and its children are not. At runtime, the geometric error is used to compute Screen-Space Error (SSE), i.e., the error measured in pixels.",
"minimum" : 0
},
"refine" : {
"type" : "string",
"description" : "Specifies if additive or replacement refinement is used when traversing the tileset for rendering. This property is required for the root tile of a tileset; it is optional for all other tiles. The default is to inherit from the parent tile.",
"enum" : ["add", "replace"]
},
"transform" : {
"type" : "array",
"description" : "A floating-point 4x4 affine transformation matrix, stored in column-major order, that transforms the tile's content, i.e., its features and content.boundingVolume, and boundingVolume and viewerRequestVolume from the tile's local coordinate system to the parent tile's coordinate system, or tileset's coordinate system in the case of the root tile. transform does not apply to geometricError nor does it apply any volume property when the volume is a region, which is defined in WGS84.",
"items" : {
"type": "number"
},
"minItems" : 16,
"maxItems" : 16,
"default" : [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ]
}
},
"additionalProperties" : false
}

0 comments on commit 0edd08a

Please sign in to comment.