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
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.
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.
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
Tip: The parameter Conflict Resolution can filter out a subset of input Points/Lines to ensure a well-constructed surface model.
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.
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.
This output port produces features input through the DrapeFeatures port, with their z values set to interpolated values on the underlying surface model.
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.
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 |
This output port produces a single mesh geometry containing all the triangles of the underlying surface model.
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.
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 |
Parameters
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. |
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:
|
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.
|
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 PLANAR, 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. |
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, MODEL produces 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:
|
Activating this group causes contour features to be output from the Contours port. Note that when this group is activated, input points along contour intervals will be perturbed or removed (depending on the Conflict Resolution parameter) which may affect output from ports other than the Contours port.
Output Contour Interval |
This parameter specifies the elevation separation of the output contours. |
Output Contour Dimension |
This parameter specifies whether the output contours are 2D or 3D. 2D contours are equivalent to 3D contours, except that the z coordinates are dropped. Tip: When the input dataset is large enough, setting this parameter to 2D will result in a visible performance improvement. |
Conflict Resolution |
This parameter controls whether input points on the contour interval are dropped, or perturbed. Not dropping or perturbing these points would result in topologically invalid contours.
|
This parameter allows you to define a file for storing a surface model.
File storage is useful for building a large surface model through multiple runs, and 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 Base File Name |
This parameter specifies the filename, including its path, of the surface model file. The surface model file has the file extension *.fsm. |
Surface Model Update 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.
|
Estimated # of Vertices in Model |
This parameter provides an estimate of the number of vertices in the final surface model, which can be significantly greater than the total number of input points through Points/Lines and Breaklines. Note: A generous estimate is recommended when you are building a large model in multiple runs because this estimate is used for optimization purposes. If this estimate is too low, the surface model construction could take significantly longer. |
XMin YMin XMax YMax |
This parameter should only be used when you are building large surface models across multiple runs. Note: In subsequent runs of the SurfaceModeller, this parameter must be specified; otherwise, the transformer will use the bounding box of the surface model from the first run for constructing the surface model. |
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
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. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
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.
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
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.
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for all results about the SurfaceModeller on the FME Community.
Keywords: MBR "minimum bounding rectangle" SurfaceGeneralizer pointcloud