Syntax FACTORY_DEF SurfaceModelFactory [FACTORY_NAME ] [INPUT (3D_LINES|BREAKLINES|DRAPE_FEATURES|POINTS| RASTER|GRID|MINIMUM_VORONOI_EXTENT) FEATURE_TYPE [ ]* []*]* [TOLERANCE ] [SAMPLE_SPACING ] [NODATA_VALUE ] [SAMPLE_DIMENSIONS ] [CONTOUR_INTERVAL ] [CONTOUR_DIMENSION (2|3)] [INTERPOLATION_TYPE (AUTO|PLANER|CONSTANT)] [DRAPE_TYPE (VERTEX|MODEL)] [PERTURB_CONTOURS (YES|NO)] [ADDITIVE_Z (YES|NO)] [OUTPUT_CONTOURS [(YES|NO)]] [MAXIMUM_EDGE_CALC_LENGTH ] [ESTIMATED_TOTAL_VERTICES ] [SURFACE_BOUNDING_BOX ] [QUERY_BOUNDING_BOX ] [SURFACE_FILE_BASE_NAME (APPEND|OVERWRITE)] [GROUP_BY [+]*] [REJECT_INVALID_GEOM (Yes|No)] [OUTPUT (CONTOURS|DEM_POINTS|DEM_GRID|DRAPED_FEATURE|TIN_EDGES| TRIANGLES|TIN_SURFACE|VERTEX_POINTS|VERTEX_POINTS_WITH_ATTRS| VORONOI_DIAGRAM|VORONOI_DIAGRAM_WITH_ATTRS) FEATURE_TYPE [ ]* []*]* Overview Note: This factory is not supported by FME Base Edition. This factory takes three-dimensional features and uses them to define a surface model. The underlying surface model is a Delaunay Triangulation. The model is built using the TOLERANCE and the 3D features that are input to the factory through the 3D_LINES, POINTS, and BREAKLINES clauses. The factory is useful for converting from one surface representation to another and for adding z values to features. This is useful for cases where you may have two-dimensional features and elevation data either in the form of a DEM or a collection of other 3D features, and would like to add the third dimension to the features. The TOLERANCE clause is used to specify the accuracy of the surface model being constructed. The larger the value specified for tolerance, the greater the thinning of the input data. The INTERPOLATION_TYPE clause is used if the output of the model is requested as DEM_POINTS or if draping features are input to the model. If CONSTANT is specified, the z value of each output point is set to that of the closest vertex of the underlying model. If PLANAR is specified, then planar interpolation is used to determine the z value for each output point. If a point is not over a surface triangle and PLANAR is specified, the output z value will be set to NAN. If AUTO is specified, the algorithm will attempt to give the best possible result for each point. In the current version of AUTO, the planar method is used if the point is over a surface triangle and the constant method is used otherwise. The DRAPE_TYPE clause is used if any features are accepted by the model through the DRAPE_FEATURES input tag. Any features that are input to the factory through this clause will be returned with their attribution unchanged; however, they will now be 3D, having their z value set according to the value of INTERPOLATION_TYPE. If DRAPE_TYPE is VERTEX, the feature will be returned with the same number of vertices that it was input with, and with z values added to each vertex on the feature. If the DRAPE_TYPE is MODEL, the feature will have other coordinates added to it, forcing it to exactly follow the underlying surface model. The NODATA_VALUE clause is used to fill the raster cell values that fall outside of the surface's bounding box. If this is not specified, NAN values will be used instead. Use of this clause is highly recommended in order to produce consistent raster data with nodata values rather than NAN values. The SURFACE_BOUNDING_BOX clause defines the extent of the model. When building large surface models, it is strongly recommended that you specify the total size of the model. If this is not specified, then the surface is constructed using heuristics based on the first 50,000 vertices entered. The QUERY_BOUNDING_BOX constrains the output from the model to be that which overlaps with the QUERY_BOUNDING_BOX. If the QUERY_BOUNDING_BOX is not specified, then the QUERY_BOUNDING_BOX defaults to the extent of the entire underlying surface model. The SURFACE_FILE_BASE_NAME associates the surface with a file. This clause is processed only if GROUP_BY is not specified. If the mode is OVERWRITE, the constructed surface will be written to the specified file. If the specified file exists, it will be overwritten.. If the mode is APPEND, the existing surface from the specified file will be appended to the surface model constructed by the input features The appended model is then written back to the same file. There must be at least one input feature. For reading, it suffices to input a null feature via any of the input tags. If the output tag DEM_POINTS is specified, then SAMPLE_SPACING is used to specify spacing of the output DEM POINTS. If SAMPLE_SPACING is not specified, then 1 is used. If the output tag DEM_GRID is specified, then SAMPLE_SPACING is used to specify spacing of the output points that will used to construct a grid. Alternatively, SAMPLE_DIMENSIONS can be specified to establish the size of the output DEM GRID. Only one or the other may be specified. If the output tag CONTOURS, and the flag OUTPUT_CONTOURS is missing or set to YES, then CONTOUR_INTERVAL is used to specify the elevation separation of the output CONTOURS. The CONTOUR_INTERVAL has a default value of 50.0. The value specified for CONTOUR_DIMENSION is also used to specify whether the output contours are to be 2D or 3D. The default for CONTOUR_DIMENSION is 2. The ADDITIVE_Z option determines whether 3D draped features are updated with interpolated Z values (NO) or offset by the interpolated value (YES). See below for a description of the other types of output clauses that are supported. When REJECT_INVALID_GEOM is Yes, the factory will output invalid features to Rejected port. Input Tags The SurfaceModelFactory supports the following input tags. 3D_LINES The vertices of the 3D line are inserted into the model to define the surface. They are not used to define breaklines but rather just provide 3D data for the model from their vertices. BREAKLINES These features are put into the model as breaklines such that triangle edges will always be along the line of the feature. DRAPE_FEATURES Features input through this tag are output via the DRAPED tag with their z value set to the values from the surface model. It is not a requirement that the input feature be 2D. If the input feature is 3D then the z dimension is simply replaced with that from the model. POINTS The vertices from the 3D points are used to define the surface model. Each vertex of the input feature is used to define the underlying model. This tag also has the ability to accept FME grid features. Points are extracted from a grid, and the vertices of these 3D points are used to define the surface model. Output Tags The SurfaceModelFactory supports the following output tags. CONTOURS If specified, then the model is output as a set of contours through this clause. Each feature is 2D or 3D depending on the value specified for CONTOUR_DIMENSION. Each output feature also has an attribute SurfaceModel.elevation that holds the elevation of the contour. If the output feature is 3D, then this value is the same as the z coordinate on each feature. DEM_POINTS Returns the model as a series of evenly spaced 3D points based on the sampling rate specified. DEM_GRID Returns the model as a single grid feature consisting of evenly spaced 3D points arranged by rows and columns. The spacing between rows and columns is based on the sample spacing specified. Alternatively, the number of rows and columns can be specified to establish the size of the grid, instead of the sample spacing. Only one or the other may be specified. DRAPED_FEATURES Features input via the DRAPE_FEATURES tag are output here with the z dimension set to values from the model. TIN_EDGES Outputs all the edges which define the underlying Delaunay Triangulation. Each feature output on this clause has the attributes SurfaceModel.vertex1_id and SurfaceModel.vertex2_id, which identifies the ID of the vertex to which it was connected. TRIANGLES Returns the Triangles that define the Delaunay Triangulation. Each feature output on this tag has the attributes SurfaceModel.vertex1_id, SurfaceModel.vertex2_id, and SurfaceModel.vertex3_id which identify the ID's of the vertices. SurfaceModel.slope which is the slope of the triangles in degrees. SurfaceModel.aspect which is aspect angle in degrees measured from the x-axis in a counter-clockwise direction. SurfaceModel.percentageSlope which is the percentage slope. TIN_SURFACE Returns the Triangles that define the Delaunay Triangulation as one unified mesh geometry. VERTEX_POINTS Outputs each vertex of the underlying surface model triangulation. Each vertex is tagged with the unique identifier SurfaceModel.vertex_id. VERTEX_POINTS_WITH_ATTRS Outputs each vertex of the underlying surface model triangulation. Each triangle is tagged with the unique identifier SurfaceModel.vertex_id. This clause differs from the VERTEX_POINTS output clause as it only outputs those point features that were accepted through the POINTS input clause (that is, those points that have attributes with the attributes maintained). Any points that are introduced into the model through breaklines processing will not be output on this clause. VORONOI_DIAGRAM Outputs the dual of the Delaunay Triangulation called the Voronoi Diagram. For each vertex of the Delaunay Triangulation, a Voronoi polygon feature is returned. The Voronoi polygon has the attributes SurfaceModel.vertex_id identifying the id that it represents and SurfaceModel.elevation which gives the elevation of the point and hence the Voronoi polygon. VORONOI_DIAGRAM_WITH_ATTRS Outputs the dual of the Delaunay Triangulation called the Voronoi Diagram. For each vertex of the Delaunay Triangulation, a Voronoi polygon feature is returned. The Voronoi polygon has the attributes SurfaceModel.vertex_id identifying the ID that it represents, and SurfaceModel.elevation which gives the elevation of the point and hence the Voronoi polygon. This clause differs from the VORONOI_DIAGRAM clause above as it only outputs Voronoi polygons for those point features that were accepted through the POINTS input clause (that is, those points that have attributes with the attributes maintained). Any points that are introduced into the model through breaklines processing will not have Voronoi polygons output. TO BE RESOLVED RASTER, GRID, MINIMUM_VORONOI_EXTENT input tags and PERTURB_CONTOURS, MAXIMUM_EDGE_CALC_LENGTH, ESTIMATED_TOTAL_VERTICES clauses added to syntax section above, but not documented.