Skip To Content ArcGIS for Developers Sign In Dashboard

GeoprocessingLinearUnit Class

(Esri::ArcGISRuntime::GeoprocessingLinearUnit)

A linear unit input or output parameter. More...

Header: #include <GeoprocessingLinearUnit>
Since: Esri::ArcGISRuntime 100.0
Inherits: GeoprocessingParameter

Public Functions

GeoprocessingLinearUnit(QObject *parent = nullptr)
GeoprocessingLinearUnit(double distance, QObject *parent = nullptr)
GeoprocessingLinearUnit(double distance, GeoprocessingLinearUnits geoprocessingUnit, QObject *parent = nullptr)
GeoprocessingLinearUnit(double distance, const LinearUnit &unit, QObject *parent = nullptr)
GeoprocessingLinearUnit(double distance, LinearUnitId unitId, QObject *parent = nullptr)
~GeoprocessingLinearUnit()
double distance() const
LinearUnit linearUnit() const
void setDistance(double distance)
void setUnit(GeoprocessingLinearUnits unit)
GeoprocessingLinearUnits unit() const

Additional Inherited Members

Detailed Description

A linear unit input or output parameter.

Geoprocessing tasks support a set of linear units defined in the GeoprocessingLinearUnits enumeration.

When a GeoprocessingLinearUnit parameter is created with one of the supported GeoprocessingLinearUnits, the value is sent to the service using the defined linear unit type.

When a GeoprocessingLinearUnit object is created with a LinearUnit, the value is converted to meters if the type is not supported. For example if provided LinearUnit is international miles, the value is converted to meters since only the US Survey Miles unit is supported in geoprocessing. After the GeoprocessingLinearUnit object is created, the used linear unit type can be checked from the unit property.

When a GeoprocessingLinearUnit object is created with a supported LinearUnit, then no conversion takes place and the value is sent to the service using the defined type.

When GeoprocessingLinearUnit is returned as an output parameter, you can get LinearUnit using the linearUnit property.

Member Function Documentation

GeoprocessingLinearUnit::GeoprocessingLinearUnit(QObject *parent = nullptr)

Constructor that accepts an optional parent object.

GeoprocessingLinearUnit::GeoprocessingLinearUnit(double distance, QObject *parent = nullptr)

Constructor that accepts a distance in meters and an optional parent object.

GeoprocessingLinearUnit::GeoprocessingLinearUnit(double distance, GeoprocessingLinearUnits geoprocessingUnit, QObject *parent = nullptr)

Constructor that accepts a distance value, the units of distance as a GeoprocessingLinearUnits (geoprocessingUnit), and an optional parent object.

GeoprocessingLinearUnit::GeoprocessingLinearUnit(double distance, const LinearUnit &unit, QObject *parent = nullptr)

Constructor that accepts a distance value, the units of distance as a LinearUnit object (unit), and an optional parent object.

If the provided linearUnit is not supported by the geoprocessing task, the distance value is converted to meters before creating this object.

GeoprocessingLinearUnit::GeoprocessingLinearUnit(double distance, LinearUnitId unitId, QObject *parent = nullptr)

Constructor that accepts a distance value, the units of distance as a LinearUnitId enumeration (unitId), and an optional parent object.

If the provided linearUnitId is not supported by the geoprocessing task, the distance value is converted to meters before creating this object.

GeoprocessingLinearUnit::~GeoprocessingLinearUnit()

Destructor.

double GeoprocessingLinearUnit::distance() const

Returns the distance value of the parameter.

See also setDistance().

LinearUnit GeoprocessingLinearUnit::linearUnit() const

Returns the LinearUnit associated with the distance value.

void GeoprocessingLinearUnit::setDistance(double distance)

Sets the distance value of the parameter to distance.

See also distance().

void GeoprocessingLinearUnit::setUnit(GeoprocessingLinearUnits unit)

Sets the distance value's units to unit.

See also unit().

GeoprocessingLinearUnits GeoprocessingLinearUnit::unit() const

Returns the distance value's units.

See also setUnit().


Feedback on this topic?