Workspace To New Mosaic (Samples)
Summary
Creates a new raster dataset in the output location and mosaics all the raster datasets in the input workspace, or geodatabase, into it.
Usage
-
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).
-
This sample tool was created using Python. The code can be viewed and edited, to help you write your own scripts.
-
The Raster Analysis Environment Settings are not valid for this tool.
Syntax
Parameter | Explanation | Data Type |
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 (Optional) |
Specifies the storage parameters (configuration) for a file geodatabase and an ArcSDE geodatabase. Personal geodatabases do not use configuration keywords. ArcSDE configuration keywords are set up by your database administrator. | String |
mosaic_mode (Optional) |
The method used to mosaic overlapping areas.
| String |
colormap_mode (Optional) |
The method used to choose which colormap from the input rasters will be applied to the mosaic output.
| String |
pyramid_origin (Optional) |
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 (Optional) |
Use this option to remove the unwanted values created around the raster data. The value specified will be distinguished from other valuable data in the raster dataset. For example, a value of zero along the raster dataset's borders will be distinguished from zero values within the raster dataset. The pixel value specified will be set to NoData in the output raster dataset. For file-based rasters and personal geodatabase rasters, the Ignore Background Value must be set to the same value as NoData in order for the background value to be ignored. ArcSDE and file geodatabase rasters will work without this extra step. | Double |
nodata_value (Optional) |
All the pixels with the specified value will be set to NoData in the output raster dataset. | Double |
convert_1_bit_data_to_8_bit (Optional) |
Choose whether the input 1-bit raster dataset will be converted to an 8-bit raster dataset. In this conversion the value 1 in the input raster dataset will be changed to 255 in the output raster dataset. This is useful when importing a 1-bit raster dataset to ArcSDE. One-bit raster dataset have 8-bit pyramid layers when stored in a file system, but in ArcSDE, 1-bit raster datasets can only have 1-bit pyramid layers, which makes the display unpleasant. By converting the data to 8-bit in ArcSDE, the pyramid layers are built as 8-bit instead of 1-bit, resulting in a proper raster dataset in the display.
| Boolean |
mosaic_tolerance (Optional) |
When mosaicking takes place, the target and the source pixels do not always line up exactly. When there is a misalignment of pixels, a decision needs to be made whether resampling takes place, or whether the data should be shifted. The mosaicking tolerance controls whether resampling of the pixels take place, or if the pixels should be shifted. If the difference in pixel alignment (of the incoming dataset and the target dataset) is greater than the tolerance, resampling will take place. If the difference in pixel alignment (of the incoming dataset and the target dataset) is less than the tolerance, resampling will not take place (instead, a shift is performed). 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. For example, the source and target pixels have a misalignment of 0.25. If the mosaicking tolerance is set to 0.2, then resampling will take place since the pixel misalignment is greater than the tolerance. If the mosaicking tolerance is set to 0.3, then the pixels will be shifted. | Float |
Code Sample
import arcgisscripting gp = arcgisscripting.create() gp.WorkspaceToNewMosaic_samples("D:\\temp\\tempws, "Database Connections\\raster.sde", "wrksp_to_new_mosaic", "#" "LAST", "FIRST", "#", "#", "#", "#", "0")