I3SDataProvider

new SuperMap3D.I3SDataProvider(options)

I3SDataProvider is the main public class that supports I3S. The currently supported I3S versions are 1.6, 1.7, and 1.8 (same as OGC I3S 1.2). I3SFeature and I3SNode classes support the object model of I3S entities and have a common interface. This object is typically not instantiated directly, but is used by 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:

Members

readonlyadjustMaterialAlphaMode : boolean

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

readonlyapplySymbology : boolean

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

readonlycalculateNormals : boolean

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

readonlydata : object

Gets the I3S data for this object.

readonlyextent : Rectangle

Gets the extent covered by this I3S.

readonlygeoidTiledTerrainProvider : ArcGISTiledElevationTerrainProvider

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

readonlylayers : Array.<I3SLayer>

Gets the collection of layers.

readonlyname : string

Gets a human-readable name for this dataset.

readonlyresource : Resource

The resource used to fetch the I3S dataset.

show : boolean

Determines if the dataset will be shown.

readonlyshowFeatures : boolean

Determines if the features will be shown.

readonlysublayers : Array.<I3SSublayer>

Gets the collection of building sublayers.

Methods

staticSuperMap3D.I3SDataProvider.fromUrl(url, options)Promise.<I3SDataProvider>

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()

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:

filterByAttributes(filters)Promise.<void>

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>

Returns the collection of names for all available attributes
Returns:
The collection of attribute names

getAttributeValues(name)Array.<string>

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

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:

Type Definitions

SuperMap3D.I3SDataProvider.ConstructorOptions

Initialization options for I3SDataProvider´s constructor.
Properties:
Name Type Attributes Default Description
name string <optional>
The name of I3S dataset.
show boolean <optional>
true Determine if the dataset is visible.
geoidTiledTerrainProvider ArcGISTiledElevationTerrainProvider | Promise.<ArcGISTiledElevationTerrainProvider> <optional>
This property describes a tile elevation provider for the Earth´s gravity model. If this provider is defined, the geometry will be diaplaced accroding to the given offset, positioning the I3S dataset in the correct location.
cesium3dTilesetOptions Cesium3DTileset.ConstructorOptions <optional>
An object containing options passed to the internally created Cesium3DTileset. See Cesium3DTileset , all options except for the 'url' and 'show' properties can be used; the values of these two properties will be overridden by the values in I3SDataProvider.
showFeatures boolean <optional>
false Determine if the features are visible.
adjustMaterialAlphaMode boolean <optional>
false
applySymbology boolean <optional>
false Determine whether to parse and apply I3S symbolization styles to the layer.
calculateNormals boolean <optional>
false Determine whether to generate flat normals for I3S geometries that do not have 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,
};