Link Search Menu Expand Document

πŸ– Compare Nearest (Numeric)

PCGEx | Filter : Compare Nearest (Numeric)

The **Numeric Comparison Filter compares the arithmetic value of an attribute against the closest point from another dataset.**

-


Targets
Targets that will be checked for nearest match.
Filter
A single filter definition

Table of content


The Compare Nearest (Numeric) compares two attributes against each other; the second operand being a different attribute on another set of point, with comparison being based on distance.

Note that each value is converted to a double under the hood, so you can’t compare multi-component value with it.

details/filter-ecosystem/filter-compare-numeric-lead.png

Properties


Property Description
Operand A
Operand A The first attribute of the comparison.
This value is read on the targets.
Comparison
Comparison How to compare A against B.
See Numeric comparisons.
Operand B
Compare Against Type of operand B. Can be a per-point Attribute, or an easily overridable Constant.
Operand B
(Constant or Attribute)
Operand B, or second value to compare to the first.
Tolerance Equality tolerance for near-value comparisons.

Comparison modes


Comparison Data
== Strictly equal.
!= Strictly not equal.
>= Equal or greater.
<= Equal or smaller.
> Strictly greater.
< Strictly smaller.
~= Nearly equal.
!~= Nearly not equal.

Approximative comparison will reveal an additional parameter, dubbed Tolerance. This represents the size of acceptable approximation for the comparison to pass. For example, when checking if 0.5 ~= 0.4 with a tolerance of 0.1 will return true.

Large tolerances can be a great, cheap way to achieve results akin to a β€œwithin range” comparison!