Skip to main content

Aspect Analysis

DMap3D.analysis.aspectAnalyse is used to analyze the aspect (orientation) of terrain surfaces, visually displaying the slope face distribution in all directions through color gradients.

Import​

import DMap3D from 'dmap3d'
import * as Cesium from 'cesium'

Basic Usage​

const viewer = new Cesium.Viewer('cesiumContainer')

// Create aspect analysis tool
const aspect = new DMap3D.analysis.aspectAnalyse(viewer)

// Show aspect analysis
aspect.show()

Constructor​

new DMap3D.analysis.aspectAnalyse(viewer, options?)​

Parameters:

  • viewer - Cesium.Viewer instance
  • options? - Optional configuration

Options:

interface AspectOptions {
color?: string // Color configuration
isActive?: boolean // Whether to activate by default
}

Methods​

show()​

Show the aspect analysis effect.

aspect.show()

hide()​

Hide the aspect analysis effect.

aspect.hide()

destroy()​

Destroy the tool and release resources.

aspect.destroy()

Complete Example​

const viewer = new Cesium.Viewer('cesiumContainer')

// Create aspect analysis tool
const aspect = new DMap3D.analysis.aspectAnalyse(viewer)

// Show aspect analysis
aspect.show()

// Hide
aspect.hide()

// Destroy
aspect.destroy()