原文地址:https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/!FME_Geometry/Raster.htm
Raster 栅格
In this topic: 在本主题中:
Raster Features 栅格要素
Raster Interpretation Types
栅格解释类型
Raster Properties 栅格属性
Bands 带
Band Interpretation Type 波段判读类型
Color 颜色
Alpha and Nodata Alpha和Nodata
Band Properties 带性质
Interleaving 交织
Palettes 选项板
Palette Properties 选项板特性
Palettes and Nodata 调色板和Nodata
Removing and Resolving Palettes
删除和解析选项板
World and TAB Files World和TAB文件
World Files 坐标文件
TAB Files TAB文件
Raster Processing 光栅处理
Band and Palette Selection
波段和波段选择
Tiling and Mosaicking 平铺和镶嵌
Band Combining and Separating
波段合并与分离
Pyramiding 隆背
Compression 压缩
Raster File Naming 光栅文件
A raster is a rectangular matrix of evenly-spaced cells (sometimes called pixels), arranged in columns and rows.
光栅是均匀间隔的单元格(有时称为像素)的矩形矩阵,按列和行排列。
A raster – and therefore its cells – has one or more bands (sometimes called channels or layers). A band’s interpretation determines what range and type of values it can hold.
光栅(因此其像元)具有一个或多个波段(有时称为通道或图层)。波段的解释决定了它可以容纳的值的范围和类型。
Each cell has one numeric value per band.
每个单元格的每个带区都有一个数值。
Rasters may represent image or numeric data. Images are commonly derived from satellite data or photography, while numeric data often represents elevations, temperatures, and other quantitative information.
光栅可以表示图像或数字数据。图像通常来自卫星数据或摄影,而数字数据通常代表海拔,温度和其他定量信息。
The number of bands will vary – one for a digital elevation model (DEM) or simple numeric raster, three or four for most color image rasters (red, green, blue, and sometimes alpha), and even more for those produced with multiple sensors or representing measurements repeated over time.
波段的数量会有所不同-数字高程模型(DEM)或简单数字栅格的波段数量为一个,大多数彩色图像栅格(红色、绿色、蓝色,有时还有alpha)的波段数量为三个或四个,而使用多个传感器生成的或代表随时间重复测量的波段数量则更多。
Orthoimage 垂直图像
Photo 照片
Digital Elevation Model 数字高程模型
Numeric 数字
Satellite: Multispectral 卫星:多光谱
Scanned map 扫描地图
Some rasters are georeferenced, and know where they are positioned on the earth. Some, such as scanned maps, can be manually georeferenced. Some may be tied to a point on the earth (as is a photo with embedded GPS information) but the contents of the image are not georeferenced. Some may be associated with a geographic feature and stored as an attribute, common with scanned documents and images.
某些栅格已进行地理配准,并且知道它们在地球上的位置。有些地图(如扫描地图)可以手动进行地理配准。有些可能与地球上的一个点有关(如嵌入GPS信息的照片),但图像的内容没有地理参考。一些可能与地理特征相关联并存储为属性,与扫描的文档和图像相同。
Raster Features 栅格要素
In FME, rasters have these attributes and values:
在FME中,栅格具有以下属性和值:
fme_geometry 有限元几何学
fme_aggregate 细骨料
fme_type FME型
fme_raster FME光栅
They will also have a series of attributes that are specific to their format, prefixed appropriately with strings such as geotiff_, pngraster_, cded_, ngrid_, and so on.
它们还将具有一系列特定于其格式的属性,并适当地使用geotiff_、pngraster_、cded_、ngrid_等字符串作为前缀。
Raster Interpretation Types
栅格解释类型
A raster’s interpretation type reflects its bands’ interpretation types. (See Band Interpretation Type below.)
栅格的解释类型反映其波段的解释类型。(See下面的波段解释类型。)
A single-band raster is described by the same interpretation type as that one band.
单波段光栅由与该波段相同的解释类型描述。
A color raster is described as its color and alpha components, along with the sum of bit depths for all bands. An RGB raster with 8-bit bands (Red8, Green8, Blue8) is RGB24. An RGBA (with alpha) with 16-bit bands (Red16, Green16, Blue16, Alpha16) is RGBA64.
颜色光栅被描述为其颜色和alpha分量,沿着是所有波段的位深度之和。具有8位波段(红8、绿8、蓝8)的RGB光栅是RGB24。RGBA(带alpha),16位波段(红16,绿16,蓝16,Alpha16)是RGBA 64。
Raster Properties 栅格属性
A raster’s origin with regards to its own columns and rows is the upper left corner.
光栅相对于其自身列和行的原点位于左上角。
This differs from its geographical extents, which are described from the lower left to upper right corners. If a raster is georeferenced, these corner x and y coordinates will reflect the units of the raster’s coordinate system (meters or degrees, for example).
这与它的地理范围不同,它是从左下角到右上角描述的。如果光栅是地理配准的,这些角点的x和y坐标将反映光栅坐标系的单位(例如,米或度)。
These properties have a single value per raster, and describe the raster as a whole.
这些属性对每个光栅都有一个值,并将光栅作为一个整体进行描述。
Raster Property 栅格属性
Description 描述
Sample Values (Orthophoto)
样本值(正射影像)
Minimum Extents 最小范围
X and y coordinates, in ground units, of the lower left corner of the raster.
光栅左下角的X和y坐标(以地面单位表示)。
488704, 5461200
Maximum Extents 最大范围
X and y coordinates, in ground units, of the upper right corner of the raster.
光栅右上角的X和y坐标(以地面单位表示)。
490304, 5462200
Resolution (Columns x Rows)
分离度(色谱柱x色谱柱)
Total number of columns (x-axis) and rows (y-axis).
列(x轴)和行(y轴)的总数。
1600 x 1000 Pixels
Origin 起源
X and y coordinates, in ground units, of the upper left corner of the raster.
光栅左上角的X和y坐标(以地面单位表示)。
488704, 5462200
Spacing 间距
Fixed distance in the x and y dimensions between each cell in the raster.
栅格中每个单元格之间在x和y维度上的固定距离。
Some formats store only one spacing value, requiring square cells. Also known as cell size.
某些格式仅存储一个间距值,需要方形单元格。也称为细胞大小。
For georeferenced rasters, spacing is in ground units.
对于地理配准栅格,间距以地面单位为单位。
1,1
Rotation in Radian CCW 以弧度旋转CCW
Represents the rotation of a raster relative to the x and y axes.
表示光栅相对于x和y轴的旋转。
0,0 means no rotation – the raster is aligned straight along both axes.
0,0表示不旋转-光栅沿沿着两个轴直线对齐。
Rotation is measured in radians, counter-clockwise:
旋转以弧度为单位,逆时针:
X rotation relative to the positive x axis
相对于正x轴的X旋转
Y rotation relative to the negative y axis
相对于负y轴的Y旋转
Unequal x and y rotation values will produce a shear.
不相等的x和y旋转值将产生剪切。
The rotation point is the raster origin (upper left corner).
旋转点是光栅原点(左上角)。
0, 0
Cell Origin 细胞起源
The reference point of a cell, that is, the point within each cell from which the pixel for that cell is derived.
单元格的参考点,即每个单元格内的点,该单元格的像素从该点导出。
The lower left corner of the cell in the x or y dimension is 0.0, while the upper right corner is 1.0.
单元格在x或y维度上的左下角为0.0,而右上角为1.0。
The FME default is 0.5, 0.5, placing the data point for each cell in its center.
FME默认值为0.5,0.5,将每个单元格的数据点放置在其中心。
0.5, 0.5
Affine Transform 仿射变换
Origin, Spacing, and Rotation form an affine transformation.
原点、间距和旋转构成仿射变换。
1, 0, 488704, 0, -1, 5462200
Coefficients in the affine transformation:
A = 1
B = 0
C = 488704.04000000004
D = 0
E = -1
F = 5462200.137
or
x' = 1x + 0y + 488704.04000000004y' = 0x - 1y + 5462200.137
x' = 1x + 0y +488704.0400000004y' = 0x - 1y + 5462200.137
Number of Bands 波段数
The raster’s number of bands (layers). Minimum is 1.
栅格的波段(图层)数量。最小值为1。
Each band carries one numeric value per cell.
每个带在每个单元格中携带一个数值。
3
Ground Control Points (GCPs) are sometimes used to georeference rasters. If they exist on a raster, they will appear as a raster property.
地面控制点(GCP)有时用于地理配准栅格。如果它们存在于光栅上,它们将显示为光栅特性。
Each GCP is a pair of locations, matching a cell (column, row) in the raster to a point in a coordinate system (x,y,z). A minimum of three GCPs are needed for georeferencing.
每个GCP都是一对位置,将栅格中的单元(列、行)与坐标系(x、y、z)中的点相匹配。地理配准至少需要三个GCP。
Raster Property 栅格属性
Description 描述
Sample Values (Scanned Topographic Map)
样本值(扫描地形图)
GCP Coordinate System GCP坐标系
The coordinate system of the referenced points (not necessarily the same coordinate system as the raster).
参考点的坐标系(不一定与光栅的坐标系相同)。
UTM27-10
Ground Control Points 地面控制点
A series of numbered GCPs, starting with zero (0), each consisting of a cell position (column, row) matched to a real-world position (x,y,z) in the designated GCP Coordinate System.
一系列编号的GCP,从零(0)开始,每个GCP由与指定GCP坐标系中的真实位置(x,y,z)匹配的单元格位置(列、行)组成。
0: 6863, 1442, 483000, 5456000, 0 1: 1143, 1415, 483000, 5468000, 0 2: 1120, 4754, 490000, 5468000, 0
GCPs can either be applied to the raster, resulting in the image being georeferenced and tagged with the GCP Coordinate System, or the GCPs can be extracted and stored on the resulting data file for those formats supporting unreferenced data and GCP storage.
可以将GCP应用于栅格,从而使用GCP坐标系对图像进行地理配准和标记,也可以提取GCPs并将其存储在生成的数据文件中,以支持未引用数据和GCP存储的格式。
Bands 带
Rasters have bands – at least one, often more.
光栅具有波段-至少一个,通常更多。
A band is a layer of numeric values that spans the entire raster, one value per cell. A band’s interpretation type determines what those values can be, and in some cases, what they mean.
波段是一个数值图层,它跨越整个光栅,每个像元一个值。波段的解释类型决定了这些值可以是什么,在某些情况下,还决定了它们的含义。
Band Interpretation Type 波段判读类型
A band’s interpretation type describes what values it can hold. It consists of type and bit depth.
波段的解释类型描述了它可以保存的值。它由类型和位深度组成。
Type 类型
Name 名称
Description 描述
Int
Integer 整数
Whole numbers. 整数。
UInt
Unsigned Integer 无符号整数
Whole numbers greater than or equal to zero (0).
大于或等于零(0)的整数。
Real 真实的
Real Number 真实的数
Floating point numbers (decimals).
浮点数(小数)。
Red 红色
Red 红色
The red band of an RGB image. Values are unsigned integers.
RGB图像的红色波段。值是无符号整数。
Green 绿色
Green 绿色
The green band of an RGB image. Values are unsigned integers.
RGB图像的绿色波段。值是无符号整数。
Blue 蓝色
Blue 蓝色
The blue band of an RGB image. Values are unsigned integers.
RGB图像的蓝色波段。值是无符号整数。
Alpha 阿尔法
Alpha (Transparency) Alpha(透明度)
Transparency, used in conjunction with other bands (often RGB or Grayscale images). Values are unsigned integers.
透明度,与其他波段(通常为RGB或灰度图像)结合使用。值是无符号整数。
Alpha is not Nodata, but can be used to represent areas of no data and make them transparent.
Alpha不是Nodata,但可以用来表示没有数据的区域并使其透明。
Gray 灰色
Grayscale 灰度
A single band indicating levels of gray ranging from white to black. Typically used for grayscale images. Values are unsigned integers.
表示从白色到黑色的灰度级的单个条带。通常用于灰度图像。值是无符号整数。
A band’s bit depth determines the range of values that can be used. Higher bit depth means more space to store numbers, which means a wider range of values can be used.
波段的位深度决定了可以使用的值的范围。更高的位深度意味着更多的空间来存储数字,这意味着可以使用更广泛的值。
Type(s) 类型(s)
Common Bit Depths 常用位深
Value Range 值范围
Int
8
16
32
64
-128 to 127
-128至127之间
-32768 to 32767
-32768至32767
-2147483648 to 2147483647
-2147483648至2147483647
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
2019 - 09 - 1900:00:00 00:00
UInt
8
16
32
64
0 to 255
0至255
0 to 65535
0至65535
0 to 4294967295
0到4294967295之间的连接
0 to 18446744073709551616
0至18446744073709551616
Real 真实的
32
64
3.4E +/- 38 (7 digits)
3.4E +/- 38(7位数)
1.7E +/- 308 (15 digits)
1.7E +/- 308(15位)
Red 红色
Green 绿色
Blue 蓝色
Alpha 阿尔法
Gray 灰色
8
16
0 to 255
0至255
0 to 65535
0至65535
Color 颜色
Raster colors are commonly represented by their red, green, and blue components, each on a separate band.
光栅颜色通常由其红色、绿色和蓝色分量表示,每个分量都位于单独的波段上。
If the color bands are 8-bit, they each will accept values from 0 to 255, and together produce an RGB24 raster, with over 16 million possible colors (256 x 256 x 256).
如果色带是8位的,它们每个都将接受从0到255的值,并一起产生一个RGB 24光栅,具有超过1600万种可能的颜色(256 x 256 x 256)。
Numerous other color spaces exist (that is, methods of representing color) such as CMYK, HSV, YrCbCr and more. These may be supported by some raster formats, and may be converted to RGB on read or write. Note that a color space conversion is generally lossy.
存在许多其他颜色空间(即,表示颜色的方法),例如CMYK,HSV,YrCbCr等。这些可能被某些光栅格式支持,并且可以在读取或写入时转换为RGB。注意,颜色空间转换通常是有损的。
Red8
Green8 绿色8
Blue8 蓝色8
White 白色
255
255
255
Black 黑色
0
0
0
50% Gray 50%灰色
127
127
127
Red 红色
255
0
0
Green 绿色
0
255
0
Blue 蓝色
0
0
255
Alpha and Nodata Alpha和Nodata
Alpha bands are often used with RGB rasters, forming RGBA. The alpha value indicates transparency, where zero (0) is fully transparent and the maximum value (255 if 8-bit) is fully opaque. This affects the display of the other bands, and is often used to create transparency where no data exists, as in irregularly shaped or rotated rasters which might otherwise have areas displayed as black pixels.
Alpha波段通常与RGB光栅一起使用,形成RGBA。alpha值表示透明度,其中零(0)表示完全透明,最大值(如果是8位,则为255)表示完全不透明。这会影响其他波段的显示,并且通常用于在不存在数据的情况下创建透明度,例如在形状不规则或旋转的栅格中,否则可能会有显示为黑色像素的区域。
In this example, an irregularly-shaped raster is produced by clipping to a park boundary. Cells that fall outside the park boundary but inside the raster's rectangular extents are black.
在此示例中,通过裁剪到公园边界来生成形状不规则的光栅。位于公园边界之外但在栅格矩形范围内的像元为黑色。
By adding an Alpha band with the value zero (0) in locations that have no data, they are rendered as transparent.
通过在没有数据的位置添加值为零(0)的Alpha波段,它们将被渲染为透明的。
Note that pixels in the Alpha band in locations where there is data – that is, color – have a value of 255, which is fully opaque.
请注意,Alpha波段中有数据(即颜色)的位置的像素值为255,这是完全不透明的。
Nodata is a designated value, per band, that is specified to mean no data – unknown or invalid, as opposed to null or zero.
Nodata是每个波段的指定值,指定为表示无数据-未知或无效,而不是null或零。
Nodata is frequently displayed as transparent, but alpha and Nodata are not the same. In general, Nodata is useful for gridded numeric datasets, while alpha is useful for color rasters.
Nodata通常显示为透明,但alpha和Nodata并不相同。通常,Nodata对于网格化的数值数据集很有用,而alpha对于彩色栅格很有用。
Nodata can also be used in the context of raster palettes – see below.
Nodata也可以在光栅调色板的上下文中使用-参见下文。
Not all raster formats support Nodata.
并非所有光栅格式都支持Nodata。
Another option for identifying unknown or invalid data is a separate band that acts as a flag for each cell, indicating whether the data is valid or not.
用于识别未知或无效数据的另一个选项是一个单独的带,该带充当每个单元格的标志,指示数据是否有效。
Nodata Values Nodata值
Consider the following when selecting Nodata values or performing operations that change cell values:
选择Nodata值或执行更改单元值的操作时,请考虑以下事项:
The Nodata value must be valid for the band interpretation type – that is, fall within the range of acceptable values. For example, -1 is a valid Nodata choice for an Int8 band, but not a UInt8 band.
Nodata值必须对波段解释类型有效-即,在可接受值的范围内。例如,-1对于Int 8波段是有效的Nodata选择,但对于UInt 8波段则不是。
NaN (not a number) is a valid floating point value for Real bands only.
NaN(不是数字)是仅适用于真实的波段的有效浮点值。
-32768 is often used for Int16 bands, as the minimum value for that type.
-32768通常用于Int 16波段,作为该类型的最小值。
Because the Nodata value falls within the acceptable range of values for a band, it is possible to inadvertently mark cells as Nodata (or the inverse) when performing operations that change cell values. Similarly, assigning a new Nodata value to a raster has the risk of marking valid cells as Nodata.
由于Nodata值福尔斯在波段的可接受值范围内,因此在执行更改单元值的操作时,可能会无意中将单元标记为Nodata(或相反)。同样,为栅格分配新的Nodata值也存在将有效像元标记为Nodata的风险。
Zero (0) might seem a good choice for Nodata, but color rasters use zeros to represent black. An alpha band may be better when working with RGB/RGBA images.
零(0)似乎是Nodata的一个不错的选择,但彩色光栅使用零表示黑色。使用RGB/RGBA图像时,Alpha波段可能更好。
Band Properties 带性质
Band properties describe one band on a raster. They can include:
波段属性描述光栅上的一个波段。它们可以包括:
Name 名称
Bands are numbered, starting at zero, and referred to as Band 0, Band 1, Band 2, and so on.
波段从零开始编号,称为波段0、波段1、波段2等。
The Name property optionally stores an additional name for the band, often used to descriptively name Red, Green, Blue, and Alpha bands for color rasters.
Name属性可以选择性地存储波段的其他名称,通常用于命名彩色光栅的红色、绿色、蓝色和Alpha波段。
Interpretation 解释
Data type and bit depth of the band. See Band Interpretation Type above.
带区的数据类型和位深度。参见上面的波段解释类型。
Number of Rows Per Tile
每个瓦片的行数
Number Of Columns Per Tile
每个平铺的列数
Rasters may have internal structures optimized for different storage and access methods.
栅格可能具有针对不同存储和访问方法优化的内部结构。
A cloud-optimized format might store it in 256 by 256 pixel tiles, where another format may store it in horizontal strips that are full raster width by 1 row in height.
云优化格式可能将其存储在256 × 256像素的瓦片中,而另一种格式可能将其存储在全光栅宽度× 1行高度的水平条带中。
These values are not generally useful to users.
这些值通常对用户没有用处。
For the entire raster’s size, see Raster Properties > Resolution (Columns x Rows).
有关整个光栅的大小,请参见光栅属性>分辨率(列x行)。
Nodata Value Nodata值
An optional cell value that represents invalid, unknown, or non-existent data.
一个可选的单元格值,表示无效、未知或不存在的数据。
Number of Palettes 调色板数量
If a band has one or more palettes, this property will contain the total number.
如果一个带区有一个或多个选项板,则此属性将包含总数。
Interleaving 交织
Interleaving is the manner in which cell values are organized for binary storage. These are common methods for multiband rasters:
交错是二进制存储单元值的组织方式。以下是多波段栅格的常用方法:
BIL
Band Interleaved by Line 按行交错的频带
Stores values band by band, per row.
逐段逐行存储值。
RRRRGGGGBBBB
RRRRGGGGBBBB
RRRRGGGGBBBB
RRRRGGGGBBBB
BIP
Band Interleaved by Pixel
按像素交错的波段
Stores values band by band, per pixel.
逐波段、逐像素存储值。
RGBRGBRGBRGB
RGBRGBRGBRGB
RGBRGBRGBRGB
RGBRGBRGBRGB
BSQ
Band Sequential 波段顺序
Stores values by band. 按波段存储值。
RRRR
RRRR
RRRR
RRRR
GGGG
GGGG
GGGG
GGGG
BBBB
BBBB
BBBB
BBBB
Tiled BSQ 平铺BSQ
Tiled Band Sequential (Cloud Optimized)
分片带顺序(云优化)
A variation of BSQ in which values are stored by band, within tiles optimized for efficient streaming retrieval.
BSQ的一种变体,其中值按频带存储在为高效流检索而优化的瓦片内。
RRRR
RRRR
GGGG
GGGG
BBBB
BBBB
RRRR
RRRR
GGGG
GGGG
BBBB
BBBB
Internally, FME uses BSQ for bands and BIP for palettes.
在内部,FME将BSQ用于波段,将BIP用于调色板。
Palettes 选项板
A palette is a lookup table (LUT), correlating a cell’s value with something else. That something else might be an RGB color, a word, or other value.
调色板是一个查找表(LUT),将单元格的值与其他值相关联。其他东西可能是RGB颜色,单词或其他值。
A palette is associated with a specific band. A band may have zero, one, or multiple palettes. Palettes can serve a number of purposes:
调色板与特定波段相关联。一个带区可以具有零个、一个或多个调色板。选项板可用于多种用途:
Reduce file size by paletting a color image, reducing three bands (R,G,B) to a single numeric band
通过调色彩色图像来减小文件大小,将三个波段(R、G、B)减少为一个数字波段
Reducing file size or complexity of a raster by limiting the number of available values
通过限制可用值的数量来减小栅格的文件大小或复杂性
Providing one or more thematic interpretations of a gridded dataset by applying colors or strings – often both, as in the color blue and the string Water.
通过应用颜色或字符串-通常是两者,如蓝色和字符串Water,提供网格数据集的一个或多个主题解释。
Providing descriptive names for values
为值提供描述性名称
Rasters with palettes are sometimes referred to as classified rasters.
带有选项板的栅格有时称为分类栅格。
The palette consists of a series of pairs of palette keys and palette values. The palette key is matched to the band’s cell values, and must have the same interpretation type as the band. Bands must be a UInt8, UInt16, or UInt32 interpretation type to have palettes. Palette keys of UInt64 are not supported.
调色板由一系列成对的调色板键和调色板值组成。调色板键与带区的单元格值匹配,并且必须具有与带区相同的解释类型。波段必须是UInt 8、UInt 16或UInt 32解释类型才能有调色板。不支持UInt 64的私钥。
Palette values can be RGB24, RGBA32, RGB48, RGBA64, Gray8, Gray16, or String, as in this example:
RGB值可以是RGB 24、RGBA 32、RGB 48、RGBA 64、Gray 8、Gray 16或String,如下例所示:
Palette Properties 选项板特性
Palette properties describe one palette on one band of a raster.
栅格属性描述栅格的一个波段上的一个调色板。
Property 财产
Description 描述
Name 名称
Palettes are numbered, starting at zero, and referred to as Palette 0, Palette 1, Palette 2, and so on.
选项板从零开始编号,称为“0”、“1”、“2”等。
The Name property optionally stores an additional name for the palette.
Name属性可以选择存储选项板的其他名称。
Key Interpretation 重点解读
The interpretation type of both the related raster band and the key correlation values.
相关栅格波段和关键相关值的解释类型。
Value Interpretation 价值阐释
The interpretation type of the referenced value, such as an RGB color or descriptive string.
引用值的解释类型,如RGB颜色或描述性字符串。
Palettes and Nodata 调色板和Nodata
Palettes do not directly store Nodata values.
选项板不直接存储Nodata值。
However, since the palette keys are intended to match the band values, a single palette key can be interpreted as Nodata if it matches the band’s Nodata value. This Nodata key also looks up to a palette value, which is then considered the Nodata value.
但是,由于调色板关键字旨在匹配波段值,因此如果单个调色板关键字与波段的Nodata值匹配,则可以将其解释为Nodata。此Nodata键还查找调色板值,然后将其视为Nodata值。
Removing and Resolving Palettes
删除和解析选项板
Palettes can either be simply removed from a band, leaving the original cell values intact, or they can be resolved – that is, have the palette values overwrite the cell values.
可以简单地从带区中删除调色板,使原始单元格值保持不变,也可以解析调色板-即,使调色板值覆盖单元格值。
If the palette values are RGB(A) colors, multiple bands are created to hold each component value.
如果调色板值是RGB(A)颜色,则将创建多个波段来保存每个组件值。
The resulting bands will have their interpretation type adjusted to match the resolved palette values if necessary. The palette is removed.
如有必要,将调整结果条带的解释类型以匹配解析的调色板值。调色板将被删除。
String palettes cannot be resolved.
无法解析字符串调色板。
World and TAB Files World和TAB文件
Both world files and TAB files are sidecar text files – ancillary files that carry additional information about a raster when necessary.
世界文件和TAB文件都是sidecar文本文件,即在必要时携带有关光栅的附加信息的辅助文件。
World files contain only georeferencing affine transformation values, whereas TAB files may contain control points, coordinate system, and sometimes user attributes.
世界文件仅包含地理参考仿射变换值,而TAB文件可能包含控制点、坐标系,有时还包含用户属性。
Readers that read both world and TAB files give precedence to the world file for georeferencing.
同时读取坐标文件和TAB文件的读取器优先考虑坐标文件进行地理配准。
World Files 坐标文件
World files contain raster georeferencing information by way of an affine transformation, that is, x and y values for origin, spacing, and rotation (skew).The file name will match the corresponding raster, while the file extension varies between formats, but generally contains the letter w such as WLD, TFW, and BQW.
World文件通过仿射变换包含栅格地理配准信息,即原点、间距和旋转(倾斜)的x和y值。文件名将与相应的栅格匹配,而文件扩展名因格式而异,但通常包含字母w,如WLD、TFW和BQW。
Some raster format readers will read world files present alongside a dataset, and many raster writers have the option to generate a world file to accompany the output dataset.
某些光栅格式读取器将读取与数据集一起存在的世界文件,并且许多光栅写入器可以选择生成世界文件以伴随输出数据集。
If different georeferencing values are provided in the world file versus the raster, the world file takes precedence over the internal raster values.
如果在坐标文件和栅格中提供了不同的地理配准值,则坐标文件优先于内部栅格值。
Most raster format writers will not create a world file if the output raster contains only default georeferencing information: an origin of (0, 0), spacing of 1.0, and rotation of 0.0.
如果输出栅格仅包含默认地理配准信息:原点(0,0)、间距1.0和旋转0.0,则大多数栅格格式编写器不会创建坐标文件。
Refer to specific format reader/writer documentation for details of world file support.
有关world文件支持的详细信息,请参阅特定格式的读取器/写入器文档。
TAB Files TAB文件
TAB files contain raster georeferencing information by way of control points and a coordinate system definition. User attributes are sometimes stored here as well.
TAB文件通过控制点和坐标系定义包含栅格地理配准信息。用户属性有时也存储在这里。
Control points pair individual cells with real-world coordinates, and can represent the raster’s extents (corners) or specified Ground Control Points.
控制点将单个单元与真实坐标配对,并且可以表示光栅的范围(角点)或指定的地面控制点。
Most raster format readers will read TAB files present alongside a raster dataset, and most raster format writers have an option to generate a TAB file to accompany the output dataset.
大多数光栅格式读取器将读取光栅数据集旁边的TAB文件,并且大多数光栅格式编写器都可以选择生成TAB文件以伴随输出数据集。
Attributes are not generally a part of raster TAB files. However, FME will read and write attributes to raster TAB files in the same manner as it does for vector TAB files. This enables the storage of user attributes for many formats that do not otherwise support attribution. To determine whether a raster format can store user attribute information via TAB files, see User-Defined Attributes in the specific format reader/writer documentation.
属性通常不是光栅TAB文件的一部分。但是,FME将以与矢量TAB文件相同的方式读取属性并将其写入栅格TAB文件。这使得能够存储许多格式的用户属性,否则不支持属性。要确定光栅格式是否可以通过TAB文件存储用户属性信息,请参阅特定格式读取器/写入器文档中的用户定义属性。
If different georeferencing values are provided in the TAB file versus the raster, the TAB file takes precedence over the internal raster values.
如果TAB文件中提供的地理配准值与栅格中提供的地理配准值不同,则TAB文件优先于内部栅格值。
Refer to specific format reader/writer documentation for details of TAB file support.
有关TAB文件支持的详细信息,请参阅特定格式读取器/写入器文档。
Raster Processing 光栅处理
FME has a selection of transformers for processing rasters.
FME有一系列用于处理光栅的变压器。
FME features with raster geometry cannot be processed in all the ways that vector features can. If an unsupported operation for a raster is attempted, a vector FME polygon feature is used instead. This substitute feature represents the original raster bounding box, and contains the original attributes.
无法以矢量要素的所有方式处理具有栅格几何的FME要素。如果尝试对光栅执行不受支持的操作,则会改用矢量FME多边形要素。此替换特征表示原始光栅边界框,并包含原始属性。
Band and Palette Selection
波段和波段选择
FME transformers that support band and/or palette selection are able to operate on chosen bands and palettes, rather than the entire raster (all bands and palettes).
支持波段和/或调色板选择的FME变换器能够对所选波段和调色板而不是整个光栅(所有波段和调色板)进行操作。
The default state of a raster is all bands and all palettes selected. To change that, use a RasterSelector to specify which bands and/or palettes are to be active and selected. Subsequent transformers will operate on those chosen bands and/or palettes only until the selection is changed.
光栅的默认状态是所有波段和所有选项板均处于选定状态。若要更改此设置,请使用光栅尺指定要激活和选定的波段和/或调色板。后续的变换器将仅在这些选定的波段和/或调色板上操作,直到选择被更改。
Use another RasterSelector to re-select all bands and palettes to return to the default state.
使用另一个光栅重新选择所有波段和调色板以返回默认状态。
Bands and palettes are numbered, starting at zero, and are selected by their number(s).
标注栏和选项板从零开始编号,并按其编号进行选择。
Tiling and Mosaicking 平铺和镶嵌
A raster can be tiled into a series of smaller adjacent rasters, and multiple adjacent rasters can be mosaicked into one larger raster.
一个栅格可以平铺成一系列较小的相邻栅格,多个相邻栅格可以镶嵌成一个较大的栅格。
Band Combining and Separating
波段合并与分离
Band combining is not mosaicking – it is the creation of a multi-band raster by stacking multiple rasters that have identical extents and resolution into a single raster. All bands retain their values, unaltered.
波段组合不是镶嵌-它是通过将具有相同范围和分辨率的多个栅格堆叠到单个栅格中来创建多波段栅格。所有波段都保持其值不变。
Examples include assembling an RGB raster from three individual red, green, and blue band rasters, or generating a scientific gridded dataset with recurring measurements over a time period.
示例包括从三个单独的红色、绿色和蓝色波段光栅组装RGB光栅,或生成具有在一段时间内重复测量的科学网格数据集。
Band separating is the inverse operation – creating one raster per band and/or palette of a multi-band (or multi-palette) raster. A common use is writing multi-band or multi-palette rasters to formats that support only single-band or single-palette output.
波段分离是逆操作-为每个波段和/或多波段(或多调色板)光栅的调色板创建一个光栅。一种常见的用法是将多波段或多调色板栅格写入仅支持单波段或单调色板输出的格式。
Pyramiding 隆背
Pyramids are downsampled (lower resolution) versions of a raster, sometimes referred to as overviews or thumbnails. They are usually generated to improve performance, and are particularly useful for web streaming rasters.
金字塔是栅格的降采样(较低分辨率)版本,有时称为概视图或缩略图。它们通常是为了提高性能而生成的,对于Web流栅格特别有用。
When zooming in and out, cached pyramids can display more quickly than resampling the raster at each zoom request.
放大和缩小时,缓存金字塔的显示速度比每次缩放请求时重新显示栅格的速度更快。
Compression 压缩
Rasters can be rather large in terms of storage space.
栅格在存储空间方面可能相当大。
A variety of methods exist to compress rasters, reducing their size. These algorithms fall under two categories:
有多种方法可以压缩栅格,从而减小其大小。这些算法分为两类:
Lossless – compresses the raster while preserving its original cell values. Examples include:
无损-压缩光栅,同时保留其原始像元值。示例包括:
Runlength coding 游程长度编码
Blockwise coding Bundle编码
Quadtree coding 四叉树编码
Huffman coding 霍夫曼编码
LZ77
Lossy – compresses the raster with some generalization of cell values, typically in color variation not noticeable by the human eye. Examples include:
有损-使用一些单元值的概化(通常是人眼无法察觉的颜色变化)压缩光栅。示例包括:
Discrete Cosine Transform (DCT) – such as JPEG
离散余弦变换(DCT)-如JPEG
Wavelet compression – such as JPEG 2000
小波压缩-如JPEG 2000
Lossy methods can usually produce higher compression ratios than lossless.
有损方法通常可以产生比无损方法更高的压缩比。
Raster size can also be reduced by reducing resolution (downsampling) to increase cell size, or by paletting, which reduces and generalizes values to a limited set. Both of these methods are lossy.
也可以通过降低分辨率(缩减采样)来增加像元大小,或者通过调色板(将值缩减并概括为有限的集合)来减小栅格大小。这两种方法都是有损的。
Raster File Naming 光栅文件
FME features with raster geometry each typically represent one raster data file, though some raster format datasets such as GeoTIFF can contain multiple images.
每个具有栅格几何的FME要素通常表示一个栅格数据文件,但某些栅格格式数据集(如GeoTIFF)可以包含多个图像。
Raster writers typically accept a folder as a destination dataset.
光栅写入器通常接受文件夹作为目标数据集。
When writing multiple raster files for one dataset folder, the feature type name is used to determine the filename. If multiple features are written to the same dataset, the name will be suffixed to be unique.
为一个数据集文件夹写入多个光栅文件时,要素类型名称用于确定文件名。如果将多个要素写入同一数据集,则名称将添加唯一后缀。
Most file-based raster format writers fan out on fme_basename. The feature type will be the value of the fme_basename attribute, which is set by all raster format readers to be the filename, without path or extension.
大多数基于文件的光栅格式编写器都在fme_baseband上展开。要素类型将是fme_baseband属性的值,所有光栅格式读取器都将该属性设置为文件名,不带路径或扩展名。
For example, on reading the two files image1.tif and image2.tif, two features would be produced- one with an fme_basename value of image1, and one with a value of image2. If these two features were then sent to a PNG writer fanning out on fme_basename, two new files would be produced – image1.png and image2.png.
例如,在阅读两个文件image1.tif和image2.tif时,将生成两个特征-一个fme_baseline值为image 1,另一个值为image 2。如果将这两个特征发送到在fme_baseline上展开的PNG编写器,则会生成两个新文件-image1.png和image2.png。
Raster format writers that store their data in files avoid overwriting existing files and differentiate output files from one another when multiple rasters are written (particularly if the writer outputs one file per raster feature). A simple renaming mechanism prevents name collisions. The first output file is written using the name requested in the workspace. Additional files are automatically distinguished by appending sequential numbers to the filenames. For example, if four rasters are written to the same feature type, named image, the result is a set of output files with the names image.tif, image_1.tif, image_2.tif, and image_3.tif.
将数据存储在文件中的光栅格式编写器避免了重复现有文件,并在写入多个光栅时(特别是编写器为每个光栅要素输出一个文件时)将输出文件彼此区分开来。简单的重命名机制可以防止名称冲突。第一个输出文件是使用工作区中请求的名称编写的。附加文件通过在文件名后附加序号来自动区分。例如,如果将四个光栅写入同一要素类型(名为image),则结果是一组名为image.tif、image_1.tif、image_2.tif和image_3.tif的输出文件。
Note that renaming the output files only occurs within a single instance of the writer within a given translation. Multiple translations of the same workspace that incorporates a file-based raster writer will overwrite previous file output if name collisions occur. Similarly, using multiple writer instances targeted at the same folder is considered unsafe if the same feature types are used in both translations, as overwriting may occur.
请注意,重命名输出文件仅发生在给定翻译中的编写器的单个实例中。如果发生名称冲突,则合并了基于文件的光栅写入器的同一工作区的多次转换将覆盖以前的文件输出。同样,如果在两个翻译中使用相同的要素类型,则使用针对同一文件夹的多个编写器实例被认为是不安全的,因为可能会发生错误。