FME Transformers: 2024.2
FME Transformers: 2024.2
SurfaceModeller
Constructs a Delaunay triangulation based on input points and breaklines.
The surface model may be output in a variety of representations, such as a triangulated irregular network (TIN), TIN vertices, triangles, digital elevation model (DEM), and contours. Because the surface model is a Delaunay triangulation, it can also be output as its dual – a Voronoi diagram.
Example
Usage Notes
-
To produce a digital elevation model in either points or raster format, see the DEMGenerator or RasterDEMGenerator.
-
It is important to note that if the only thing you want to do with an existing surface model is output information, then you must route a feature into the surface model. The easiest way to do this is to simply use the Creator transformer and route a single feature with a null geometry into the DrapeFeatures input port.
Configuration
Input Ports
Points/Lines
These input features may be 2D or 3D. Other than points, lines and area geometries, they may also be raster, point cloud, and aggregate geometries.
2D features will be forced to 3D by adding a z value of 0. In most cases, all points extracted from this port will be found in the vertex pool of the underlying surface model. A minimum of 3 unique points are required to construct a surface model. Points with duplicate x and y values will be dropped.
Breaklines
These input features may be 2D or 3D, and may reside inside an aggregate structure.
2D features will be forced to 3D by adding a z value of 0. Breakline edges will be found in the edge pool of the underlying surface model. Sometimes, a breakline edge will be split up to allow an optimal triangulation of the surface model. Points with duplicate x and y values will be dropped.
DrapeFeatures
These input features may be 2D or 3D. If they are 3D, their z values will be overwritten. Features input through this port are output via the DrapedFeatures output port with their z values set to interpolated values on the underlying surface model.
Output Ports
Contours
This output port produces 3D contour lines with elevation values also stored as attributes.
DEMPoints
This output port samples the underlying surface model according to the sampling rates specified in Output DEM X Cell Spacing, and Output DEM Y Cell Spacing, and produces a set of evenly spaced 3D points.
DEMRaster
This output port samples the underlying surface model according to the sampling rates specified in Output DEM X Cell Spacing, and Output DEM Y Cell Spacing, and produces a single raster feature consisting of evenly spaced 3D points arranged by rows and columns.
DrapedFeatures
This output port produces features input through the DrapeFeatures port, with their z values set to interpolated values on the underlying surface model.
TINEdges
This output port produces all the edges of the underlying surface model. Each edge feature contains the attributes _vertex1_id and _vertex2_id, which identify the vertices to which it is connected.
Triangles
This output port produces all the triangles of the underlying surface model as polygons. Each output triangle has these attributes:
_vertex1_id _vertex2_id _vertex3_id |
identify the vertices that define the triangle |
_slope |
the slope of the plane defined by the triangle, in degrees, relative to the horizontal plane |
_percentageSlope |
the slope expressed as ( rise / run ) * 100%, or equivalently tan( _slope ) * 100% |
_aspect |
the aspect angle, in degrees, measured by the angle between nx and ny, where nx and ny are are the x and y components of the normal vector of the triangle |
TINSurface
This output port produces a single mesh geometry containing all the triangles of the underlying surface model.
VertexPoints
This output port produces all of the vertices of the underlying surface model. Each vertex contains the attribute _vertex_id which uniquely identifies the vertex.
VoronoiDiagram
This output port produces a 2D dual of the underlying surface model, which is a 3D Delaunay Triangulation. The dual to a Delaunay Triangulation is called the Voronoi Diagram. The 2D dual is constructed by considering only the x and y dimensions of the 3D Delaunay Triangulation. For each vertex in the Delaunay Triangulation, a 2D Voronoi polygon feature is output, which is closer to the vertex it encloses in the x-y plane than any other vertex in the Delaunay Triangulation. Further, the Voronoi polygon has these attributes:
_vertex_id |
identifies the vertices that it encloses |
_elevation |
contains the elevation of the enclosed vertex |
<Rejected>
Features without valid geometry are output via this port. In many cases, only the invalid parts of a larger feature will be rejected while the remaining valid parts are processed.
When Surface Model File Mode is Read, any features input via the Points/Lines or Breaklines ports are also rejected as EXTRA_FEATURE.
Rejected features will have an fme_rejection_code attribute with one of the following values:
EXTRA_FEATURE
INVALID_GEOMETRY_DIMENSION
INVALID_GEOMETRY_TYPE
INVALID_GEOMETRY_VERTICES
INVALID_BREAKLINES_GEOMETRY_VERTICES
INVALID_POINT_GEOMETRY_VERTICES
INVALID_POINTS_GEOMETRY_RASTER_NUM_BANDS
INVALID_POINTS_GEOMETRY_RASTER_NUM_PALETTES
Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters
Group Processing
Group By |
This parameter allows groups to be formed by attribute values. Zero or more attributes may be specified. Input features with the same attribute values are placed into the same group. The transformer then operates independently on each group of input features. If this parameter is left blank, the transformer will treat the entire set of input features as one group. |
||||
Complete Groups |
Select the point in processing at which groups are processed:
Considerations for Using Group By
There are two typical reasons for using When Group Changes (Advanced) . The first is incoming data that is intended to be processed in groups (and is already so ordered). In this case, the structure dictates Group By usage - not performance considerations. The second possible reason is potential performance gains. Performance gains are most likely when the data is already sorted (or read using a SQL ORDER BY statement) since less work is required of FME. If the data needs ordering, it can be sorted in the workspace (though the added processing overhead may negate any gains). Sorting becomes more difficult according to the number of data streams. Multiple streams of data could be almost impossible to sort into the correct order, since all features matching a Group By value need to arrive before any features (of any feature type or dataset) belonging to the next group. In this case, using Group By with When All Features Received may be the equivalent and simpler approach. Note Multiple feature types and features from multiple datasets will not generally naturally occur in the correct order.
As with many scenarios, testing different approaches in your workspace with your data is the only definitive way to identify performance gains. |
General
Surface Tolerance |
This parameter is used to determine which input points to add to the surface model as vertices. Specifying a value of 0 turns off vertex filtering. Tip A larger value will speed up surface model construction. The larger the value, the more input points will be filtered out. For input files with millions – or even billions – of points, it becomes essential to increase this value.
When a positive value for surface tolerance is specified, it works as follows. For each vertex that is being added to the model:
|
||||||
Breakline Method
|
Select the way in which breaklines will affect the triangulation if their edges would violate the Delaunay condition, which helps to prevent narrow triangles.
|
||||||
Breakline Tolerance
|
When Breakline Method is Preserve Delaunay by Adding Points , select or specify a tolerance value, which is the maximum distance that subdivided edges may deviate from the input breakline edge. Smaller values will make the representation of breaklines more accurate, but may require the addition of many points in cases where breakline edges are nearby one another. Automatic calculates an appropriate tolerance for the input geometry, and is generally recommended. A Custom Value may be entered, but must be greater than zero and greater than the Automatic value. |
||||||
Interpolation Method |
This parameter is used for the output ports DEMPoints and DEMRaster when these output ports exist on the transformer. It is also used if DrapeFeatures are input to the model. Select a method:
|
Contours
Output Contour Interval |
This parameter specifies the elevation separation of the output contours. |
DEM
Output DEM X Cell Spacing Output DEM Y Cell Spacing |
These parameters specify the x and y sampling intervals for the output DEMPoints. |
Output DEM Raster Nodata Value |
This parameter is used only when Interpolation Method is set to Linear, and it only affects the output port DEMRaster. All output raster cells that fall outside the underlying surface model’s boundaries will be assigned the value of this parameter. When this parameter is blank, it is interpreted as NaN (Not a Number). Note: To ensure consistent raster output, it is highly recommended that you do not leave this parameter blank. |
Draped Features
Drape Method |
This parameter controls whether input DrapeFeatures will retain its vertex count, or be modified to adhere to the underlying surface model:
Note In general, Modelproduces more detailed results than Vertex, but may require significantly more processing time to generate draped features.
|
Existing Elevation |
This parameter controls whether input DrapeFeatures with Z values will be offset or have Z values replaced:
|
Use Surface Model File
This parameter allows you to define a file for storing or loading a surface model.
File storage is useful for for workspaces that need to re-use a preconstructed surface model. The saved surface models can be used as part of a production stream on the same operating system.
Note: This parameter is processed only if Group By is not specified.
Surface Model File Path |
This parameter specifies the filename, including its path, of the surface model file. The surface model file has the file extension *.fsm. |
Surface Model File Mode |
This parameter controls whether the workspace is reading or writing a surface model file. Note There must be at least one input feature. For reading, it suffices to input a single feature with a null geometry via any of the input ports.
|
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.
How to Set Parameter Values
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
Content Types
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the SurfaceModeller on the FME Community.
Keywords: MBR "minimum bounding rectangle" SurfaceGeneralizer pointcloud