Skip to content

KBE3D / KBCore / Cesium / I3SDataProvider

类: I3SDataProvider

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.

<div class="notice"> This object is normally not instantiated directly, use I3SDataProvider.fromUrl. </div>

Examples

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

参数

An object describing initialization options

属性

name

readonly name: string

Gets a human-readable name for this dataset.


show

show: boolean

Determines if the dataset will be shown.


geoidTiledTerrainProvider

readonly geoidTiledTerrainProvider: ArcGISTiledElevationTerrainProvider

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


layers

readonly layers: I3SLayer[]

Gets the collection of layers.


sublayers

readonly sublayers: I3SSublayer[]

Gets the collection of building sublayers.


data

readonly data: any

Gets the I3S data for this object.


extent

readonly extent: Rectangle

Gets the extent covered by this I3S.


resource

readonly resource: Resource

The resource used to fetch the I3S dataset.


showFeatures

readonly showFeatures: boolean

Determines if the features will be shown.


adjustMaterialAlphaMode

readonly adjustMaterialAlphaMode: boolean

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


applySymbology

readonly applySymbology: boolean

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


calculateNormals

readonly calculateNormals: boolean

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

方法

fromUrl()

static fromUrl(url: string | Resource, options: ConstructorOptions): Promise<I3SDataProvider>

Creates an I3SDataProvider. Currently supported I3S versions are 1.6 and 1.7/1.8 (OGC I3S 1.2).

参数

url

The url of the I3S dataset, which should return an I3S scene object

string | Resource

options

ConstructorOptions

An object describing initialization options

返回

Promise<I3SDataProvider>

Examples

ts
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}`);
}
ts
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(): void

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. <p> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example. </p>

返回

void


isDestroyed()

isDestroyed(): boolean

Returns true if this object was destroyed; otherwise, false. <p> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. </p>

返回

boolean

true if this object was destroyed; otherwise, false.


getAttributeNames()

getAttributeNames(): string[]

Returns the collection of names for all available attributes

返回

string[]

The collection of attribute names


getAttributeValues()

getAttributeValues(name: string): string[]

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

参数

name

string

The attribute name

返回

string[]

The collection of attribute values


filterByAttributes()

filterByAttributes(filters?: AttributeFilter[]): Promise<void>

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

参数

filters?

AttributeFilter[]

The collection of attribute filters

返回

Promise<void>

A promise that is resolved when the filter is applied

构造函数

构造函数

new I3SDataProvider(options: ConstructorOptions): I3SDataProvider

参数

options

ConstructorOptions

返回

I3SDataProvider

KBE3D @3.0.0 Copyright © 2024-present KBE3D