RasterSelector
为后续变压器操作选择栅格的特定频带和调色板。
Typical Uses
- 隔离特定频段或调色板以执行操作。
它是如何工作的?
RasterSelector接收光栅功能,并将特定频带和调色板指定为“所选”。
一旦执行了选择,支持栅格选择的变形金刚只会影响所选频带和调色板。未选择的元素通过未置换,并保持在未选择状态,直到执行另一个栅支门操作。
默认状态是所有光栅的特性bands and palettes are selected - that is, after reading in the raster, subsequent raster transformers will operate on all bands and palettes. Raster transformers may support both band and palette selection, band selection only, or may be unaffected by it. Check a transformer’s documentation for raster selection support details.
Bands and palettes are selected using the band and palette indices, specified in a string. The string may either be entered as a parameter or provided as an attribute.
年代election Strings
The format of the string isB P(band number, then palette number, separated by a space). If the raster does not have palettes, only band numbers should be specified.
- 索引是基于零的,所以第一频带或调色板是索引0。
- The keywordALLcan be used in place of band and palette numbers to select all bands or all palettes on a specific band.
- Multiple bands or band-palette pairs are separated by a semicolon (;)。
- 一个乐队上的多个调色板由逗号分隔(,)。
年代election String Examples
所有乐队 |
ALL |
所有的乐队和调色板 |
所有的所有 |
First palette of the first band of a raster |
0 0 |
First palette of the first band and first palette of the third band |
0 0; 2 0 |
First three bands of the raster (without palettes) |
0;1;2 |
栅格的前三个频段(用他们的调色板) |
0 ALL;1 ALL;2 ALL |
第一个乐队的前两个调色块 |
0 0.1 |
- 可以在不选择附加的调色板的情况下选择频带。
- 在不选择拥有频带的情况下无法选择调色板。
- 年代pecific palettes cannot be selected on ALL bands; for example,所有2。
In this example, we will remove the green band from an RGB raster. The original raster has three bands - red, green, and blue - and no palettes. Note the band index numbers, starting with zero (0). Green is Band 1.
该操作将采用三个步骤(虽然第三步是可选的):
- 选择要删除的频带。
- Remove the selected band.
- 执行另一个光栅选择,重新选择剩余的频带以进行进一步处理(可选)。
The raster is first routed into a RasterSelector. In the parameters dialog,年代election Mode是乐队和调色板列表。
The乐队和调色板列表是set to1, which will select the green band (Band 1) only.
Next, the raster passes through aRasterBandremover.。This transformer has no parameters to set, and removes all currently selected bands.
After exiting the RasterBandRemover, the raster feature has no bands selected, as the previously selected band no longer exists. Selection does not generally affect writers, but if further processing is required, the remaining bands need to be re-selected.
另外添加了另一个rasterselector,而且乐队和调色板列表是set toALL,选择所有频段。
输出栅格功能只有两个频段 - 红色和蓝色。请注意,频带索引编号已复位 - 频段1现在是蓝色的。
In this example, we will select a palette to be extracted into an attribute, using arasterpaletteextractor.transformer. The source raster has one band, with two palettes - an RGB palette containing colors, and a string palette that contains labels. We are interested in the string palette.
请注意,唯一的频带是带0,字符串调色板是调色板1。
This operation will take two steps:
- 选择感兴趣的调色板,它正在打开乐队。
- Perform the extraction.
The raster is first routed into a RasterSelector. In the parameters dialog,年代election Mode是乐队和调色板列表。
The乐队和调色板列表是set to0 1, representing Band 0 and Palette 1, separated by a space.
The next step is therasterpaletteextractor.。在“参数”对话框中,我们为新属性设置一个名称,该属性将包含所选选项板的内容,命名它_palette。
输出栅格功能具有一个新的属性,具有选定调色板的内容。
请注意,栅格功能的状态退出RasterPaletteextractor仍然是一个频段,选择一个调色板。如果需要进一步处理,则可能需要另一个乘法器来重新选择所有频带和调色板,如前面的示例所示。
A乐队和调色板列表of所有的所有将重新选择所有乐队和调色板。
使用说明
- 此函数覆盖栅格上的任何现有选择。在选择后栅格上的所有未指定的频带和调色板都被视为未来的操作。
- 年代election is not considered by writers, so use theRasterBandSeparator并过滤以将频带和调色板的子集写入单个功能。
Choosing a Raster Transformer
FME拥有广泛的变形金机,用于使用光栅数据。它们通常可以归类为与整个栅格,频带,单元格或调色板一起使用,以及为工作流控制设计或与矢量数据组合的那些。亚搏在线
For information on raster geometry and properties, seerasters(ifmeraster)。
与罗斯特合作
RasterCelloriginsetter. | 年代ets the cell origin point within cells in a raster. |
RasterConvolver | 应用卷积滤波器(有时称为akernelor镜片) to raster features and outputs the results. |
RasterExpressionEvaluator | Evaluates expressions on each cell in a raster or pair of rasters, including algebraic operations and conditional statements. |
RASTEREXTENTSCOERCER. | 用多边形替换输入栅格功能的几何图形,覆盖光栅范围的范围或栅格内的数据范围。 |
Rastergcpextractor. | ExtractsGround Control Point(GCP)来自栅格功能的坐标系和点值,并将其视为属性。 |
RasterGCPSetter | 年代ets地面控制点(GCPS)在光栅上,用已知坐标配对单元位置。 |
RasterGeoreferencer | Georeferences a raster by either known corner coordinates or origin, cell size, and rotation. |
RasterHillshader | 基于高程值,生成地形的灰度阴影浮雕表示。 |
RasterInterpretationCoercer. | 改变了栅格的解释类型,包括所有频段,并在必要时转换单元值。 |
RasterMosaicker | Merges multiple raster features into a single raster feature. |
Rasterpropertyextractor. | 提取栅格功能的几何属性并将其视为属性。 |
RasterPyramider | Resamples rasters to multiple resolutions, based on either number of levels or dimensions of the smallest output raster. |
RasterRegisterer. | Transforms an image to minimize its difference with another. |
RasterResampler | 基于指定的输出尺寸,地面单位的单元格大小或原始的百分比,并对新的单元格值进行resples。 |
RasterRotationApplier | Rotates a raster feature according to its rotation angle property, interpolating new cell values, updating all other affected raster properties, and producing an output raster feature with a rotation angle of zero. |
RasterSharpener | 增强光栅图像的特征。Rastersharpener增强边界,线条和曲线,同时降低光栅图像的平坦区域中的噪音。 |
RasterSubsetter | 使用像素绑定而不是地坐标的剪辑栅格功能,并且可选地在周边围绕周边添加单元格。 |
RasterTiler | 通过指定单元/像素或瓷砖数量的图块大小将每个输入栅格分成一系列差块。 |
范特利奥戈翁塞纳克 | 从输入栅格功能创建多边形。为每个连续区域的像素区域输出一个多边形,在输入栅格中具有相同的值。 |
WebMapTiler | 创建一系列可通过Web映射应用程序使用的图像块,例如Bing™Maps,Google Maps™或Web地图图块服务。这是通过重新采样仪器来完成各种不同分辨率的,然后将它们拆分为瓷砖。 |
与乐队一起使用
RasterBandAdder | Adds a new band to a raster feature. |
RasterBandCombiner. | Merges coincidental raster features into a single output raster feature, preserving and appending all bands. |
RasterBandInterpretationCoercer. | 改变单个光栅带的解释类型,如有必要,转换单元值。 |
RasterBandKeeper | 从栅格功能中删除所有未选择的频带。 |
Rasterbandminmaxxtractor. | 从栅格功能中提取最小和最大频带值,调色板键和调色板值,并将它们添加到列表属性。 |
RasterBandNameSetter | 年代ets the band name of selected bands on a raster, making raster contents simpler to understand compared to band numbers. |
RasterbandNodataremover | 从栅格功能的选定频段中删除现有的Nodata标识符。先前等于Nodata值的任何值都被视为有效数据。 |
RasterBandNodataSetter | 在栅格功能的所选频段上设置新的Nodata值。 |
RasterBandOrderer | 年代pecifies the required order of bands in a raster. Bands are reordered according to the input band indices. |
RasterBandPropertyExtractor | 提取栅格功能的频带和调色板属性并将其作为属性暴露。 |
RasterBandremover. | 从栅格功能中删除任何选定的频段。 |
RasterBandSeparator | 将频带或唯一频带和调色板组合分开,并输出单个栅格功能或包含所有组合的单个新栅格功能。 |
rastertatisticscalculator. | Calculates statistics on raster bands and adds the results as attributes. |
Working with Cells
RasterSpectCalculator. | 计算光栅的每个单元的方面(斜率方向)。方面以从北方顺时针的0到360测量。 |
RasterCellCoercer | Creates individual points or polygons for each cell in a raster, optionally extracting band values as z coordinates or attributes. |
RasterCellValueCalculator | Evaluates basic arithmetic , minimum, maximum or average operations on the cell values of a pair of rasters. |
Rastercellvaluerepler. | 用新的单个值替换栅格中的一系列频带值。 |
rastercellvaluerounder. | Rounds off raster cell values. |
RasterSegmenter | 基于输入光栅图像单元中的强度差,将光栅图像分配到从输入图像中的任意大小的小区组。 |
rastersingularcellvaluecalculator | 对栅格的小区值对数值执行基本算术运算。 |
RasterSlopeCalculator | Calculates the slope (maximum rate of change in z) for each cell of a raster. |
与调色板合作
梁栅栏 | 从属性中创建一个调色板,并将此调色板添加到栅格上的所有选定频段。 |
rasterpaletteextractor. | Creates a string representation of an existing palette on a raster and saves it to an attribute. |
RasterPaletteGenerator | 从光栅的选定频段中生成调色板。输出栅格将使所选频段由带有调色板的新频段替换。 |
RasterPaletteInterpretationCoercer | Alters the interpretation type of raster palettes. |
Rasterpalettenodatasetter. | Identifies the palette key that matches a raster band’s nodata value, and sets a value on it. |
Rasterpaletteremover | Removes selected palette(s) from raster features. |
RasterPaletteResolver | 通过用相应的调色板值替换单元值来解析栅格上的调色板。具有多个组件(如RGB)的调色板值被分解,并且分配给多个新添加频段的单个值。 |
亚搏在线工作流控制
RasterCheckpointer | 强制累计覆盖栅格操作要处理,将状态保存到磁盘并释放资源以调整性能或协助内存限制。 |
RasterConsumer | 读取用于测试目的的栅格功能,包括任何累计光栅操作。没有执行额外的操作,没有任何内容功能。 |
rasterextractor | 年代erializes the geometry of a raster feature into a Blob attribute, encoding the contents according to a choice of common binary raster formats. |
RasterNumericCreator | 创建指定大小和分辨率的数字栅格,具有默认单元格值。 |
RasterReplacer | Decodes a binary attribute containing encoded rasters stored as Blobs, replacing the feature’s geometry with the decoded raster. |
RasterRGBCreator. | 创建指定大小,分辨率和解释类型的颜色栅格功能,具有默认单元格值。 |
RasterSelector | 为后续变压器操作选择栅格的特定频带和调色板。 |
矢量和栅格
ImageRasterizer | Creates a raster representation of vector or point cloud input features, using the fme_color attribute over a solid background fill for vector features. Point clouds may be rendered using their color or intensity components. |
NumericRasterizer. | Creates a numeric raster representation of vector or point cloud input features, where cell values are taken from the z coordinates of the input features and overlaid on a uniform background. |
MapnikRasterizer | 从输入向量和光栅功能生成光栅,使用MapNik Toolkit对符号化和标签进行精细控制。 |
PointonRasterValueExtractor. | Extracts the band and palette values from a raster at the location of one or more input points and sets them as attributes on the feature. |
RasterDemgenerator. | Produces a raster digital elevation model (DEM) by uniformly sampling a Delaunay triangulation generated from input points and breaklines. |
VectorOnRasterOverlayer | Rasterizes vector or point cloud features onto an existing raster. For vector features the fme_color attribute sets pixel color, and point clouds may be rendered using their color or intensity components. |
配置
Input Ports
此变形器仅接受栅格功能。
If a specific band or palette number is specified in the乐队和调色板列表parameter, that band or palette must exist on the input feature. If the specified band or palette number does not exist, an error will occur.
输出端口
Raster features with specified bands and palettes in a selected state.
Non-raster features will be routed to the
Rejected features will have an fme_rejection_code attribute with one of the following values:
Invalid_geometry_type.
INVALID_RASTER_NO_BANDS
拒绝功能处理:可以设置为终止翻译或在遇到被拒绝的功能时继续运行。此设置可用作默认设置FME option和A.工作区参数。
Parameters
年代election Mode | 乐队和调色板列表:To specify explicit bands and palettes in the乐队和调色板列表参数。 Attribute:频带和调色板选择字符串将在属性中提供。 |
乐队和调色板列表 | Enter a band and palette list string. |
Attribute | 指定包含频带和调色板列表字符串的属性。 |
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, clickbeside the applicable parameter. For more information, see变换器参数菜单选项。
Defining Values
有几种方法可以在变压器中定义使用的值。最简单的是简单地输入值或字符串,其可以包括各种类型的函数,例如属性引用,数学和字符串函数和工作区参数。有许多工具和快捷方式可以帮助构造值的值,通常可以从与值字段相邻的下拉上下文菜单中提供。
使用文本编辑器
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
算术编辑器提供了一种方便的方法来构建来自各种数据源的数学表达式,例如属性,参数和特征函数,其中结果直接在参数内使用。
Conditional Values
年代et values depending on one or more test conditions that either pass or fail.
Content
表达式和字符串可以包括许多函数,字符,参数等。
设置值 - 无论是否直接在参数中输入或使用其中一个编辑器和包含字符串的表达式都是构造的,都会评估这些函数的字符串和表达式。因此,这些函数的名称(以@ <function_name.>) should not be used as literal string values.
These functions manipulate and format strings. | |
年代pecial Characters |
文本编辑器中提供了一组控制字符。 |
Math functions are available in both editors. | |
Date/Time Functions | 文本编辑器中提供日期和时间函数。 |
这些运算符可在算术编辑器中使用。 | |
These return primarily feature-specific values. | |
可以使用FME和工作区的参数。 | |
Creating and Modifying User Parameters | Create your own editable parameters. |
参考
Transformers that support band or band and palette selection:
RasterBandInterpretationCoercer.
RasterPaletteInterpretationCoercer
处理行为 |
|
Feature Holding |
No |
Dependencies | None |
FME Licensing Level | FME Professional Edition and above |
Aliases | 漂流带式选择器,RasterPaletteSelector |
History | |
Categories |
FME社亚搏国际在线官网区
FME社区是演示亚搏国际在线官网,TOS,文章,常见问题和更多的地方。获取您的问题的答案,从其他用户学习,并建议,投票和评论新功能。
年代earch for所有结果都是关于栅格的on the FME Community.
例子可能包含根据开放政府许可证的信息 - 温哥华