Skip to content
  • DiscreteFieldFunction
  • class Esri::ArcGISRuntime::DiscreteFieldFunction

    A function that returns a DiscreteField when evaluated. More...

    Header: #include <DiscreteFieldFunction.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~DiscreteFieldFunction() override
    Esri::ArcGISRuntime::DiscreteFieldFunction *abs() const
    Esri::ArcGISRuntime::DiscreteFieldFunction *add(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *add(int value) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *clip(const Esri::ArcGISRuntime::Envelope &extent) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *divide(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *divide(int value) const
    QFuture<Esri::ArcGISRuntime::DiscreteField *> evaluateAsync(QObject *parent = nullptr)
    Esri::ArcGISRuntime::BooleanFieldFunction *hasData() const
    Esri::ArcGISRuntime::BooleanFieldFunction *isEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isEqualTo(int value) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isGreaterThan(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isGreaterThan(int value) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isGreaterThanOrEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isGreaterThanOrEqualTo(int value) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isLessThan(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isLessThan(int value) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isLessThanOrEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isLessThanOrEqualTo(int value) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isNotEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::BooleanFieldFunction *isNotEqualTo(int value) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *mask(Esri::ArcGISRuntime::BooleanFieldFunction *selection) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *multiply(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *multiply(int value) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *replaceIf(Esri::ArcGISRuntime::BooleanFieldFunction *selection, Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *replaceIf(Esri::ArcGISRuntime::BooleanFieldFunction *selection, int value) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *subtract(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const
    Esri::ArcGISRuntime::DiscreteFieldFunction *subtract(int value) const
    Esri::ArcGISRuntime::ContinuousFieldFunction *toContinuousFieldFunction() const

    Static Public Members

    Esri::ArcGISRuntime::DiscreteFieldFunction *create(Esri::ArcGISRuntime::DiscreteField *result, QObject *parent = nullptr)

    Detailed Description

    Use evaluateAsync to compute the result of this function.

    Results are updated when changes are made to parameters of this function (or to parameters of functions from which it is composed).

    Values are represented as 32-bit signed integers, so arithmetic operations will wrap at the boundaries of this type.

    Relevant samples:

    • Apply map algebra: Apply map algebra to an elevation raster to floor, mask, and categorize the elevation values into discrete integer-based categories.

    See also BooleanFieldFunction, ContinuousFieldFunction, DiscreteField, and evaluateAsync.

    Member Function Documentation

    [override virtual noexcept] DiscreteFieldFunction::~DiscreteFieldFunction()

    Destructor.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::abs() const

    Returns a function that returns the absolute value of this function's field result across its extent.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::add(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that adds, point-wise, this function's field result and another across their spatial intersection.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::add(int value) const

    Returns a function that adds, point-wise, a value to this function's field result across its extent.

    • value - The value to add across the field.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::clip(const Esri::ArcGISRuntime::Envelope &extent) const

    Returns compose a function that clips this function's field result such that it does not extend beyond the provided extent.

    • extent - The extent to clip the field to.

    [static] Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::create(Esri::ArcGISRuntime::DiscreteField *result, QObject *parent = nullptr)

    Returns a DiscreteFieldFunction with a predefined result.

    • result - The predefined function result.
    • parent - The optional parent QObject.

    Enables a DiscreteField to be used in contexts that expect a DiscreteFieldFunction by setting the result of the function to be set explicitly.

    Call evaluateAsync to return the given result.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::divide(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that divides, point-wise, this function's field result by another across their spatial intersection.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::divide(int value) const

    Returns a function that divides, point-wise, this function's field result by a value across its extent.

    • value - The value to divide across the field.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    QFuture<Esri::ArcGISRuntime::DiscreteField *> DiscreteFieldFunction::evaluateAsync(QObject *parent = nullptr)

    Evaluates the result of the function with an optional parent.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::hasData() const

    Returns a function that identifies, point-wise, where this function's field result has data across its extent.

    The function result values are true where this function's field result has data.

    The function result values are false where this function's field result has no data.

    All values in the result have data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that indicates if, point-wise, this function's field result is equal to another.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isEqualTo(int value) const

    Returns a function that indicates if, point-wise, this function's field result is equal to a given value.

    • value - The comparison value.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isGreaterThan(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that indicates if, point-wise, this function's field result is greater than another.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isGreaterThan(int value) const

    Returns a function that indicates if, point-wise, this function's field result is greater than a given value.

    • value - The comparison value.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isGreaterThanOrEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that indicates if, point-wise, this function's field result is greater than or equal to another.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isGreaterThanOrEqualTo(int value) const

    Returns a function that indicates if, point-wise, this function's field result is greater than or equal to a given value.

    • value - The comparison value.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isLessThan(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that indicates if, point-wise, this function's field result is less than another.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isLessThan(int value) const

    Returns a function that indicates if, point-wise, this function's field result is less than a given value.

    • value - The comparison value.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isLessThanOrEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that indicates if, point-wise, this function's field result is less than or equal to another.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isLessThanOrEqualTo(int value) const

    Returns a function that indicates if, point-wise, this function's field result is less than or equal to a given value.

    • value - The comparison value.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isNotEqualTo(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that indicates if, point-wise, this function's field result is not equal to another.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::BooleanFieldFunction *DiscreteFieldFunction::isNotEqualTo(int value) const

    Returns a function that indicates if, point-wise, this function's field result is not equal to a given value.

    • value - The comparison value.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::mask(Esri::ArcGISRuntime::BooleanFieldFunction *selection) const

    Returns a function that applies a mask to this function's field result.

    • selection - A selection.

    Where the selection is true, values from this function's field result are preserved. Where the selection is false, the field has no data.

    The function result has no data where this function's field result or the selection has no data.

    The function result extent is the intersection of this function's field result and the selection.

    The spatial reference of this function's field result and the selection must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::multiply(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that multiplies, point-wise, this function's field result and another across their spatial intersection.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::multiply(int value) const

    Returns a function that multiplies, point-wise, this function's field result by a value across its extent.

    • value - The value to multiply across the field.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::replaceIf(Esri::ArcGISRuntime::BooleanFieldFunction *selection, Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that preserves values from this function's field result or replaces them with values from another.

    • selection - A selection.
    • otherField - The discrete field function to draw values from when replacing.

    Values are determined, point-wise, across the spatial intersection of the selection with the union of the two function's field results. Where the selection is true, values from the other field are returned. Where false, values from this function's field result are returned. The function result has no data where the selection or the selected field has no data.

    The function result extent is the intersection of the selection with the union of this function's field result and the other.

    The spatial reference of this function's field result, the other, and the selection must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::replaceIf(Esri::ArcGISRuntime::BooleanFieldFunction *selection, int value) const

    Returns a function that preserves values from this function's field result or replaces them with a constant value.

    • selection - A selection.
    • value - The integer value to be used when replacing.

    Values are determined, point-wise, across the extent of this function's field result based on a selection. Where the selection is true, the specified constant value is returned. Where false, values from this function's field result are returned. The function result has no data where the selection or this function's field result has no data.

    The function result extent is the intersection of the selection with this function's field result.

    The spatial reference of this function's field result and the selection must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::subtract(Esri::ArcGISRuntime::DiscreteFieldFunction *otherField) const

    Returns a function that subtracts, point-wise, another field from this function's field result across their spatial intersection.

    • otherField - Another discrete field function.

    The function result has no data where either of the given fields has no data.

    The function result extent is the intersection of the extents of the given fields.

    The spatial reference of both fields must be equivalent.

    Esri::ArcGISRuntime::DiscreteFieldFunction *DiscreteFieldFunction::subtract(int value) const

    Returns a function that subtracts, point-wise, a value from this function's field result across its extent.

    • value - The value to subtract across the field.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

    Esri::ArcGISRuntime::ContinuousFieldFunction *DiscreteFieldFunction::toContinuousFieldFunction() const

    Returns a function that casts, point-wise, integer values from this function's field result to floating-point values across its extent.

    The function result has no data where this function's field result has no data.

    The function result extent equals that of this function's field result.

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