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

Prepare release 0.6.0 #333

Merged
merged 5 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@

Version ?.?.? - yyyy-mm-dd
Version 0.6.0 - 2025-02-24

- ...
- Fixed a bug where a `BOUNDING_VOLUMES_INCONSISTENT` error was reported when a tile defined a `transform` [#328](https://github.com/CesiumGS/3d-tiles-validator/pull/328)
- Allow users to provide schema files for validating custom metadata semantics [#329](https://github.com/CesiumGS/3d-tiles-validator/pull/329)
- Do not emit warnings when encountering `MAXAR_content_geojson`, `VRICON_class`, or `VRICON_grid` extensions [#330](https://github.com/CesiumGS/3d-tiles-validator/pull/330)
- Fixes for 3TZ validation [#331](https://github.com/CesiumGS/3d-tiles-validator/pull/331)
- Fixed a bug where a 3TZ file could not be referred to with a relative path
- Handled the case where completely invalid 3TZ files caused an `INTERNAL_ERROR`
- Updated `3d-tiles-tools` version to `0.5.0`
- Minor updates for the new `async` API that was introduced via [`3d-tiles-tools/pull/167`](https://github.com/CesiumGS/3d-tiles-tools/pull/167)
- Includes a bugfix from [`3d-tiles-tools/pull/173](https://github.com/CesiumGS/3d-tiles-tools/pull/173) where 3TZ files that contained certain local ZIP file headers caused an internal error in the validator
- Changed the severity of issues that have been generated for content types that are known but not validated (like `VCTR`, `GEOM`, and `GEOJSON`) from `WARNING` to `INFO` [#332](https://github.com/CesiumGS/3d-tiles-validator/pull/332)

Version 0.5.1 - 2024-12-05

Expand Down
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,75 @@ The configuration can also contain an `options` object. This object summarizes t
```
This will cause the validator to validate all JSON files in the specified directory, but only consider B3DM- and GLB tile content data during the validation.

### Custom Metadata Semantics

The [3D Metadata Specification](https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata) allows for the definition of custom _semantics_ for metadata properties. The built-in semantics are described in the [3D Metadata Semantic Reference](https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata/Semantics). For other semantics, the validator will by default generate a `METADATA_SEMANTIC_UNKNOWN` issue.

To avoid these warnings, clients can define their own semantics in a metadata schema file, so that they are taken into account during the validation process. Some details of this process might still change (see [`3d-tiles/issues/643`](https://github.com/CesiumGS/3d-tiles/issues/643) for a discussion). But the current state of the support of metadata semantics validation in the 3D Tiles Validator is described here.

#### Metadata Semantics Schema

A 'semantics schema' is a [3D Metadata Schema](https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata#schema) file that describes the _semantics_ that may appear in another metadata schema. In a semantics schema, the property names are just the names of the semantics. For example, when a client wants to define a semantic for a class like `ExampleClass`, and this semantic has the name `EXAMPLE_SEMANTIC`, then this structure can be represented in a semantics schema file as follows:

**`exampleSemanticsSchema.json`:**
```json
{
"id": "Example-Semantics-0.0.0",
"description": "A metadata schema where each class property has a name that represents one possible semantic of a metadata property, and that is used for validating semantics, by passing it in as one of the 'semanticSchemaFileNames' of the validation options",
"classes": {
"ExampleClassSemantics": {
"description": "A class where each property is a semantic for a property of the 'ExampleClass'",
"properties": {
"EXAMPLE_SEMANTIC": {
"name": "The 'EXAMPLE_SEMANTIC' structure",
"description": "The structure that a property must have so that it can have the 'EXAMPLE_SEMANTIC'",
"type": "SCALAR",
"componentType": "FLOAT32"
}
}
}
}
}
```

> Note:
>
> This schema file contains elaborate names and descriptions. These are optional on a technical level. An equivalent schema file is
> ```json
> {
> "id": "Example-Semantics-0.0.0",
> "classes": {
> "ExampleClassSemantics": {
> "properties": {
> "EXAMPLE_SEMANTIC": {
> "type": "SCALAR",
> "componentType": "FLOAT32"
> }
> }
> }
> }
> }
> ```
> But adding names and descriptions is strongly recommended for documentation purposes.

#### Metadata Semantics Schema Registration

In order to include a 'semantics schema' in the validation process, the name of the schema file can be passed to the validator, as part of the validation options:

**`exampleOptions.json`:**
```json
{
"semanticSchemaFileNames": ["exampleSemanticsSchema.json"]
}
```

This options file can then be passed to the validator:
```
npx 3d-tiles-validator --optionsFile exampleOptions.json -t ./data/exampleTileset.json
```

The validator will then validate the semantics that are defined in the tileset JSON against the structure that was defined in the semantics schema.



## Developer Setup
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": [
"Apache-2.0"
],
"version": "0.4.4",
"version": "0.5.0",
"url": "https://www.npmjs.com/package/3d-tiles-tools"
},
{
Expand Down
4 changes: 3 additions & 1 deletion etc/3d-tiles-validator.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export class ValidationOptions {
static fromJson(json: any): ValidationOptions;
get includeContentTypes(): string[] | undefined;
set includeContentTypes(value: string[] | undefined);
get semanticSchemaFileNames(): string[] | undefined;
set semanticSchemaFileNames(value: string[] | undefined);
get validateContentData(): boolean;
set validateContentData(value: boolean);
}
Expand Down Expand Up @@ -86,7 +88,7 @@ export class ValidationResult {
// @beta
export class Validators {
// @internal
static createContentValidationWarning(message: string): Validator<Buffer>;
static createContentValidationInfo(message: string): Validator<Buffer>;
// Warning: (ae-forgotten-export) The symbol "SchemaValidator" needs to be exported by the entry point index.d.ts
//
// @internal
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "3d-tiles-validator",
"version": "0.5.1",
"version": "0.6.0",
"license": "Apache-2.0",
"description": "Tools for validating 3D Tiles tilesets.",
"keywords": [
Expand Down