谢尔本发电机
使用Sherbend算法,通过减少不必要的细节来简化线的弯曲分析的基础上。
Sherbend是一种基于约束的算法,它保留了输入数据中直线和点的空间关系。Sherbend算法通过使用直径参数来选择要泛化的折弯。在解决冲突的同时,泛化过程可以消除、减少或组合弯板。
在一条直线上概括弯板的策略如下:
- 计算参考圆的面积,其直径由直径参数。
- 对于每条线,确定折弯的位置。
- 对于每个弯板,计算其周长。接下来,构造一个周长等于该周长的圆。最后,确定弯曲的调整面积,即该圆面积的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 lines for generalization. They are assumed to not self-intersect or intersect with another line or point.
侧度约束的输入点。启用“Sidedness”约束后,如果弯曲泛化会改变弯曲和点之间的空间关系,则这些点将阻止弯曲泛化。
Output Ports
广义线。
如果广义化,将违反选定约束的折弯。
无效的输入功能将输出到无效港口。
Parameters
Transformer
仅对同一组中的直线和点进行约束检查。如果未指定组,则所有直线和点都放置在同一组中。
注:并行处理如何与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 the分组依据参数。
Parallel Processing Levels
Parameter | Number of Processes |
---|---|
没有平行性 | 1 |
最小 | cores处理器,或称CPU,是计算机中执行数学计算的物理部分。它是计算机系统中最重要的部分。传统的处理器上只有一个内核,这意味着在任何给定的时间,只执行一组计算。如果一个处理器是双核的,这意味着单芯片包含两个处理器的硬件,现在称为核心,以区别于单芯片,同时并排运行。(来源:http://www.ehow.com/facts\u 5730257\u computer-core-processors\u.html)/ 2 |
中等 | exact number of cores |
咄咄逼人的 | cores x 1.5 |
极端 | 芯x 2 |
例如,在四核机器上,最小的并行性将导致两个同时的FME进程。8核机器上的极端并行将导致16个并发进程。
您可以尝试此功能,并在Windows任务管理器和工作台日志窗口中查看信息。
不:这是默认行为。只有当所有输入都存在时,处理才会在此变压器中发生。
按组:此变压器将按顺序处理输入组。价值的变化分组依据输入流上的参数将触发对当前累积组的批处理。如果组很大/复杂,这将提高总体速度,但如果输入组没有真正排序,则可能会导致不希望的行为。
Parameters
此参数指定参考圆的直径(在本文档开头描述),它大致描述了弯曲的宽度,低于该宽度的弯曲将被广义化。不同的线可以将不同的直径指定为属性。直径越大,弯曲的可能性就越大。
启用空间约束,这些约束仅应用于同一组中的线和点。
- 无:将不应用约束。
- 自相交假设输入线在进入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.
- 自身、直线相交、侧面,除了保持不相交的直线外,还保持所有直线和点的相对位置。例如,如果一条线完全位于另一条线的右侧,则在泛化过程之后,该线将完全保持在另一条线的右侧。
In this diagram, the blue bend cannot be generalized as it would violate the “Sidedness” constraint:
在此图中,蓝色弯板不能通用化,因为它将违反“自相交”约束:
此参数,如果设置为不,将重新排序(旋转)每个闭合线的坐标列表,以提高泛化质量。为了保持连接点的连通性,变压器必须确保每条线路的起点和终点坐标保持不变。因此,如果必须将第一个和最后一个坐标的位置保持在一条封闭的直线上(可能是因为它们在一个接合点上),则应将此参数设置为是的.
如果此参数设置为是的,则不会移动直线的端点。此行为允许保留连接点连接。
示例
在本例中,减少了折弯(绿色= 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:
附加信息
线泛化的目的是减少线的细节,以便在较小的尺度上进行表示。虽然著名的Douglas-Peucker算法能够很好地减少直线中的点的数量,但是它却不能很好地去除直线中不必要的细节。这个推广者transformer在其参数下包含一系列算法,包括Douglas Peucker算法。
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.
- 约束检查是一项非常耗时的操作。仅在必要时使用约束。
- 要独立地概括每个特性,请考虑使用推广者变压器。
编辑变压器参数
使用一组菜单选项,可以通过引用工作空间中的其他元素来指定转换器参数。更高级的功能,如高级编辑器和算术编辑器,也可以在一些变压器。要访问这些选项的菜单,请单击在适用参数旁边。有关详细信息,请参阅变压器参数菜单选项.
变压器类别
搜索FME知识中心
在上搜索有关此变压器的示例和信息FME Knowledge Center.