Skip to main content

Modify Feature Property

Add to, subtract from, multiply, divide or set a numeric property on a geometry

Written by Holly Conrad Smith

Use this when you want to change a number on a geometry within a flow, for example lifting buildings onto a podium by adding to their base height, scaling a unit count, or setting a value outright. The Modify Feature Property node applies one math operation to one property and passes the geometry on.

Category: Objects

Kind: Operation

Description: Apply an operator (+ - * / % ** =) to a numeric property of a geometry. "=" sets the value.

Inputs

Name

Abbreviation

Type

Access

Description

Feature

F

Feature

Item

The geometry to change. Connect a list to change every geometry in it.

Property

P

String

Item

The name of the property to change, for example baseHeight.

Operator

O

String

Item

The math to apply. The default is +.

Value

V

Number

Item

The number to apply. The default is 1.

Outputs

Name

Abbreviation

Type

Access

Description

Feature

F

Feature

Item

The geometry with the property changed. A list in gives a list out.

Warnings and errors

Message

Cause

Fix

no property provided, feature left unchanged

Property is empty.

Enter the property to change.

unsupported operator "<operator>". Use one of: + - * / % ** =

The operator is not one the node knows.

Use one of the listed operators. You can also write them as +=, -= and so on, and ^ for powers.

How to

  1. Open the flow in the Flow Builder and add the Modify Feature Property node.

  2. Connect a geometry, or a list of geometries, to the Feature connector.

  3. Type the property name into Property, for example baseHeight.

  4. Type an operator into Operator and a number into Value, or connect nodes to them.

  5. Connect the output to Write Features, or to the next node in your flow.

Operators

Type one of these operators into the Operator input. The examples start from a property of 10 and a value of 2.

Operator

What it does

Result

+

Adds the value.

12

-

Subtracts the value.

8

*

Multiplies by the value.

20

/

Divides by the value.

5

%

Returns the remainder after dividing by the value.

0

**

Raises the property to the power of the value. ^ works too.

100

=

Sets the property to the value.

2

Compound forms like +=, -=, *= and /= work the same as the plain operators. Spaces around the operator are ignored, and an empty Operator counts as +.

How Modify Feature Property handles edge cases

  • A property that doesn't exist yet counts as 0. Adding 2 to a missing property creates it with a value of 2.

  • Use a dot to reach a nested property, for example a.b.

  • The node never changes the original geometry. It outputs a changed copy.

  • Dividing by 0 returns Infinity, and % by 0 returns NaN. Guard the value upstream if it can reach 0.

Modify Feature Property works on numbers. A text property gives an unexpected result: adding 1 to the text "10" returns "101". Make sure the property holds a number.

Did this answer your question?