Workspace To New Mosaic (Samples)

摘要

Creates a new raster dataset in the output location and mosaics all the raster datasets in the input workspace, or geodatabase, into it.

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

用法

语法

WorkspaceToNewMosaic_samples (input_workspace, output_location, output_raster_name, {config_keyword}, {mosaic_mode}, {colormap_mode}, {pyramid_origin}, {ignore_background_value}, {nodata_value}, {convert_1_bit_data_to_8_bit}, {mosaic_tolerance})
参数说明数据类型
input_workspace

The location where the raster datasets will be mosaicked into the output raster dataset. It can be a directory, personal geodatabase, file geodatabase, or an enterprise geodatabase.

Folder | Workspace
output_location

The location where the new raster dataset will be created.

Folder | Workspace
output_raster_name

The dataset name of the output raster.

String
config_keyword
(可选)

可用于指定文件地理数据库和 ArcSDE 地理数据库的存储参数(配置)。个人地理数据库不使用配置关键字。

ArcSDE 配置关键字由数据库管理员进行设置。

String
mosaic_mode
(可选)

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
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
pyramid_origin
(可选)

This is the origination location of the raster pyramid. It is recommended that you specify this point if you plan on building large mosaics in a file geodatabase or an ArcSDE geodatabase, especially if you are plan on mosaicking to them over time (for example, for updating).

The pyramid reference point should be set to the upper left corner of your raster dataset.

In setting this point for a file geodatabase or an ArcSDE geodatabase, partial pyramiding will be used when updating with a new mosaicked raster dataset. Partial pyramiding updated the parts of the pyramid that do not exist due to the new mosaicked datasets. Therefore, it is good to set your pyramid reference point so that your entire raster mosaic will be below and to the right of this point. However, a pyramid reference point should not be set too large either.

Point
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,则会平移像素。

Float

代码示例

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

环境

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

许可信息

ArcView: 是
ArcEditor: 是
ArcInfo: 是

4/26/2012