You can flatten the terrain in specific places by adding a pushDown
displacement expression to the rasterStyle
of the active elevation layer.
Program: Using the bounding box of a
TileSet3DLayer
model to flatten the terrain under it.
import {orientedBox, pushDown} from "@luciad/ria/util/expression/ExpressionFactory.js";
const displacementBox = tileSet3DLayer.model.orientedBox;
elevationLayer.rasterStyle.displacementExpression = pushDown(orientedBox(displacementBox));
In the expression, you specify a box around the elevation data points that you want to displace. Any data inside that box is pushed down.