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.
用法
-
The input workspace should contain all the raster datasets you want to mosaic together. The inputs must have the same number of bands; otherwise, the tool will not run.
-
If your output raster dataset is stored in the file system, you must specify the proper extension for the new raster dataset. Valid outputs to a file system raster dataset include ESRI GRID (no extension), ERDAS IMAGINE (.img), and TIFF (.tif).
-
此示例工具是使用 Python 创建的。可对代码进行查看和编辑,以便帮助您编写自己的脚本。
-
“栅格分析环境设置”对该工具而言不可用。
语法
参数 | 说明 | 数据类型 |
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.
| String |
colormap_mode (可选) |
The method used to choose which colormap from the input rasters will be applied to the mosaic output.
| 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 位,从而在显示画面中生成独特的栅格数据集。
| 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")