# I3SDataProvider

#### new Cesium.I3SDataProvider(options)
engine/Source/Scene/I3SDataProvider.js 141

An I3SDataProvider is the main public class for I3S support. The url option should return a scene object. Currently supported I3S versions are 1.6 and 1.7/1.8 (OGC I3S 1.2). I3SFeature and I3SNode classes implement the Object Model for I3S entities, with public interfaces.
This object is normally not instantiated directly, use `I3SDataProvider.fromUrl`.

Name | Type | Description
--- | --- | ---
`options` | I3SDataProvider.ConstructorOptions | An object describing initialization options

##### 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}`);
    }

##### See:

- I3SDataProvider.fromUrl
- ArcGISTiledElevationTerrainProvider

### Members

#### readonly adjustMaterialAlphaMode : boolean
engine/Source/Scene/I3SDataProvider.js 300

Determines if the alpha mode of the material will be adjusted depending on the color vertex attribute.

#### readonly applySymbology : boolean
engine/Source/Scene/I3SDataProvider.js 312

Determines if the I3S symbology will be parsed and applied for the layers.

#### readonly calculateNormals : boolean
engine/Source/Scene/I3SDataProvider.js 324

Determines if the flat normals will be generated for I3S geometry without normals.

#### readonly data : object
engine/Source/Scene/I3SDataProvider.js 252

Gets the I3S data for this object.

#### readonly extent : Rectangle
engine/Source/Scene/I3SDataProvider.js 264

Gets the extent covered by this I3S.

#### readonly geoidTiledTerrainProvider : ArcGISTiledElevationTerrainProvider
engine/Source/Scene/I3SDataProvider.js 216

The terrain provider referencing the GEOID service to be used for orthometric to ellipsoidal conversion.

#### readonly layers : Array.<I3SLayer>
engine/Source/Scene/I3SDataProvider.js 228

Gets the collection of layers.

#### readonly name : string
engine/Source/Scene/I3SDataProvider.js 181

Gets a human-readable name for this dataset.

#### readonly resource : Resource
engine/Source/Scene/I3SDataProvider.js 276

The resource used to fetch the I3S dataset.

#### show : boolean
engine/Source/Scene/I3SDataProvider.js 192

Determines if the dataset will be shown.

#### readonly showFeatures : boolean
engine/Source/Scene/I3SDataProvider.js 288

Determines if the features will be shown.

#### readonly sublayers : Array.<I3SSublayer>
engine/Source/Scene/I3SDataProvider.js 240

Gets the collection of building sublayers.

### Methods

#### static Cesium.I3SDataProvider.fromUrl(url, options) → Promise.<I3SDataProvider>
engine/Source/Scene/I3SDataProvider.js 540

Creates an I3SDataProvider. 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, which should return an I3S scene object
`options` | I3SDataProvider.ConstructorOptions | An object describing initialization options

##### Returns:

##### 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()
engine/Source/Scene/I3SDataProvider.js 344

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

Once an object is destroyed, it should not be used; calling any function other than `isDestroyed` will result in a `DeveloperError` exception. Therefore, assign the return value (`undefined`) to the object as done in the example.

##### Throws:

- DeveloperError : This object was destroyed, i.e., destroy() was called.

##### See:

- I3SDataProvider#isDestroyed

#### filterByAttributes(filters) → Promise.<void>
engine/Source/Scene/I3SDataProvider.js 856

Filters the drawn elements of a scene to specific attribute names and values

Name | Type | Default | Description
--- | --- | --- | ---
`filters` | Array.<I3SNode.AttributeFilter> | `[]` | optional The collection of attribute filters

##### Returns:

A promise that is resolved when the filter is applied

#### getAttributeNames() → Array.<string>
engine/Source/Scene/I3SDataProvider.js 824

Returns the collection of names for all available attributes

##### Returns:

The collection of attribute names

#### getAttributeValues(name) → Array.<string>
engine/Source/Scene/I3SDataProvider.js 837

Returns the collection of values for the attribute with the given name

Name | Type | Description
--- | --- | ---
`name` | string | The attribute name

##### Returns:

The collection of attribute values

#### isDestroyed() → boolean
engine/Source/Scene/I3SDataProvider.js 365

Returns true if this object was destroyed; otherwise, false.

If this object was destroyed, it should not be used; calling any function other than `isDestroyed` will result in a `DeveloperError` exception.

##### Returns:

`true` if this object was destroyed; otherwise, `false`.

##### See:

- I3SDataProvider#destroy

### Type Definitions

#### Cesium.I3SDataProvider.ConstructorOptions
engine/Source/Scene/I3SDataProvider.js 65

Initialization options for the I3SDataProvider constructor

##### Properties:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`name` | string | <optional> |  | The name of the I3S dataset.
`show` | boolean | <optional> | true | Determines if the dataset will be shown.
`geoidTiledTerrainProvider` | ArcGISTiledElevationTerrainProvider | Promise.<ArcGISTiledElevationTerrainProvider> | <optional> |  | Tiled elevation provider describing an Earth Gravitational Model. If defined, geometry will be shifted based on the offsets given by this provider. Required to position I3S data sets with gravity-related height at the correct location.
`cesium3dTilesetOptions` | Cesium3DTileset.ConstructorOptions | <optional> |  | Object containing options to pass to an internally created `Cesium3DTileset`. See `Cesium3DTileset` for list of valid properties. All options can be used with the exception of `url` and `show` which are overridden by values from I3SDataProvider.
`showFeatures` | boolean | <optional> | false | Determines if the features will be shown.
`adjustMaterialAlphaMode` | boolean | <optional> | false | The option to adjust the alpha mode of the material based on the transparency of the vertex color. When `true`, the alpha mode of the material (if not defined) will be set to BLEND for geometry with any transparency in the color vertex attribute.
`applySymbology` | boolean | <optional> | false | Determines if the I3S symbology will be parsed and applied for the layers.
`calculateNormals` | boolean | <optional> | false | Determines if the flat normals will be generated 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,
    };

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.