Skip to content

Files

Latest commit

08fb060 · Dec 22, 2017

History

History
This branch is 1 commit ahead of, 911 commits behind CesiumGS/3d-tiles:main.

schema

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 31, 2016
Feb 15, 2017
Mar 28, 2017
Mar 2, 2017
May 22, 2017
Sep 28, 2016
Sep 28, 2016
Sep 28, 2016
Aug 23, 2016
Aug 23, 2016
Dec 22, 2017
Aug 23, 2016

3D Tiles JSON Schema

Parts of 3D Tiles, such as tileset.json, Feature Table, and Batch Table, are represented with JSON. The JSON schema is defined using JSON Schema draft v4 in schema subdirectories.

Usage

A JSON object can be validated against the schema using a JSON schema validator such as Ajv: Another JSON Schema Validator, which supports JSON Schema draft v4. A command-line tool is available on npm as ajv-cli.

Validating against the schema does not prove full compliance with the 3D Tiles specification since not all requirements can be represented with JSON schema. For full compliance validation, see 3d-tiles-tools.

Example

  1. Install : npm install ajv-cli -g
  2. Validate : ajv -s schema/i3dm.featureTable.schema.json -r schema/featureTable.schema.json -d examples/i3dm.featureTable.json
  • The -s flag points to the schema you want to use for validation.
  • Multiple -r flags includes any external dependencies for the schema.
  • The -d flag points to the JSON to validate.