ArcGISSceneLayer Class

  • ArcGISSceneLayer
  • class Esri::ArcGISRuntime::ArcGISSceneLayer

    A layer to visualize data from an ArcGIS scene service or a local scene package. More...

    Header: #include <ArcGISSceneLayer.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Layer, Esri::ArcGISRuntime::ApiKeyResource, Esri::ArcGISRuntime::RemoteResource, and Esri::ArcGISRuntime::FloorAware

    Public Functions

    ArcGISSceneLayer(const QUrl &url, QObject *parent = nullptr)
    ArcGISSceneLayer(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    ArcGISSceneLayer(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)
    virtual ~ArcGISSceneLayer() override
    double altitudeOffset() const
    void clearSelection()
    Esri::ArcGISRuntime::SceneLayerDataType dataType() const
    Esri::ArcGISRuntime::FeatureTable *featureTable() const
    bool isLabelsEnabled() const
    Esri::ArcGISRuntime::SceneLayerPolygonFilter *polygonFilter() const
    void resetFeaturesVisible()
    void selectFeature(Esri::ArcGISRuntime::Feature *feature)
    void selectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)
    QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> selectedFeaturesAsync(QObject *parent = nullptr)
    void setAltitudeOffset(double altitudeOffset)
    void setFeatureVisible(Esri::ArcGISRuntime::Feature *feature, bool visible)
    void setFeaturesVisible(const QList<Esri::ArcGISRuntime::Feature *> &features, bool visible)
    void setLabelsEnabled(bool labelsEnabled)
    void setPolygonFilter(Esri::ArcGISRuntime::SceneLayerPolygonFilter *polygonFilter)
    void setSurfacePlacement(Esri::ArcGISRuntime::SurfacePlacement surfacePlacement)
    Esri::ArcGISRuntime::SurfacePlacement surfacePlacement() const
    void unselectFeature(Esri::ArcGISRuntime::Feature *feature)
    void unselectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)

    Reimplemented Public Functions

    virtual QString apiKey() const override
    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual Esri::ArcGISRuntime::LayerFloorDefinition *floorDefinition() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void setApiKey(const QString &apiKey) override
    virtual void setFloorDefinition(Esri::ArcGISRuntime::LayerFloorDefinition *floorDefinition) override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Detailed Description

    Scene layers display content from a scene service or a scene package.

    ArcGISSceneLayer optimized to displaying large amounts of data in a SceneView. It can display data published as scene services, scene layer packages (.slpk), and scene layers in mobile scene packages (.mspk).

    ArcGISSceneLayer supports:

    • 3D Object (e.g. buildings)
    • Integrated mesh (e.g. buildings, trees, and elevation) (see IntegratedMeshLayer)
    • Point features (e.g. trees)

    The scene layer complies with the Indexed 3D Scene layer (I3S) format. It is an open 3D content delivery format used to disseminate 3D GIS data to mobile, web, and desktop clients.

    Functional characteristics

    • 3D object — 3D object scene layers contain objects explicitly modeled in three dimensions and are used to represent objects such as buildings. These features have attributes and can be identified. See the 3D Object Scene Layer for more information.
    • Integrated mesh — 3D mesh data is typically captured by an automated process for constructing 3D objects out of large sets of overlapping imagery. The result integrates the original input image information as a textured mesh including 3D objects, such as buildings and trees, and elevation information. Integrated mesh scene layers are often created for citywide 3D mapping. They can represent something as small as a single building or as large as a city or state. They are often assembled automatically from imagery collected by a drone; they cannot be restyled because there is no underlying feature data. See the Integrated Mesh Scene Layer for more information.
    • Point features — To ensure fast visualization, cached scene layers are used to display large amounts of 3D point data about individual features, such as all the trees in a city. Point scene layers have features that can be identified and that have attributes that may be cached or available from an associated feature layer. The display of point scene layers is automatically thinned to improve performance and visibility at smaller scales and longer distances. Automatic thinning means that not all features are displayed at small scales; as you zoom in, additional features are displayed. See the Point scene layer for more information.

    Point scene layers are generated from point feature layers. Point scene layers can be generated by ArcGIS Pro and hosted as a scene service or scene layer package.

    Note: When publishing a scene from ArcGIS Pro (sharing as a web scene) any point feature layers in the 3D Layers section of the contents pane will be published as a scene service. The scene service will be referenced within the web scene.

    Performance characteristics

    For a scene layer, the rendering of 3D data is based on the current level of detail (LOD), which is determined by the distance from the camera. Each object in a 3D object service is represented differently at various LODs determined by the camera distance. As the camera distance changes in the scene, objects will be displayed appropriately for the current LOD. This results in good client performance and low memory usage, at the expense of frequently loading and unloading objects.

    See also Layer, https://developers.arcgis.com/qt/latest/cpp/sample-code/scene-layer-url/, https://developers.arcgis.com/qt/latest/cpp/sample-code/scene-layer-selection/, and https://developers.arcgis.com/qt/latest/cpp/sample-code/add-a-point-scene-layer/.

    Member Function Documentation

    [explicit] ArcGISSceneLayer::ArcGISSceneLayer(const QUrl &url, QObject *parent = nullptr)

    Creates an ArcGIS scene layer from the specified URL.

    • url - The URL of an ArcGIS scene service, an ArcGIS scene service portal item, or a scene layer package (.slpk) file.
    • parent - The optional parent QObject.

    If the specified URL is a portal item URL (see PortalItem::PortalItem for the supported URL formats), the underlying PortalItem will be created and accessible through Layer::item.

    See also PortalItem, PortalItem::PortalItem, and Layer::item.

    ArcGISSceneLayer::ArcGISSceneLayer(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Constructor that accepts the URL (url), a credential, and an optional parent.

    The URL represents one of the following:

    • A URL to an online service that has the feature data.
    • A URL to an item hosted on ArcGIS Online or ArcGIS Enterprise portal.
    • A local file URL to a scene layer package (.slpk).

    The credential is applied if the provided URL is to a secured service or portal item.

    [explicit] ArcGISSceneLayer::ArcGISSceneLayer(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)

    Constructor that creates a scene layer object with a portal item.

    • item - The scene layer item (only PortalItem are supported).
    • parent - The optional parent QObject.

    The item's type should be PortalItemType::SceneService.

    See also PortalItem, PortalItem::PortalItem, and Layer::item.

    [override virtual] ArcGISSceneLayer::~ArcGISSceneLayer()

    Destructor.

    [since Esri::ArcGISRuntime 100.6] double ArcGISSceneLayer::altitudeOffset() const

    Returns the layer altitude offset.

    This raises or lowers all features in the scene layer by the given offset.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also setAltitudeOffset().

    [override virtual, since Esri::ArcGISRuntime 100.10] QString ArcGISSceneLayer::apiKey() const

    Reimplements: ApiKeyResource::apiKey() const.

    Returns the API key to access API key enabled services and resources in ArcGIS Online.

    An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.

    In addition to setting an ArcGISRuntimeEnvironment::apiKey at a global level for your application, you can set it on any class that implements ApiKeyResource. This overrides the ArcGISRuntimeEnvironment::apiKey and enables more granular usage telemetry and management of ArcGIS location resources used by your app.

    Classes that expose an API key property by implementing ApiKeyResource include:

    See ApiKeyResource.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also setApiKey().

    [since Esri::ArcGISRuntime 100.3] void ArcGISSceneLayer::clearSelection()

    Clears all selected features.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [override virtual] Esri::ArcGISRuntime::Credential *ArcGISSceneLayer::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the security credential used to access the scene service layer.

    Only applicable if the service is secured.

    [since Esri::ArcGISRuntime 100.5] Esri::ArcGISRuntime::SceneLayerDataType ArcGISSceneLayer::dataType() const

    Returns the type of data contained in an ArcGIS scene layer, such as integrated mesh or 3D scene objects.

    This can only be established once the scene layer has loaded.

    This function was introduced in Esri::ArcGISRuntime 100.5.

    [since Esri::ArcGISRuntime 100.3] Esri::ArcGISRuntime::FeatureTable *ArcGISSceneLayer::featureTable() const

    Returns the feature table associated with this ArcGISSceneLayer.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [override virtual, since Esri::ArcGISRuntime 100.13] Esri::ArcGISRuntime::LayerFloorDefinition *ArcGISSceneLayer::floorDefinition() const

    Reimplements: FloorAware::floorDefinition() const.

    Returns the properties that allow a layer to be floor-aware.

    When a layer is configured as floor-aware, it has a floorDefinition property that defines properties that allow a layer to be floor-aware. When it is nullptr (default value) the specific layer does not support floor filtering.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also setFloorDefinition().

    [since Esri::ArcGISRuntime 100.14] bool ArcGISSceneLayer::isLabelsEnabled() const

    Returns true if labels should be displayed, false otherwise.

    Note that this property is only supported for SceneLayerDataType::Point layers.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::SceneLayerPolygonFilter *ArcGISSceneLayer::polygonFilter() const

    Returns the filter to be applied to a feature based ArcGISSceneLayer and include or exclude features within the polygons.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setPolygonFilter() and SceneLayerPolygonFilter.

    [override virtual, since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::RequestConfiguration ArcGISSceneLayer::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration in use by this scene layer.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also setRequestConfiguration().

    [since Esri::ArcGISRuntime 200.2] void ArcGISSceneLayer::resetFeaturesVisible()

    Resets the visibility of all features back to their original state.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 100.3] void ArcGISSceneLayer::selectFeature(Esri::ArcGISRuntime::Feature *feature)

    Selects the given feature and adds it to the current list of selected features.

    • feature - The feature.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [since Esri::ArcGISRuntime 100.3] void ArcGISSceneLayer::selectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)

    Selects the features in the collection and adds them to the current collection of selected features.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> ArcGISSceneLayer::selectedFeaturesAsync(QObject *parent = nullptr)

    Returns a list of the currently selected features.

    • parent - The optional parent QObject

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 100.6] void ArcGISSceneLayer::setAltitudeOffset(double altitudeOffset)

    Sets the altitudeOffset to altitudeOffset.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also altitudeOffset.

    [override virtual, since Esri::ArcGISRuntime 100.10] void ArcGISSceneLayer::setApiKey(const QString &apiKey)

    Reimplements: ApiKeyResource::setApiKey(const QString &apiKey).

    Sets the API key to apiKey.

    See ApiKeyResource.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also apiKey.

    [since Esri::ArcGISRuntime 200.2] void ArcGISSceneLayer::setFeatureVisible(Esri::ArcGISRuntime::Feature *feature, bool visible)

    Sets the visibility of the given feature.

    • feature - The feature.
    • visible - true to show a feature, otherwise false.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] void ArcGISSceneLayer::setFeaturesVisible(const QList<Esri::ArcGISRuntime::Feature *> &features, bool visible)

    Sets the visibility of the given list of features.

    • features - A QList of Feature.
    • visible - true to show the features, otherwise false.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [override virtual, since Esri::ArcGISRuntime 100.13] void ArcGISSceneLayer::setFloorDefinition(Esri::ArcGISRuntime::LayerFloorDefinition *floorDefinition)

    Sets the floorDefinition to floorDefinition.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also floorDefinition.

    [since Esri::ArcGISRuntime 100.14] void ArcGISSceneLayer::setLabelsEnabled(bool labelsEnabled)

    Sets the labelsEnabled to labelsEnabled.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also isLabelsEnabled.

    [since Esri::ArcGISRuntime 200.2] void ArcGISSceneLayer::setPolygonFilter(Esri::ArcGISRuntime::SceneLayerPolygonFilter *polygonFilter)

    Sets the SceneLayerPolygonFilter.

    The SceneLayerPolygonFilter to apply to the ArcGISSceneLayer to include or exclude features within the polygons.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also polygonFilter.

    [override virtual, since Esri::ArcGISRuntime 100.1] void ArcGISSceneLayer::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets configuration parameters used for network requests sent by this scene layer to requestConfiguration.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also requestConfiguration().

    [since Esri::ArcGISRuntime 100.6] void ArcGISSceneLayer::setSurfacePlacement(Esri::ArcGISRuntime::SurfacePlacement surfacePlacement)

    Sets the surfacePlacement to surfacePlacement.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also surfacePlacement.

    [since Esri::ArcGISRuntime 100.6] Esri::ArcGISRuntime::SurfacePlacement ArcGISSceneLayer::surfacePlacement() const

    Returns the surface placement specifies how the layer's data should be placed in relation to the scene's surface.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also setSurfacePlacement().

    [since Esri::ArcGISRuntime 100.3] void ArcGISSceneLayer::unselectFeature(Esri::ArcGISRuntime::Feature *feature)

    Unselects the given feature and removes it from the current collection of selected features.

    • feature - The feature.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [since Esri::ArcGISRuntime 100.3] void ArcGISSceneLayer::unselectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)

    Unselects the features in the given collection and removes them from the current collection of selected features.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [override virtual] QUrl ArcGISSceneLayer::url() const

    Reimplements: RemoteResource::url() const.

    Returns the URL of an ArcGIS scene service or the path to a local scene layer package (.slpk) file.

    The URL is available after the layer has successfully loaded.

    See also ArcGISSceneLayer().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.