CesiumGS / 3d-tiles

Specification for streaming massive heterogeneous 3D geospatial datasets :earth_americas:
2.09k stars 463 forks source link

Ideas for structuring Metadata Semantics #643

Open javagl opened 2 years ago

javagl commented 2 years ago

Each property of a metadata class can have a Semantic. This is just a string that can be used to assign an application-specific meaning to these properties. A collection of semantics is currently summarized in the 3D Metadata Semantic Reference README.

This form of maintaining the semantics reference has some limitations:

(The list of available ones are known at runtime in CesiumJS - via the MetadataSemantic class. But this does not include real type information, and has to be aligned with the README manually, and is not a scalable solution).


One option to solve all problems alleviate some of these limitations could be to define the semantics in a schema. And this could actually be pretty much the 3DTILES_metadata schema. An example of two of the existing semantics and how they could be defined in a schema:

"schema": {
  "classes": {
    "CesiumContentMetadataSemantics": {
      "properties": {
        "CONTENT_BOUNDING_BOX": {
          "name": "Content bounding box",
          "description": "The bounding volume of the content of a tile, equivalent to tile.content.boundingVolume.box",
          "type": "SCALAR",
          "componentType": "FLOAT32"
          "array": true,
          "count": 12
        },
        "CONTENT_MINIMUM_HEIGHT": {
          "name": "Minimum content height",
          "decription": "The minimum height of the content of a tile above (or below) the WGS84 ellipsoid. ",
          "type": "SCALAR",
          "componentType": "FLOAT32"
        }
      }
    }
  },
}

The advantages:

The limitation:

This could be seen as a limitation. Or as a flaw in the current way of defining semantics 😬 At least I think that it could be nice to only allow one component type. In many cases, it should be possible to

lilleyse commented 2 years ago

Related issue: https://github.com/CesiumGS/3d-tiles/issues/574