Show / Hide Table of Contents

Method ReplaceIf

ReplaceIf(BooleanFieldFunction, bool)

Composes a function that preserves values from this function's field result or replaces them with a constant value, point-wise across the extent of this function's field result based on a selection.

Declaration
public BooleanFieldFunction ReplaceIf(BooleanFieldFunction selection, bool value)
Parameters
Type Name Description
BooleanFieldFunction selection

A selection.

bool value

The boolean value to be used when replacing.

Returns
Type Description
BooleanFieldFunction

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

Remarks

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.

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300

ReplaceIf(BooleanFieldFunction, BooleanFieldFunction)

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

Declaration
public BooleanFieldFunction ReplaceIf(BooleanFieldFunction selection, BooleanFieldFunction otherField)
Parameters
Type Name Description
BooleanFieldFunction selection

A selection.

BooleanFieldFunction otherField

The boolean field to draw values from when replacing.

Returns
Type Description
BooleanFieldFunction

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

Remarks

Values are replaced, point-wise across the spatial intersection of the selection with the union of the two function's field results. The function result extent is the intersection of the selection with the union of this function's field result and the other. 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 spatial reference of this function's field result, the other, and the selection must be equivalent.

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300
In this article
Provide feedback
Back to top Copyright © 2025 Esri.