剪刀
Performs a geometric clipping operation (sometimes called a cookie cutter). Most geometry types can be clipped by an area, and some may also be clipped by a solid. Attributes may be shared between objects (spatial join).
Typical Uses
- 识别点、线或区域的内部、外部位置以及与一个或多个参照区域(剪裁器)相交的位置,并相应地修改其几何图形和属性。
- Clipping features to perform calculations by Clipper area
- Clipping rasters or point clouds to a regular or irregular area of interest
- 为美观起见,将要素剪裁到地图边界
它是如何工作的?
The Clipper takes in two sets of features:
- 快船,这将覆盖在其他特征上,以识别这些功能落在剪刀内或外部的特征,并将它们跨越快船界的边界的特征。
The geometry of the Clippers is unchanged, and they are discarded after use and not output from the Clipper transformer. - 克利普s, which are compared to the Clippers, and split into multiple sections along the Clipper boundaries if necessary. Each section is output as either falling Inside or Outside the Clipper. They may also receive attributes from the Clippers (spatial join).
Clippee几何体只有在与剪刀相交时才改变。如果它完全落在剪刀内或外部,则它被指定,并用其几何形状未被触及。
Output features receive a new Clipped Indicator Attribute (default name_剪裁), which is set to “yes” for features that have been segmented, enabling differentiation between features that were wholly inside or outside the clip boundaries and those that intersected the Clipper feature(s) and so were modified.
The Clipper works on many geometry types. This diagram illustrates area-on-line and area-on-area vector clipping results.
- (1) is a single area Clipper (in blue).
- (2)是Clippee,一种红线,其穿过剪层(1),以及部分地覆盖剪辑器(1)的红色区域。
Both the line and area Clippees are split where they cross the Clipper boundary, and the results are output:
- (3) Portions of Clippees that fall Inside the Clipper (red only)
- (4)落在剪刀外的Clippees(仅限红色)
我能夹什么?
由于Clipper将多个剪裁方法收集到一个方便的转换器中,因此了解您希望执行哪种类型的剪裁以及在剪裁操作中可以比较哪种类型的几何体非常重要。
大多数类型可以由区域或多区域剪裁。某些类型也可以通过固体或多固体夹住。
如果clipping operation you need is not listed here, consider one of the Overlayers or theIntersector- 看选择空间变压器below.
这: |
Can be clipped by: |
可以剪辑: |
---|---|---|
点/文本 | Area* 坚硬的** |
没有什么 |
曲线/线路 | Area* | 没有什么 |
Area | Area* | 点/文本 曲线/线路 Area Solid 点云 光栅 Multi/aggregates of the above |
Surface | 没有什么 | 没有什么 |
Solid | Area* 坚硬的** |
点/文本 Solid 点云 Multi/aggregates of the above |
点云 | Area* 坚硬的** |
没有什么 |
光栅 | Area* | 没有什么 |
多点/聚合 | Area* 坚硬的** |
没有什么 |
Multi-curve/aggregate | Area* | 没有什么 |
多区域/聚合 | Area* | 点/文本 曲线/线路 Area Solid 点云 光栅 Multi/aggregates of the above |
多固体/骨料 | Area* 坚硬的** |
点/文本 Solid 点云 Multi/aggregates of the above |
没有几何形状 | 没有什么 | 没有什么 |
* Area as Clipper:包括多边形,椭圆,甜甜圈和它们的聚集体(多级)。
**坚固作为剪刀:includes solids and aggregate (multi-) solids.
例子
在这个例子中,我们从两个数据集开始 - 一个带有多个公园多边形的数据集,第二个数据集,第二条带有自行车路径线。自行车路径进出多个公园,可以在这里看到并在黄色中选择和突出显示的路径。
In the workspace, the parks are routed into the剪刀input port, and the bike paths are the克利普s-这些特征将根据剪子的不同而改变。
在剪辑参数对话框中,剪刀Type被设定为多人剪辑,正如我们拥有多个公园多边形,并且希望将路径剪成所有这些。
This is a vector clip, and so we make the appropriate selections underVector Parameters, including setting创建聚合to不- 确定如何处理输出线。
最后,我们启用Merge Attributes,它将属性从parks(Clippers)传输到line(clippes)。通过选择Prefix Clipper,这些新属性将以我们的字符串为前缀“公园_“并清楚地表示属性的来源。
自行车道在遇到停车场边界时被分割,并接收前缀为的属性公园_,输出为Inside或者外面feature types (shown here in blue and magenta).
In this example, we have a series of 40 orthophoto tiles, which we would like to clip to the city’s land boundary. The boundaries (extents) of each raster are overlaid in orange.
The boundary - a single polygon - is connected to the剪刀input port, and the series of TIFF images are connected to the克利普港口。请注意,40个单独的TIFF文件已阅读,但只能发送32个Inside输出端口。
在Clipper参数对话框中,我们设置剪刀TypetoSingle Clipper,这将在这种情况下提高性能,我们确实只有一个剪辑区域。
对于光栅剪裁操作,我们需要查看的其他参数只有光栅参数,我们选择我们是否希望在剪辑边界外的区域是用Nodata像素填充到其原始范围。不是默认值,对这种情况进行了罚款。(如果您希望输出栅格保留其原始尺寸,您会选择Yes。)
在夹边界的40个进入的40级栅格中,部分或完全落在夹边界内。在交叉边界的栅格中,落在里面的像素是未触及的,但掉落的像素被设置为不data- indicated here by black.
This close-up shows the clipping of pixels (nodata - black) along the water boundary.
新光栅的范围在这里以橙色显示。它们现在大小不一,紧紧地夹在地板上剪刀boundary (as we chose not toPreserve Clippee Extents).
使用说明
- Because a raster feature must always be rectangular, clipped raster cells (that is, those outside the clipper but part of an Inside raster) will be set to the nodata value. If a nodata value has not been set, clipped raster cells will be set to 0. To set a value for nodata, use the光栅BandNodataSetter变压器在剪刀前。
- This transformer is unaffected by raster band and palette selection.
- 特性可以剪多次,但不是我teratively (for example, if a line passes through two overlapping polygons, you don’t get a separate clipped line for the overlap - just one per polygon).
为了最大限度地,考虑Intersector.
选择空间变压器
Many transformers can assess spatial relationships and perform spatial joins - analyzing topology, merging attributes, and sometimes modifying geometry. Generally, choosing the one that is most specific to the task you need to accomplish will provide the optimal performance results. If there is more than one way to do it (which is frequently the case), time spent on performance testing alternate methods may be worthwhile.
To correctly analyze spatial relationships, all features should be in the same coordinate system. The重投影可能对工作区中的恢复功能有用。
变压器 |
可以合并属性 |
改变几何 |
Counts Related Features |
创建列表 |
支持的类型* |
推荐用于 |
---|---|---|---|---|---|---|
SpatialFilter | Yes | 不 | 不 | 不 |
|
|
SpatialRelator | Yes | 不 | Yes | Yes |
|
|
AreaAreaoverlayer. | Yes | Yes | Yes | Yes |
|
|
LineOnAreaOverlayer | Yes | Yes | Yes | Yes |
|
|
LineOnlyoverlayer. | Yes | Yes | Yes | Yes |
|
|
点区域覆盖层 | Yes | 不 | Yes | Yes |
|
|
观点OnLineOverlayer | Yes | Yes | Yes | Yes |
|
|
点对点覆盖层 | Yes | 不 | Yes | Yes |
|
|
Intersector | Yes | Yes | Yes | Yes |
|
|
剪刀 | Yes | Yes | 不 | 不 |
|
|
NeighborFinder | Yes | In some cases | 不 | Yes |
|
|
TopologyBuilder | Yes | Yes | 不 | Yes |
|
|
* 笔记:曲线包括直线、圆弧和路径。Area包括多边形、圆环和椭圆。
空间分析可能是处理密集型的,特别是当涉及大量特征时。如果您想调整工作区的性能,这是一个很好的开始。
When there are multiple ways to configure a workspace to reach the same goal, it is often best to choose the transformer most specifically suited to your task. As an example, when comparing address points to building polygons, there are a few ways to approach it.
第一个示例,使用时空Filter测试是否落在多边形中,产生正确的结果。但空间Filter是一个相当复杂的变压器,能够测试多种条件并接受各种几何类型。它没有针对我们在此分析的特定空间关系进行优化。
用空间熏肉:
第二个例子使用PointonAreaOverLayer,然后是测试仪。功能输出与第一种方法相同,但变压器针对此特定任务进行了优化。处理时间的差异是大幅的 - 从第一个配置中的54.3秒,在第二个配置中下降到13.7秒。
使用PointonAreaoverlayer和测试仪:
如果工作区中存在性能问题,请在几何图形的指导下寻找其他方法。
配置
输入端口
通过通过该功能路由到变压器剪刀端口确定了所有的区域克利普features are processed. The剪刀can consist of any area features (polygons, donuts, or aggregate polygons/donuts). The剪刀can also be a solid or multi-solid if the克利普输入包括这些几何形状的固体,点,点云或聚集体。遇到的任何无效剪辑功能都将以警告记录并丢弃。
通过剪裁功能克利普港口。
输出端口
克利普完全在剪刀,和克利普features that intersect the剪刀这被分成了碎片。那些在里面的那些碎片剪刀通过此端口输出。
克利普功能完全超出剪刀通过输出外面港口和克利普features that intersect the剪刀这被分成了碎片。在剪裁区域外部的那些碎片通过该端口输出。
无效的剪刀features (that is, non-polygon features) as well as invalid克利普features (that is, features with no geometry) are output via the
被拒绝的功能将有一个fme_reimpe_code.具有以下值之一的属性:
EXTRA_CLIPPER_FEATURE
INVALID_CLIPPER_GEOMETRY_TYPE.
Rejected Feature Handling:可以设置为终止翻译或在遇到被拒绝的功能时继续运行。此设置可用作默认设置FME option和A.工作区参数.
Parameters
通过...分组 | The default behavior is to use the entire set of features as the group. This option allows you to select attributes that define which groups to form. 请注意,使用Group By时,如果clippe没有等效的Clipper,则通过外面输出端口,具有_fme_no_clipper=Yes. |
按模式分组 | Process At End (Blocking): This is the default behavior. Processing will only occur in this transformer once all input is present. Process When Group Changes (Advanced): This transformer will process input groups in order. Changes of the value of the Group By parameter on the input stream will trigger processing on the currently accumulating group. This may improve overall speed (particularly with multiple, equally-sized groups), but could cause undesired behavior if input groups are not truly ordered.
考虑使用通过...分组
使用的原因有两个Process When Group Changes (Advanced). 第一种是要分组处理的传入数据(已经按顺序排列)。在这种情况下,该结构根据用法而不是性能考虑来指定组。 第二个可能的原因是潜在的性能收益。 最有可能在已经对数据进行排序的(或使用A读取SQL排序依据声明)由于FME需要更少的工作。如果数据需求排序,则可以在工作区中排序(尽管添加的处理开销可能会否定任何增益)。 排序根据ν将变得更加困难mber of data streams. Multiple streams of data could be almost impossible to sort into the correct order, since all features matching a通过...分组需要在属于下一个组的任何功能(任何特征类型或数据集)之前到达。在这种情况下,使用通过...分组具有Process At End (Blocking)可能是等同和更简单的方法。 Note: ">笔记:多个特征类型和来自多个数据集的特征通常不会以正确的顺序自然出现。 与许多情况一样,使用您的数据测试工作区中的不同方法是识别性能增益的唯一明确方式。 |
剪刀Type | Single Clipper: Only a single Clipper feature will be used. 多人剪辑:将使用所有剪辑功能。 快船队首先:Clipper假定所有剪辑功能将在任何Clippee功能之前进入变压器。在第一个CLIPPEE之后到达的任何其他剪辑功能都将被记录为警告并丢弃。 |
Clipped Indicator Attribute | This attribute (if specified) will be added with a value ofyes通过由变压器切割的内部或外部端口和值的任何功能不到任何输出功能,没有被变压器改变。 |
保留措施/Z | 指定从中采取措施和z值的位置。 只有Clippee:将删除剪裁器的所有度量值和Z值。 仅限Clipper: All measures and Z values from the Clippee will be dropped. 克利伯和克利伯:使用Clippe和Clipper的度量值和Z值。这个连接z模式参数将确定如何处理z值。 |
||||||||||||||||||
连接z模式 | 如果适用,请选择用于处理z值的方法。
连接z模式
当在2D中查看(忽略z)时,路径(可以定义多边形的边框)可能看起来是关闭的,如下图所示。在3D中查看时,该路径可能看起来可以打开,如下图所示。 要指定如何(和if)路径应在3D中关闭,选择其中一个列出的模式。
|
||||||||||||||||||
措施/ z冲突值 | 此参数指定如何处理具有度量值但至少缺少一个值的几何体,或具有z值但至少缺少一个值的几何体。 没有(Drop Values):删除不完整的度量值或z值。 计算: Look at the values on either side of the missing value, and compute an estimate. Custom Value: The missing values are filled in with the specified custom default value. |
||||||||||||||||||
对待措施 | When using the Compute mode to compute missing measure values, measures can be consideredContinuous,并线性地插入邻居,或者它们可以是离散的,并从最近的邻居拍摄。 |
Tolerance | The minimum distance between geometries in 2D before they are considered equal, in ground units. If the tolerance is没有,几何图形必须完全相同才能视为相等。如果公差为自动,将基于输入几何形状的位置自动计算公差。另外,可以使用自定义公差。 |
克利普s on Clipper Boundary | 此参数指示应使用完全位于剪刀边界的Clippee功能所采取的操作。 Treat as Inside:介绍边界上的这些功能通过内部端口输出。 外面对待:这些位于边界上的功能通过外部端口输出。 视为内部和外部: Points and line segments on the boundary are duplicated and output as both Inside and Outside. |
Preserve Lines as Path Segments | Yes:构成输出特征边界的连续线将作为路径中的单独线段保留。 不:除非这些行具有不同的属性(例如,traits、measures和geometry name),否则它们将在输出中连接到较长的行中。 |
Preserve Clippee Extents | 如果此参数设置为不, the Inside rasters which were clipped will be equal to the intersections of the clippers and clippees. Otherwise, the intersections will be padded by不data使范围与输入光栅的范围相同。 |
启用后,剪辑器上的属性将合并到此处参数定义的clippee上。否则,不会发生任何属性合并。
如果剪辑器和clippee功能上的属性共享相同的名称,但不是以FME_开头的几何属性,然后它们被视为冲突。
累积模式 | Merge Clipper: The Clippee feature will retain all of its own un-conflicted attributes, and will additionally acquire any un-conflicted attributes that the Clipper feature has. This mode will handle conflicted attributes based on the Conflict Resolution parameter. Prefix Clipper:Clippee功能将保留其所有属性。此外,Clippee将获取反映Clipper功能属性的属性,其中名称以前缀参数为前缀。 只能使用剪子:Clippee功能将删除其所有属性,但是以开头的几何属性除外fmeè。Then, all of the attributes from one (arbitrary) Clipper feature will be placed onto the Clippee. |
Conflict Resolution | 使用clippee.:如果发生冲突,将保持clippee值。 使用剪刀:如果发生冲突,则将转移到Clippee上的剪辑器的值。 |
Prefix | 如果累积模式参数设置为Prefix Clipper, this value will prefix attributes that are being added to the Clippee feature from the Clipper feature. |
Editing Transformer Parameters
使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅变换器参数菜单选项.
定义值
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
文本编辑器提供了一种方便的方法来构建来自各种数据源的文本字符串(包括正则表达式),例如属性,参数和常量,其中结果直接在参数内使用。
Using the Arithmetic Editor
算术编辑器提供了一种从各种数据源(如属性、参数和特征函数)构造数学表达式的方便方法,其中结果直接用于参数内部。
条件值
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
内容
表达式和字符串可以包括许多函数,字符,参数等。
设置值时(无论是直接输入参数还是使用编辑器之一构造),包含字符串、数学、日期/时间或FME功能函数的字符串和表达式将对这些函数进行求值。因此,这些函数的名称@<函数名称>) should not be used as literal string values.
These functions manipulate and format strings. | |
Special Characters |
文本编辑器中提供了一组控制字符。 |
两个编辑器都有数学函数。 | |
Date/Time Functions | 文本编辑器中提供日期和时间函数。 |
这些运算符在算术编辑器中可用。 | |
These return primarily feature-specific values. | |
可使用FME和工作区特定参数。 | |
创建和修改用户参数 | 创建自己的可编辑参数。 |
对话框选项 - 表格
变压器s with table-style parameters have additional tools for populating and manipulating values.
行重新排序 |
单击行项目后启用。选择包括:
|
Cut, Copy, and Paste |
单击行项目后启用。选择包括:
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. |
导入 |
导入使用从数据集读取的一组新属性填充表。特定应用在变压器之间变化。 |
重置/刷新 |
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
笔记:不t all tools are available in all transformers.
参考
加工行为 |
|
Feature Holding |
Yes |
Dependencies | |
FME Licensing Level | FME Professional Edition and above |
Aliases | |
历史 |
FME社亚搏国际在线官网区
FME社区是演示亚搏国际在线官网、操作指南、文章、常见问题解答等的地方。获取问题的答案,向其他用户学习,并对新功能进行建议、投票和评论。
搜索all results about the Clipperon the FME Community.
例子may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.