A guide to scene layers

What are scene layers?

Scene layers are mainly used for displaying large amounts of 3D data in a scene. A scene layer can be one of five layer types: a point scene layer, a point cloud scene layer, a 3D object scene layer, a building scene layer or an integrated mesh scene layer.

Levels of detail for scene layers

To improve performance scene layers are usually rendered with several levels of detail. At larger scales (close to the ground) all the geometry is loaded and displayed. When zooming out much coarser representations of the geometry with fewer vertices and smaller textures are shown to still have good performance. In addition to that some features are also removed, a process usually referred to as feature thinning.

For point scene layers and point cloud layers feature thinning is applied, so at smaller scales points are removed from display.

3D Object scene layers are mainly used for displaying 3D features like buildings and other elements of a city scene. We refer to this type of geometry as a 3D Object. You can use this type of layer for realistic views of a city or for data visualization.

Point scene layers are designed for displaying large amounts of point data, up to millions of points.

Publishing

A SceneLayer behaves just like the other layers, they can be styled with renderers, queried for attributes, but they have a more complicated internal logic. Every feature has a set of attributes that can be used to create visualizations or simply display the attributes in a popup for more information.

SceneLayers will have limited access to attributes depending on how they were published. Here is a breakdown on the two workflows for publishing these layers:

SceneLayer with cached attributes only

SceneLayer with associated feature layer

Definition - a SceneLayer where attributes are only stored in the cache of the service. The user can configure which attributes will be stored in the cache. See ArcGIS Pro documentation for this configuration. In this case only loaded features have access to the attributes, so it's impossible to make queries on the whole dataset. This type of layer can be used for styling buildings or displaying information about features in the view.

Definition - a SceneLayer that besides having cached attributes, it is also connected to a feature layer where the attributes are stored. In this case the attributes configured for the cache will also appear in the associated feature layer. When publishing layers like this, all features have access to all attributes and complex queries on the layer are supported.

Publishing:

When uploading a scene layer package to ArcGIS Online or Portal (created with ArcGIS Pro, City Engine or third party software). See documentation for Portal and for ArcGIS Online.

Publishing:

In Portal when publishing a scene layer directly from ArcGIS Pro (see documentation).

In ArcGIS Online with an Organizational account with a publisher role when publishing a scene layer from a feature layer. (see documentation).

Where do attributes come from?

Renderers, visual variables, popups, labels, filters and queries retrieve attributes either from the cache or from the associated feature layer, depending on how layers are published. The following table summarizes this behavior.

SceneLayer with cached attributes only

SceneLayer with associated feature layer

Renderers / Visual variables

Cache attributes are used.

Cache attributes are used. Any updates on the associated feature layer will not be applied to the renderers/visual variables.

Filter

Cache attributes are used.

Cache attributes are used. Any updates in the associated feature layer will not be applied to the filter.

Labels

Cache attributes are used.

Cache attributes are used. Any updates in the associated feature layer will not update the labels.

Query gets results from cache attributes for currently loaded features.

Query gets results from attributes on the associated feature layer if outFields is specified. Otherwise available attributes from the cache are returned.

For details about each of these features, read the description of the SceneLayer class.

Tips and tricks

How can I get statistics on attribute values?

You can use the smartMapping summaryStatistics method on the SceneLayer. If the layer doesn't have an associated feature layer, then statistics are only displayed for the features that are loaded in the view.

How do I know what functionality my SceneLayer supports?

For each field you can use the getFieldUsageInfo() method to find out whether popups, labels, renderers or queries using that field are supported:

sceneLayer.then(function(){
// get information on whether `OBJECTID` is available for query:console.log(sceneLayer.getFieldUsageInfo('OBJECTID'));
// the result shows that layer queries are not available for this field// this means that either the associated feature layer is not available// or that the field can't be found in the associated feature layer/* Object {
supportsLabelingInfo: true,
supportsLayerQuery: false,
supportsPopupTemplate: true,
supportsRenderer: true
}*/// query layer for features
sceneLayer.queryFeatures()
.then(function(result) {
console.log(result);
})
.otherwise(function(err) {
console.log(err)
});
// querying the layer will result in an error:// message: "SceneLayer queries are not available without associated feature layer",// name: "scenelayer:query-not-available",
});