Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Raster toolset > Tools

Workspace To Raster Dataset (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

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

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.

  • NONE — Does not include subdirectories.
  • INCLUDE_SUBDIRECTORIES — Includes all the raster datasets within the subdirectories when mosaicking.

Boolean
{mosaic_type}

The method used to mosaic overlapping areas.

  • FIRST — The output cell value of the overlapping areas will be the value from the first raster dataset in the list.
  • LAST — The output cell value of the overlapping areas will be the value from the last raster dataset in the list. This is the default.
  • BLEND — The output cell value of the overlapping areas will be a blend of values of the overlapped cells. This blend value on a weight-based algorithm is dependent on the distance from the pixel to the edge within the overlapping area.
  • MEAN — The output cell value of the overlapping areas will be the mean value of the overlapped cells.
  • MINIMUM — The output cell value of the overlapping areas will be the minimum value of the overlapped cells.
  • MAXIMUM — The output cell value of the overlapping areas will be the maximum value of the overlapped cells.

String
{REJECT | FIRST | LAST | MATCH}

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

  • REJECT — Only the raster datasets that do not have a colormap associated with them will be added to the mosaic.
  • FIRST — The colormap from the first raster dataset in the list will be applied to the target raster dataset mosaic. This is the default.
  • LAST — The colormap from the last raster dataset in the list will be applied to the target raster dataset mosaic.
  • MATCH — Makes sure that the colors in the final colormap encompass all the colormaps in the mosaic list. The actual value and color will be different from the other colormaps, but the mosaic will ensure that the colors with the display are correct.

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.

  • NONE — No conversion will be done. This is the default.
  • OneBitTo8Bit — The input raster will be converted.

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
Data types for geoprocessing tool parameters


Command line example

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.

  • NONE — Does not include subdirectories.
  • INCLUDE_SUBDIRECTORIES — Includes all the raster datasets within the subdirectories when mosaicking.

Boolean
mosaic_type (Optional)

The method used to mosaic overlapping areas.

  • FIRST — The output cell value of the overlapping areas will be the value from the first raster dataset in the list.
  • LAST — The output cell value of the overlapping areas will be the value from the last raster dataset in the list. This is the default.
  • BLEND — The output cell value of the overlapping areas will be a blend of values of the overlapped cells. This blend value on a weight-based algorithm is dependent on the distance from the pixel to the edge within the overlapping area.
  • MEAN — The output cell value of the overlapping areas will be the mean value of the overlapped cells.
  • MINIMUM — The output cell value of the overlapping areas will be the minimum value of the overlapped cells.
  • MAXIMUM — The output cell value of the overlapping areas will be the maximum value of the overlapped cells.

String
colormap (Optional)

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

  • REJECT — Only the raster datasets that do not have a colormap associated with them will be added to the mosaic.
  • FIRST — The colormap from the first raster dataset in the list will be applied to the target raster dataset mosaic. This is the default.
  • LAST — The colormap from the last raster dataset in the list will be applied to the target raster dataset mosaic.
  • MATCH — Makes sure that the colors in the final colormap encompass all the colormaps in the mosaic list. The actual value and color will be different from the other colormaps, but the mosaic will ensure that the colors with the display are correct.

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.

  • NONE — No conversion will be done. This is the default.
  • OneBitTo8Bit — The input raster will be converted.

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

Data types for geoprocessing tool parameters


Script example

# 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','#')

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.