Workspace To Mosaic (Samples)

摘要

Mosaics all the raster datasets in a workspace, or geodatabase, to an output raster dataset. The output raster dataset must already exist.

旧版本旧版本:
This tool has been deprecated. For more information, see An overview of the Samples toolbox.

用法

语法

WorkspaceToMosaic_samples (input_workspace, output_raster, {mosaic_method}, mosaic_colormap_mode, {ignore_background_value}, {nodata_value}, {convert_1_bit_data_to_8_bit}, {mosaic_tolerance})
参数说明数据类型
input_workspace

输入工作空间可以是目录、个人地理数据库、文件地理数据库或 ArcSDE 地理数据库。

Folder | Workspace
output_raster

The output raster dataset into which the other input raster datasets are mosaicked. The output raster dataset must already exist.

Raster Dataset
mosaic_method
(可选)

The method used to mosaic overlapping areas.

  • FIRSTThe output cell value of the overlapping areas will be the value from the first raster dataset mosaicked into that location.
  • LASTThe output cell value of the overlapping areas will be the value from the last raster dataset mosaicked into that location. This is the default.
  • BLENDThe output cell value of the overlapping areas will be a horizontally weighted calculation of the values of the cells in the overlapping area.
  • MEANThe output cell value of the overlapping areas will be the average value of the overlapping cells.
  • MINIMUMThe output cell value of the overlapping areas will be the minimum value of the overlapping cells.
  • MAXIMUMThe output cell value of the overlapping areas will be the maximum value of the overlapping cells.
String
mosaic_colormap_mode

The method used to choose which colormap from the input rasters will be applied to the mosaic output.

  • FIRSTThe colormap from the first raster dataset in the list will be applied to the output raster mosaic. This is the default.
  • LASTThe colormap from the last raster dataset in the list will be applied to the output raster mosaic.
  • MATCHEnsures that all the colors from the input raster datasets are in the final colormap and that they are all unique.
  • REJECTOnly the raster datasets that do not have a colormap associated with them will be mosaicked.
String
ignore_background_value
(可选)

使用此选项移除在栅格数据周围创建的不需要的值。指定的值与栅格数据集中的其他有用数据不同。例如,栅格边界上为零的值不同于栅格数据集内的零值。

指定的像素值在输出栅格数据集中将被设置为 NoData。

对于基于文件的栅格和个人地理数据库栅格,为了忽略背景值,“忽略背景值”必须设置为与 NoData 相同的值。ArcSDE 和文件地理数据库栅格无需经过此额外步骤即可忽略背景值。

Double
nodata_value
(可选)

具有指定值的所有像素将在输出栅格数据集中被设置为 NoData。

Double
convert_1_bit_data_to_8_bit
(可选)

选择是否将输入 1 位栅格数据集转换为 8 位栅格数据集。使用这种转换方法时,输入栅格数据集中的值 1 将在输出栅格数据集中更改为 255。这在将 1 位栅格数据集导入 ArcSDE 时很有帮助。1 位栅格数据集存储在文件系统中时包含 8 位金字塔图层,但在 ArcSDE 中,1 位栅格数据集只能包含 1 位金字塔图层,这使得显示画面看起来没有吸引力。通过在 ArcSDE 中将数据转换为 8 位,可将金字塔图层构建为 8 位而非 1 位,从而在显示画面中生成独特的栅格数据集。

  • NONE不执行任何转换。这是默认设置。
  • OneBitTo8Bit将转换输入栅格。
Boolean
mosaic_tolerance
(可选)

发生镶嵌时,目标及源像素并不总是准确地排成直线。当存在像素偏差时,需要决定是否执行重采样,或是否应当平移数据。镶嵌容差可控制是否对像素执行重采样,或者是否应当平移像素。

如果(传入的数据集与目标数据集之间的)像素偏差大于该容差,则执行重采样。如果(传入的数据集与目标数据集之间的)像素偏差小于该容差,则不执行重采样(而是执行平移)。

The unit of tolerance is a pixel; the valid value range is 0 to 0.9999. The maximum a pixel can be shifted is 0.5, so anything you set that is greater than 0.5 will guarentee a shift takes place. A tolerance of zero guantees resampling, if there is a misalignment in pixels.

例如,源像素和目标像素的偏差值为 0.25。如果将镶嵌容差设置为 0.2,由于像素偏差大于该容差,因此将执行重采样。如果将镶嵌容差设置为 0.3,则会平移像素。

Double

代码示例

import arcgisscripting
gp = arcgisscripting.create()
 
gp.WorkspaceToMosaic_samples("D:\\temp\\tempws", "Database Connections\\raster.sde\\RASTER.WRKSPTOMOSAIC", "LAST", "FIRST", "#", "#", "#", "0")

环境

此工具不使用任何地理处理环境

许可信息

ArcView: 是
ArcEditor: 是
ArcInfo: 是

4/26/2012