Skip To Content ArcGIS for Developers Sign In Dashboard

LocationDistanceMeasurement Class

(Esri::ArcGISRuntime::LocationDistanceMeasurement)

An analysis object that evaluates direct, vertical, and horizontal distances between two points defined by start and end point locations. More...

Header: #include <LocationDistanceMeasurement>
Since: Esri::ArcGISRuntime 100.3
Inherits: Analysis

Public Functions

LocationDistanceMeasurement(const Point &startLocation, const Point &endLocation, QObject *parent = nullptr)
~LocationDistanceMeasurement()
Distance directDistance() const
Point endLocation() const
Distance horizontalDistance() const
void setEndLocation(const Point &endLocation)
void setStartLocation(const Point &startLocation)
void setUnitSystem(UnitSystem unitSystem)
Point startLocation() const
UnitSystem unitSystem() const
Distance verticalDistance() const

Signals

void measurementChanged(const Esri::ArcGISRuntime::Distance &directDistance, const Esri::ArcGISRuntime::Distance &horizontalDistance, const Esri::ArcGISRuntime::Distance &verticalDistance)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

An analysis object that evaluates direct, vertical, and horizontal distances between two points defined by start and end point locations.

The LocationDistanceMeasurement analysis measures the distance between a start and an end location (each using Point geometry).

Three distance components are calculated:

  • direct distance - the direct distance between the start and end location
  • horizontal distance - the horizontal component of the direct distance
  • vertical distance - the vertical component of the direct distance

See also Distance.

Member Function Documentation

LocationDistanceMeasurement::LocationDistanceMeasurement(const Point &startLocation, const Point &endLocation, QObject *parent = nullptr)

Creates a LocationDistanceMeasurement analysis object that defines a start and an end location using Point objects.

The LocationDistanceMeasurement analysis result is a distance measurement between the start and end locations with direct, horizontal, and vertical components.

  • startLocation - A point that defines the start location of the measurement.
  • endLocation - A point that defines the end location of the measurement.
  • parent - An optional parent.

LocationDistanceMeasurement::~LocationDistanceMeasurement()

Destructor.

Distance LocationDistanceMeasurement::directDistance() const

Returns the direct distance component of the LocationDistanceMeasurement.

The distance's unit will be in the chosen UnitSystem and appropriate for the scale. The value will be empty until the analysis is added to the analysis overlay of a scene view.

See also measurementChanged.

Point LocationDistanceMeasurement::endLocation() const

Returns the end location of the LocationDistanceMeasurement.

The point coordinates (x,y,z) define the end location in 3D space.

See also setEndLocation().

Distance LocationDistanceMeasurement::horizontalDistance() const

Returns the horizontal distance component of the LocationDistanceMeasurement.

The distance's unit will be in the chosen UnitSystem and appropriate for the scale. The value will be empty until the analysis is added to the analysis overlay of a scene view.

See also measurementChanged.

[signal] void LocationDistanceMeasurement::measurementChanged(const Esri::ArcGISRuntime::Distance &directDistance, const Esri::ArcGISRuntime::Distance &horizontalDistance, const Esri::ArcGISRuntime::Distance &verticalDistance)

Signal emitted when any distance calculation component in a LocationDistanceMeasurement analysis has changed.

  • directDistance - The new direct distance calculation.
  • horizontalDistance - The new horizontal distance calculation.
  • verticalDistance - The new vertical distance calculation.

See also Distance.

void LocationDistanceMeasurement::setEndLocation(const Point &endLocation)

Sets the end location of the LocationDistanceMeasurement to endLocation.

The point coordinates (x,y,z) define the end location in 3D space.

See also endLocation().

void LocationDistanceMeasurement::setStartLocation(const Point &startLocation)

Sets the start location of the LocationDistanceMeasurement to startLocation.

The point coordinates (x,y,z) define the start location in 3D space.

See also startLocation().

void LocationDistanceMeasurement::setUnitSystem(UnitSystem unitSystem)

Sets the UnitSystem of the LocationDistanceMeasurement under which distances are calculated to unitSystem.

See also unitSystem().

Point LocationDistanceMeasurement::startLocation() const

Returns the start location of the LocationDistanceMeasurement.

The point coordinates (x,y,z) define the start location in 3D space.

See also setStartLocation().

UnitSystem LocationDistanceMeasurement::unitSystem() const

Returns the UnitSystem of the LocationDistanceMeasurement under which distances are calculated.

See also setUnitSystem().

Distance LocationDistanceMeasurement::verticalDistance() const

Returns the vertical distance component of the LocationDistanceMeasurement.

The distance's unit will be in the chosen UnitSystem and appropriate for the scale. The value will be empty until the analysis is added to the analysis overlay of a scene view.

See also measurementChanged.


Feedback on this topic?