Class: I3SDataProvider

I3SDataProvider

new I3SDataProvider(options)

I3SData Provider is the main public class that supports I3S. The currently supported I3S versions are 1.6 and 1.7/1.8 (OGC I3S 1.2). The I3SFeature and I3SNode classes implement the object model of the I3S entity and have a common interface. This object is usually not directly instantiated, but instead uses I3SDATAProvider. romURL

Name Type Description
options I3SDataProvider.ConstructorOptions

Describe the object of initialization options.

See:
Examples
try {
  const i3sData = await I3SDataProvider.fromUrl(
    "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0"
  );
  viewer.scene.primitives.add(i3sData);
} catch (error) {
  console.log(`There was an error creating the I3S Data Provider: ${error}`);
}
try {
  const geoidService = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(
    "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/EGM2008/ImageServer"
  );
  const i3sData = await I3SDataProvider.fromUrl(
    "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0", {
      geoidTiledTerrainProvider: geoidService
  });
  viewer.scene.primitives.add(i3sData);
} catch (error) {
  console.log(`There was an error creating the I3S Data Provider: ${error}`);
}

Members

readonly adjustMaterialAlphaModeboolean

Determine whether to adjust the alpha mode of the material based on the color vertex attributes.

readonly applySymbologyboolean

Determine whether to parse and apply I3S symbols to layers.

readonly calculateNormalsboolean

Determine whether to generate plane normals for I3S geometry without normals.

readonly dataobject

Retrieve the I3S data of the object.

readonly extentRectangle

Obtain the scope covered by I3S.

readonly geoidTiledTerrainProviderArcGISTiledElevationTerrainProvider

Reference GEOID service provider for terrain conversion between orthorectified and ellipsoidal.

readonly layersArray.<I3SLayer>

Get a collection of layers.

readonly namestring

Get the readable name of this dataset.

readonly resourceResource

Used to obtain resources for the I3S dataset.

showboolean

Determine whether to display the dataset.

readonly showFeaturesboolean

Determine whether to display features.

readonly sublayersArray.<I3SSublayer>

Get a collection of building sub layers.

Methods

static fromUrl(url, options){Promise.<I3SDataProvider>}

Create an I3SDATAProvider. The currently supported I3S versions are 1.6 and 1.7/1.8 (OGC I3S 1.2).

Name Type Description
url string | Resource

The URL of the I3S dataset should return an I3S scene object.

options I3SDataProvider.ConstructorOptions

Describe the object of initialization options.

Returns:
Type Description
Promise.<I3SDataProvider>
Examples
try {
  const i3sData = await I3SDataProvider.fromUrl(
    "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0"
  );
  viewer.scene.primitives.add(i3sData);
} catch (error) {
  console.log(`There was an error creating the I3S Data Provider: ${error}`);
}
try {
  const geoidService = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(
    "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/EGM2008/ImageServer"
  );
  const i3sData = await I3SDataProvider.fromUrl(
    "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0", {
      geoidTiledTerrainProvider: geoidService
  });
  viewer.scene.primitives.add(i3sData);
} catch (error) {
  console.log(`There was an error creating the I3S Data Provider: ${error}`);
}

destroy()

Destroy the WebGL resources held by the object. Destroying an object can release WebGL resources deterministically, rather than relying on a garbage collector to destroy the object.

Once the object is destroyed, it should not be used again; Calling any function other than isDestroyed will result in a Developer Error exception. Therefore, please assign the return value (undefined) to the object using the method shown in the example.

See:
Throws:

The object has been destroyed, i.e. destroy() has been called.

Type
DeveloperError

filterByAttributes(filters){Promise.<void>}

Filter drawing elements in the scene based on specific attribute names and values.

Name Type Default Description
filters Array.<I3SNode.AttributeFilter> [] optional

Collection of attribute filters.

Returns:
Type Description
Promise.<void> Promise resolved when applying filters.

getAttributeNames(){Array.<string>}

Return a collection of names for all available attributes.

Returns:
Type Description
Array.<string> Collection of attribute names.

getAttributeValues(name){Array.<string>}

Returns a collection of values for the specified name attribute.

Name Type Description
name string

Attribute name.

Returns:
Type Description
Array.<string> Collection of attribute values.

isDestroyed(){boolean}

If the object has been destroyed, return true; Otherwise, return false.

If the object has been destroyed, it should not be used; Calling any function other than isDestroyed will result in a Developer Error exception.

See:
Returns:
Type Description
boolean If the object has been destroyed, it is true; Otherwise, it is false.

Type Definitions

ConstructorOptionsObject

The initialization options for the I3SData Provider constructor.

Properties:
Name Type Default Description
name string optional

The name of the I3S dataset.

show boolean true optional

Determine whether the dataset is visible.

geoidTiledTerrainProvider ArcGISTiledElevationTerrainProvider | Promise.<ArcGISTiledElevationTerrainProvider> optional

Provide tile elevation providers for describing the Earth's gravity model. If the provider is defined, the geometry will be displaced based on the provided offset to locate the I3S dataset in the correct position.

cesium3dTilesetOptions Cesium3DTileset.ConstructorOptions optional

An object that contains options passed to Cesium3DTile set created internally. All options in Cesium3DTileset, except for the URL and show attributes, can be used, and the values of these two attributes will be overwritten by the values in I3SDATAProvider.

showFeatures boolean false optional

Determine whether to display the feature.

adjustMaterialAlphaMode boolean false optional

The option to adjust the alpha mode of the material based on the transparency of the vertex color. When true, for geometry with transparency in any color vertex attribute, the alpha mode of the material (if undefined) will be set to BLEND.

applySymbology boolean false optional

Determine whether to parse and apply I3S symbolic styles to the layer.

calculateNormals boolean false optional

Determine whether to generate plane normals for I3S geometry without normals.

Examples
// Increase LOD by reducing SSE
const cesium3dTilesetOptions = {
  maximumScreenSpaceError: 1,
};
const i3sOptions = {
  cesium3dTilesetOptions: cesium3dTilesetOptions,
};
// Set a custom outline color to replace the color defined in I3S symbology
const cesium3dTilesetOptions = {
  outlineColor: Cesium.Color.BLUE,
};
const i3sOptions = {
  cesium3dTilesetOptions: cesium3dTilesetOptions,
  applySymbology: true,
};