Skip to content

ElevationProfileResult

ESM: import ElevationProfileResult from "@arcgis/core/views/analysis/ElevationProfile/ElevationProfileResult.js";
CDN: const ElevationProfileResult = await $arcgis.import("@arcgis/core/views/analysis/ElevationProfile/ElevationProfileResult.js");
Class: @arcgis/core/views/analysis/ElevationProfile/ElevationProfileResult
Inheritance: ElevationProfileResult→Accessor
Since: ArcGIS Maps SDK for JavaScript 4.34
beta

Represents the result for each profile line configured in the ElevationProfileAnalysis.profiles collection. This result is initialized by the analysis view and is dynamically updated as the elevation profile is generated.

See also

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
Name Type Summary Class

Indicates whether the line is available.

ElevationProfileResult

The name of the class.

Accessor

The profile line whose elevation is represented by this result.

ElevationProfileResult

Represents the progress of the elevation profile generation, ranging from 0 to 1.

ElevationProfileResult

Contains the samples that make up the elevation profile.

ElevationProfileResult

Provides statistics about the elevation profile, including minimum, maximum, and average elevation values, elevation gain and loss, and slope information.

ElevationProfileResult

Property Details

available

Property
available Booleanreadonly

Indicates whether the line is available. Unavailable lines are not sampled or displayed, and the corresponding samples and statistics will be empty.

Availability rules for each line type:

  • ground: Available if any ground layers are visible.
  • input: Always available.
  • query: Available if the source is visible and any layers in that source (e.g. ground elevation layers) are also visible.
  • scene: Always available in 3D.

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

The profile line whose elevation is represented by this result.

progress

Property
progress Numberreadonly

Represents the progress of the elevation profile generation, ranging from 0 to 1.

samples

Property
samples Sample[] |null |undefinedreadonly

Contains the samples that make up the elevation profile. Each sample represents a point along the profile.

The distance and elevation values are given in the effective units specified in ElevationProfileAnalysisView2D.effectiveDisplayUnits or ElevationProfileAnalysisView3D.effectiveDisplayUnits.

statistics

Property
statistics Statistics |null |undefinedreadonly

Provides statistics about the elevation profile, including minimum, maximum, and average elevation values, elevation gain and loss, and slope information.

The distance and elevation values are given in the effective units specified in ElevationProfileAnalysisView2D.effectiveDisplayUnits or ElevationProfileAnalysisView3D.effectiveDisplayUnits.

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

Accessor
this

Creates a deep clone of this object.

ElevationProfileResult

Returns true if a named group of handles exist.

Accessor

Removes a group of handles owned by the object.

Accessor

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
Inherited from Accessor

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

clone

Method
clone(){this}

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
Type Description
this A deep clone of the class instance that invoked this method.

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

Type Definitions

Sample

Type Definition
Sample Object

Represents an elevation sample in the profile.

Properties
x Number

The x coordinate of the sample, in the spatial reference of the view.

y Number

The y coordinate of the sample, in the spatial reference of the view.

optional

The z coordinate of the sample, in the spatial reference of the view.

distance Number

Horizontal (2D) distance from the beginning of the path, in the effective units. In geographic coordinate systems (GCS) and in WebMercator, the distance is the geodesic distance. In projected coordinate systems (PCS), apart from WebMercator, the distance is computed in a Euclidean manner (in the respective PCS).

elevation Number|null|undefined
optional

The elevation of the sample, in the effective units.

Statistics

Type Definition
Statistics Object

Represents the statistics for the generated profile line.

Properties
maxDistance Number|null|undefined

The maximum horizontal (2D) distance of the path. In geographic coordinate systems (GCS) and in WebMercator, the distance is the geodesic distance. In projected coordinate systems (PCS), apart from WebMercator, the distance is computed in a Euclidean manner (in the respective PCS).

minElevation Number|null|undefined

The minimum elevation along the path.

maxElevation Number|null|undefined

The maximum elevation along the path.

avgElevation Number|null|undefined

The average elevation along the path.

elevationGain Number|null|undefined

The cumulative elevation gain along the path.

elevationLoss Number|null|undefined

The cumulative elevation loss along the path.

maxPositiveSlope Number|null|undefined

The maximum positive slope along the path. Profiles are sampled at a minimum distance of 10 meters (32.8 feet). Higher resolution profiles are downsampled to that minimum sampling distance before calculating the slope.

avgPositiveSlope Number|null|undefined

The average positive slope along the path. Profiles are sampled at a minimum distance of 10 meters (32.8 feet). Higher resolution profiles are downsampled to that minimum sampling distance before calculating the slope.

maxNegativeSlope Number|null|undefined

The maximum negative slope along the path. Profiles are sampled at a minimum distance of 10 meters (32.8 feet). Higher resolution profiles are downsampled to that minimum sampling distance before calculating the slope.

avgNegativeSlope Number|null|undefined

The average negative slope along the path. Profiles are sampled at a minimum distance of 10 meters (32.8 feet). Higher resolution profiles are downsampled to that minimum sampling distance before calculating the slope.

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