Skip to main content

Roads (flow node)

Use the Roads node to change the color and settings of roads and paths

Written by Holly Conrad Smith

Use this when you want to control the color and visual settings of roads or paths within a flow, for example styling road geometry as part of a site masterplan output.

This is an advanced function. Road and path color is set by Giraffe so roads join nicely. Editing the road color via flow can give unexpected results.

Inputs

This node runs in Transform mode by default, so its settings come from the paired Transform node through the T connector. You can't wire a value straight into a single setting. To drive one setting from your flow, override it with a Write Property node between the Transform node and T, or switch this node to Exposed Inputs to get a connector for each setting.

Name

Abbreviation

Type

Access

Description

Input

I

Feature

List

The input data

Transform

T

Object

Item

Transform controls (overridden by individual parameters)

Outputs

Name

Abbreviation

Type

Access

Description

Primary

P

Object

List

The primary output

How to

  1. Feed in a linestring geometry with the Road usage applied.

  2. Connect the Roads transform to the Roads T input.

  3. Change the defaults for the roads by clicking "edit defaults" on the transform

  4. The result is a road with the selected colors and heights applied

Connect the Roads Transform node

The Roads node needs the Roads Transform node connected to its T connector to use your settings. Without it, the Roads node runs on Giraffe's built-in default settings, and you can't change any of them in Edit Defaults or the Properties Palette.

OR

Use the exposed inputs version of the Roads node, which has its own connector for each setting and needs no transform node.

Roads Transform settings object

The Roads Transform node creates a set of inputs in the Properties Palette for anyone using the flow to fill out. It converts those inputs into a plain JSON object and sends it to the Roads node through the T connector. The object has type set to roads and the settings inside parameters. The values below are the built-in defaults.

{
"type": "roads",
"parameters": {
"roadColor": "<color>",
"pavementColor": "<color>",
"roadHeight": "<number>",
"pavementHeight": "<number>"
}
}

The Roads Transform settings in the Properties Palette show lengths, areas, and volumes in your project units. The JSON always stores them in meters, square meters, and cubic meters, so a value you write into it with Write Property must use those units too.

To drive one setting from elsewhere in your flow, override it with a Write Property node. Put Write Property between the Roads Transform node and the T connector, and set Property to a path like parameters.roadHeight.

Roads Transform

The Roads Transform automatically adds settings to the properties palette. Adjust the settings to change the road rendering.

Road Height: The height of the road geometry.

Road Color: The color of the driving surface

Pavement Height: The height of the footpath/sidewalk

Pavement Color: The color of the walking surface

Use the Roads node with exposed inputs

The exposed inputs version of the Roads node has its own connector for each setting, so you can wire values straight in without a Roads Transform node.

  1. Right-click the Roads node and choose Expose inputs. Giraffe replaces it with the exposed inputs version.

  2. Connect your input to the Feature connector.

  3. Type a value into each setting on the node, or connect a value to its connector. A Number node, a value from another node, or an Input Parameter all work.

  4. To let people using the flow change a setting in the Properties Palette, connect an Input Parameter to it. Settings without an Input Parameter stay hidden.

To get the exposed inputs version every time you add a node, turn on Show exposed inputs when creating new nodes (the gearbox icon) in the flow editor toolbar. Settings don't carry over when you switch between versions.

Roads exposed inputs

Connector

What it does

Feature

Feature to process.

Height

Height of the road.

Color

Color of the road.

Pavement Height

Height of the pavement.

Pavement Color

Color of the pavement.

The exposed inputs version has one output, Roads (R[]), which holds the generated road features.

Healing

Roads only join up with other roads built by the same Roads node. Roads you restyle through a flow are built on their own, so they don't heal into the roads around them:

Write Feature Color and other generic color nodes don't change how a road or path renders. Road and path color comes from the Roads transform's own Road Color and Pavement Color settings.

Did this answer your question?