Point cloud data can be collected from airborne lidar, terrestrial lidar, mobile mapping, or drone imagery. A point cloud scene layer stores many 3D points, and each point can include attributes such as RGB color, elevation, intensity, classification, and return information.
Use point cloud renderers to control how the points are drawn and use point cloud filters to show only the points that are relevant to the task. Rendering is useful for visualization, such as coloring points by height or classification. Filtering is useful for focusing the scene, such as showing only ground points, vegetation, buildings, or last-return points.
Rendering point clouds
Choose a renderer based on the field you want to visualize:
| Renderer | Use to | Example |
|---|---|---|
| RGB renderer | Display a point cloud layer with RGB values. | Display aerial lidar with imagery colors. |
| Stretch renderer | Map a continuous numeric field to a color ramp. | Color low elevations blue and high elevations red. |
| Class breaks renderer | Group numeric values into ranges. | Show height ranges such as 0-10 m, 10-30 m, and 30+ m. |
| Unique value renderer | Symbolize categorical values. | Color ground, buildings, and trees by classification. |
You can also adjust point size to keep points readable at different viewing distances, and apply color modulation to brighten or darken the renderer by a secondary field such as intensity.
The following example shows the general pattern for applying a renderer. Replace the field names, values, and colors with fields from your point cloud layer.
using Esri.GameEngine.Layers;
using Esri.GameEngine.Layers.PointCloud;
using Esri.Standard;
ArcGISPointCloudLayer pointCloudLayer = new ArcGISPointCloudLayer(
"https://tiles.arcgis.com/tiles/<org-id>/arcgis/rest/services/<service-name>/SceneServer",
"Point cloud",
1.0f,
true,
apiKey);
// Use RGB when the source data includes a color attribute.
pointCloudLayer.Renderer = new ArcGISPointCloudRGBRenderer("RGB");
// Or use a stretch renderer to color a continuous field such as elevation.
var colorStops = new ArcGISCollection<ArcGISPointCloudColorStop>();
colorStops.Add(new ArcGISPointCloudColorStop(new ArcGISRGBColor(42, 43, 238, 255), -1.5) { Label = "< -1.5" });
colorStops.Add(new ArcGISPointCloudColorStop(new ArcGISRGBColor(91, 248, 134, 255), 1.5) { Label = "1.5" });
colorStops.Add(new ArcGISPointCloudColorStop(new ArcGISRGBColor(255, 59, 22, 255), 3.5) { Label = "> 3.5" });
var elevationRenderer = new ArcGISPointCloudStretchRenderer("ELEVATION", colorStops);
pointCloudLayer.Renderer = elevationRenderer;
arcGISMapComponent.Map.Layers.Add(pointCloudLayer);
if (pointCloudLayer.LoadStatus == ArcGISLoadStatus.NotLoaded)
{
pointCloudLayer.Load();
}Filtering point clouds
Filters limit which points are displayed. They do not change the source point cloud data.
| Filter | Use to | Example |
|---|---|---|
| Value filter | Include or exclude values from a numeric or categorical field. | Show only points classified as vegetation or buildings. |
| Bit field filter | Work with datasets that store multiple flags in a packed integer field. | Show only points where the last-return bit is set. Use first returns to highlight the first surface the laser hit, such as tree canopies or rooftops. Use last returns when the lowest returned surface is more important, such as terrain modeling. |
| Return filter | Filter by lidar return type. | Show last returns to emphasize the ground surface. |
The following example applies a value filter to display selected classification values. Use the field names and values from your own point cloud layer.
using Esri.Standard;
using Esri.GameEngine.Layers.PointCloud;
var filters = new ArcGISCollection<ArcGISPointCloudFilter>();
var classCodes = new ArcGISCollection<double>();
classCodes.Add(2); // Ground
classCodes.Add(5); // High vegetation
var classificationFilter = new ArcGISPointCloudValueFilter(
"CLASS_CODE",
classCodes,
ArcGISPointCloudValueFilterMode.Include);
filters.Add(classificationFilter);
// For lidar workflows, you can also filter by return.
var returnTypes = new ArcGISCollection<ArcGISPointCloudReturnsType>();
returnTypes.Add(ArcGISPointCloudReturnsType.Last);
var returnFilter = new ArcGISPointCloudReturnFilter("RETURNS", returnTypes);
filters.Add(returnFilter);
pointCloudLayer.Filters = filters;