SherbendGeneralizer
使用Sherbend算法通过基于线弯曲的分析来减少不必要的细节来简化线条。
Sherbend is a constraint-based algorithm that preserves the spatial relationship of the lines and points in the input data. The Sherbend algorithm iteratively generalizes the bends in a line by using the直径参数选择excentization弯曲。泛化过程可以消除,减少或组合弯曲,同时解决冲突。
The strategy for generalizing bends in a line is as follows:
- Calculate the area of a reference circle whose diameter is specified by the直径parameter.
- For each line, determine the locations of the bends.
- 对于每个弯曲,计算其周边。接下来,构造圆周等于该周长的圆圈。最后,确定弯曲的调整区域,这是该圆面积的75%。
- For each bend, generalize the bend if its area is below the area of the reference circle and spatial constraints are met.
- Repeat the above steps until there are no more bends to generalize.
Input Ports
Input lines for generalization. They are assumed to not self-intersect or intersect with another line or point.
Input points for the sidedness constraint. When the “Sidedness” constraint is enabled, these points will prevent a bend generalization if that would change the spatial relationship between the bend and the points.
Output Ports
广义线。
弯曲,如果概括,将违反所选约束。
无效的input features will be output to the无效的港口。
Parameters
Transformer
Only lines and points in the same group are subject to constraint checking. If no group is specified, all lines and points are placed in the same group.
不te:平行处理如何与FME一起使用:见关于并行处理for detailed information.
This parameter determines whether or not the transformer should perform the work across parallel processes. If it is enabled, a process will be launched for each group specified by theGroup Byparameter.
Parallel Processing Levels
Parameter | Number of Processes |
---|---|
不Parallelism | 1 |
Minimal | cores处理器或CPU是执行数学计算的计算机的物理部分。它是计算机系统中最重要的部分。传统的处理器在处理器上只有一个核心,这意味着在任何给定时间,只执行一组计算。如果处理器是双核,这意味着单个芯片包含两个处理器的硬件,现在称为核心,以将它们与单个芯片相同,并排沿同时运行。(来源:http://www.ehow.com/facts_5730257_computer-core-processors_.html)/ 2 |
Moderate | exact number of cores |
Aggressive | cores x 1.5 |
极端 | cores x 2 |
例如,在四核机器上,最小的并行性将导致两个同时的FME进程。8核机上的极端并行性将导致16个同时流程。
你可以用这个特性实验和查看information in the Windows Task Manager and the Workbench Log window.
不: This is the default behavior. Processing will only occur in this transformer once all input is present.
By Group: This transformer will process input groups in order. Changes on the value of theGroup By输入流上的参数将触发当前累计组上的批处理。如果组很大/复杂,则会提高整体速度,但如果输入组未真正订购,则可能导致不期望的行为。
Parameters
该参数指定的直径参考ence circle (described at the beginning of this documentation), which roughly describes the width of a bend below which the bend will be generalized. Different lines can have different diameters specified as an attribute. The bigger the diameter, the more likely bends will be generalized.
Enables spatial constraints, which are only applied to lines and points in the same group.
- 不ne:constraints will not be applied.
- 自交叉口prevents a line from intersecting with itself, with the assumption that input lines do not self-intersect when entering SherbendGeneralizer.
- 自我,线路交叉路口prevents a line from intersecting with itself or another line, with the assumption that no input line self-intersects or intersects another line when entering SherbendGeneralizer.
- 自我,线路交叉路口, Sidedness除了维持非交叉线之外,保持所有线条和点的相对定位。例如,如果一条线完全在另一条线的右侧,则该线将在概括过程之后完全保持在该线的右侧。
In this diagram, the blue bend cannot be generalized as it would violate the “Sidedness” constraint:
在此图中,蓝色弯曲不能概括,因为它将违反“自交叉点”约束:
This parameter, if set to不,将重新订购(旋转)每个封闭线的坐标列表,以提高泛化的质量。为了保持接合连接,变压器必须确保每一行的起始和结束坐标保持静止。因此,如果在闭合线中保持第一和最后一个坐标的位置是很重要的(可能是因为它们在一个时刻),则应设置此参数Yes.
如果此参数设置为Yes,线路的端点不会被移动。此行为允许保存接合连接。
Examples
在该示例中,弯曲减少(green= input,red= output):
In this example, a bend is eliminated:
In this example, three bends are combined into one:
The following diagram illustrates the generalization process on a single line in a real-world dataset:
This example illustrates the generalization process on a set of contours:
附加信息
The aim of line generalization is to reduce the details on a line for representation at a smaller scale. While the well-known Douglas-Peucker algorithm, is good at reducing the number of points in a line, it is not so good at removing unnecessary details in a line. TheGeneralizer.transformer contains a selection of algorithms under its parameters including the Douglas-Peucker algorithm.
In comparison, the Sherbend algorithm is well suited for the generalization of natural features (contours, lakes, rivers, wooded areas, etc.) because it preserves the general shape of the line. Moreoever, if spatial constraints are enabled, the spatial relationship between the input entities are preserved. The Douglas-Peucker algorithm with a small tolerance is often used before or after Sherbend to further reduce the number of points to further fulfill the goals of generalization.
Performance and Usage Notes
- The Sherbend algorithm iteratively detects and generalizes bends, and then detects and resolves spatial conflicts. The generalized lines from one iteration are passed to the next iteration until the lines cannot be generalized further. Due to this iterative process, the algorithm is time-intensive, which is a tradeoff to improved accuracy and quality of generalization.
- 约束检查是一种高度时间密集的操作。仅根据需要使用约束。
- 要概括每个功能,请考虑使用Generalizer.transformer.
Editing Transformer Parameters
使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅Transformer Parameter Menu Options.
Transformer Categories
Search FME Knowledge Center
Search for samples and information about this transformer on theFME Knowledge Center.