GeoprocessingLinearUnit Class

  • GeoprocessingLinearUnit
  • class Esri::ArcGISRuntime::GeoprocessingLinearUnit

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

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

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

    Detailed Description

    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(double distance, Esri::ArcGISRuntime::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(double distance, const Esri::ArcGISRuntime::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, Esri::ArcGISRuntime::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, QObject *parent = nullptr)

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

    GeoprocessingLinearUnit::GeoprocessingLinearUnit(QObject *parent = nullptr)

    Constructor that accepts an optional parent object.

    [override virtual] GeoprocessingLinearUnit::~GeoprocessingLinearUnit()

    Destructor.

    double GeoprocessingLinearUnit::distance() const

    Returns the distance value of the parameter.

    See also setDistance().

    Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::GeoprocessingLinearUnits unit)

    Sets the distance value's units to unit.

    See also unit().

    Esri::ArcGISRuntime::GeoprocessingLinearUnits GeoprocessingLinearUnit::unit() const

    Returns the distance value's units.

    See also setUnit().

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