Workspace To Raster Dataset (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates a raster dataset mosaic from all the raster datasets that are stored within the specified workspace. The target raster dataset must already exist to run this tool.
Usage tips
The target raster dataset must already exist for the tool to run.
If a target raster dataset does not already exist, use the Create Raster Dataset tool to create a new raster dataset.
All raster datasets within the specified workspace will be mosaicked into the target raster dataset.
Since mosaicking will take place, you will need to specify the mosaic method and colormap mode to use.
If the target raster dataset is an empty raster dataset, the cell size and spatial reference of the first input raster dataset will be applied to the mosaic.
When mosaicking raster datasets to a file geodatabase or ArcSDE geodatabase raster dataset target, use LAST mosaic mode when applicable; it is the fastest way to load rasters to file geodatabase and ArcSDE geodatabase.
For mosaicking of discrete data, the First, Last, Minimum, or Maximum options will give the most meaningful results. The Blend and Mean options are best suited for continuous data.
For floating-point input rasters datasets of different resolutions, it is recommended to resample all the data using bilinear interpolation or cubic convolution before running Mosaic. Otherwise, Mosaic will automatically resample the rasters using nearest neighbor (which is not appropriate for the continuous type of data) and the current cell size setting in the analysis environment and before mosaicking.
The following environment setting affects this tool: current workspace.
Command line syntax
An overview of the Command Line window
Workspacetorasterdataset_management <in_workspace> <in_raster_dataset> {NONE | INCLUDE_SUBDIRECTORIES} {mosaic_type} {REJECT | FIRST | LAST | MATCH} {background_value} {nodata_value} {NONE | OneBitTo8Bit} {mosaicking_tolerance}
Parameter | Explanation | Data Type |
<in_workspace> |
The workspace that contains all the raster datasets to be mosaicked into the raster dataset. |
Workspace |
<in_raster_dataset> |
The raster dataset that will have all the rasters from the workspace mosaicked into it. The raster dataset must already exist. |
Raster Dataset |
{NONE | INCLUDE_SUBDIRECTORIES} |
Specify whether to include subdirectories or not.
|
Boolean |
{mosaic_type} |
The method used to mosaic overlapping areas.
|
String |
{REJECT | FIRST | LAST | MATCH} |
The method used to choose which colormap from the input rasters will be applied to the mosaic output.
|
String |
{background_value} |
Specifies the pixel value in the raster dataset that would be recognized as a background value and not a valuable part of the data. The pixel value specified will be set to NoData in the output raster dataset. Use this option after rotating or projecting an image to remove the unwanted values created around the original raster data. Even if this value is not unique in the dataset, it 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. |
Double |
{nodata_value} |
All the pixels with the specified value will be set to NoData in the output raster dataset. |
Double |
{NONE | OneBitTo8Bit} |
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. 1-bit raster datasets 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 properly appearing raster dataset in the display.
|
Boolean |
{mosaicking_tolerance} |
Controls whether resampling of the pixels takes place. If the difference in pixel alignment of the incoming dataset and the target dataset is less than the tolerance, no resample is performed (instead, a shift is performed). The unit of tolerance is pixel; the valid values range is 0 to 0.9999. |
Double |
Workspacetorastercatalog c:/Redlands_data 'Database Connections/Connection to raster.sde/raster.redlands_dataset' INCLUDE_SUBDIRECTORIES # # # # NONE #
Scripting syntax
About getting started with writing geoprocessing scripts
Workspacetorasterdataset_management (in_workspace, in_raster_dataset, include_subdirectories, mosaic_type, colormap, background_value, nodata_value, onebit_to_eightbit, mosaicking_tolerance)
Parameter | Explanation | Data Type |
in_workspace (Required) |
The workspace that contains all the raster datasets to be mosaicked into the raster dataset. |
Workspace |
in_raster_dataset (Required) |
The raster dataset that will have all the rasters from the workspace mosaicked into it. The raster dataset must already exist. |
Raster Dataset |
include_subdirectories (Optional) |
Specify whether to include subdirectories or not.
|
Boolean |
mosaic_type (Optional) |
The method used to mosaic overlapping areas.
|
String |
colormap (Optional) |
The method used to choose which colormap from the input rasters will be applied to the mosaic output.
|
String |
background_value (Optional) |
Specifies the pixel value in the raster dataset that would be recognized as a background value and not a valuable part of the data. The pixel value specified will be set to NoData in the output raster dataset. Use this option after rotating or projecting an image to remove the unwanted values created around the original raster data. Even if this value is not unique in the dataset, it 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. |
Double |
nodata_value (Optional) |
All the pixels with the specified value will be set to NoData in the output raster dataset. |
Double |
onebit_to_eightbit (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. 1-bit raster datasets 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 properly appearing raster dataset in the display.
|
Boolean |
mosaicking_tolerance (Optional) |
Controls whether resampling of the pixels takes place. If the difference in pixel alignment of the incoming dataset and the target dataset is less than the tolerance, no resample is performed (instead, a shift is performed). The unit of tolerance is pixel; the valid values range is 0 to 0.9999. |
Double |
# Create the geoprocessing object import arcgisscripting gp = arcgisscripting.create() gp.workspacetorasterdataset_management("c:/redlands_data", 'Database Connections/Connection to raster.sde/raster.redlands_catalog', 'INCLUDE_SUBDIRECTORIES','#','#','#','#','NONE','#')