A local scene provides a three-dimensional (3D) visualization mode that displays data on a flat plane using a local projected coordinate system. Like global scenes, they can be shared across the ArcGIS system and beyond. Local scenes are ideally used to display data at the city or campus-level for site-specific rendering. Local scenes allow for accurate measurement, subsurface viewing, and improved performance for limited spatial extensions.
You can use a local scene and LocalSceneView to:
- Display a basemap layer such as streets or satellite imagery.
- Access and display data layers based on files or services, including data you have authored.
- Display terrain with an elevation layer.
- Display real-world objects such as buildings or trees.
- Display 3D visualizations of 2D objects.
- Measure distance and explore spatial relationships between geometries using the
GeometryEngineAPI.
Scene
The introduction explained the concept of a scene and how it works. The Scene is your entry point into the API when working with three dimensional data. However, when working with local scenes, you connect them with LocalSceneView in order to display the data within an application. Remember that when you are working with local scenes, the SceneViewingMode is set to local. When creating a scene programmatically, the viewing mode needs to be set.
If consuming a local web scene item from a portal, this information is gathered from the item's definition for you. Note that if the SceneViewingMode is set to global, consult the global scene overview topic for details, as this differs from working with a local scene. Logically, when programmatically building a local scene, the next step is to add layers to your local scene.
Layer
Each layer in a local scene references projected data, either from an online service or from a local dataset contained in a scene package. There are a variety of layers that can be added to a local scene, each designed to display a particular type of data. For example, some layers display images, such as satellite photos or aerial photography, while others are used to display building footprints or trees.
Local scenes can also contain scene layers enabling you to create advanced 3D visualizations. Scene layers can contain one of four data types: points, 3D objects, integrated meshes, or building scene layers.
The Layer class is the base class for all types of layers used in ArcGIS Maps SDK for .NET. The type of layer you create depends on the type of data you want to display and what is supported. For example, to display a scene layer you can create an ArcGISSceneLayer that references an online portal item.
When working with local scene views, it is useful to define an area for the scene to be clipped to. The clipping area defines the boundaries of a local scene. When it is defined, only data (including the basemap) inside the specified area is displayed. Be sure to enable the clipping area to apply the extent to the view.
Camera
Local scenes and local scene views extend the concept of two dimensional viewpoints with a camera that represents the observer's position and perspective within three dimensions.
The following properties define the camera position:
- Projected location on the surface
- Altitude (height, in units defined by the
SpatialReference) - Heading (angle about the z axis the camera is rotated, in degrees)
- Pitch (angle the camera is rotated up or down, in degrees)
- Roll (angle the camera is rotated side-to-side, in degrees)
LocalSceneView
A local scene view is a user interface control that displays a single local scene in your application. It contains built-in functionality that allows the user to explore the local scene by zooming in and out or panning and rotating in the local scene.
After creating a local scene view, you typically set the scene and the camera position. Unlike a map, a local scene uses a camera to define the viewer's perspective and to determine the visible area. The perspective is defined by setting the camera's location, altitude (height), heading, and tilt.
Add Scene to LocalSceneView to display it. Changes you make to the scene, such as adding, removing, or reordering layers, will immediately be reflected in the display. The Scene.InitialViewpoint will determine the area shown when the scene loads.
A LocalSceneView also allows you to:
- Adjust light, atmosphere, and space effects.
- Identify and select features using a mouse or tap location (
ArcGISSceneLayerandBuildingSceneLayer). - Export an image of the current display.
LocalSceneView errors
View errors
The LocalSceneView supports errors that helps to capture different situations and provides useful messages to help troubleshoot related problems that may arise. Ultimately, you decide what you want to do with the error. For example, you may decide to enter the information into a log for further examination as users report problems with your application.
Critical error
A critical error means that the LocalSceneView has reached an unusable state from which it cannot recover.
GeoModel error
When working with LocalSceneView there are situations that arise when the view is in a usable state, but nothing is displayed because the GeoModel is not configured correctly.
Warnings
Warnings indicate that the LocalSceneView is in a usable state, but something may not look correct or as expected.