Create Raster Dataset (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates a raster dataset on file or in a geodatabase.
Usage tips
When you create a raster dataset, you are creating an empty location to contain a single raster dataset. You can then mosaic or load one or more raster datasets into your empty one, or you can use this dataset with ArcGIS Spatial Analyst operations to receive results.
You can save your output to BMP, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, personal geodatabase, file geodatabase, or ArcSDE geodatabase.
When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for TIFF, or no extension for GRID.
When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a compression type and compression quality within the Raster Storage Settings in the Environment Settings dialog box.
The GIF format does not support multiband; therefore, it is not a valid output format unless your raster dataset is single band.
It is best to choose to build pyramids, because pyramids can speed up the display of raster data since the server or computer returns only the data at a specified resolution that is required for the display.
When you are entering commands and variables in the Geoprocessing dialog box and you come to a variable you do not know how to enter, press F8. You may need to do this when entering the spatial reference variable.
Command line syntax
An overview of the Command Line window
CreateRasterDataset_management <out_path> <out_name> {cellsize} {8_BIT_UNSIGNED | 1_BIT | 2_BIT | 4_BIT | 8_BIT_SIGNED | 16_BIT_UNSIGNED | 16_BIT_SIGNED | 32_BIT_UNSIGNED | 32_BIT_SIGNED | 32_BIT_FLOAT | 64_BIT} {raster_spatial_reference} {number_of_bands} {config_keyword} {pyramids} {tile_size} {compression} {pyramid_origin}
Parameter | Explanation | Data Type |
<out_path> |
The output location to contain the raster dataset. |
Workspace | Raster Catalog |
<out_name> |
The name of the raster dataset to be created. When storing a raster dataset in a geodatabase (personal geodatabase, file geodatabase, or ArcSDE geodatabase), no file extension should be added to the name of the raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for TIFF, or no extension for GRID. When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase you can specify a compression type and compression quality. |
String |
{cellsize} |
The cell size for the new raster dataset. |
Double |
{8_BIT_UNSIGNED | 1_BIT | 2_BIT | 4_BIT | 8_BIT_SIGNED | 16_BIT_UNSIGNED | 16_BIT_SIGNED | 32_BIT_UNSIGNED | 32_BIT_SIGNED | 32_BIT_FLOAT | 64_BIT} |
Specifies the data type of the cell values. Not all data types are supported by all raster formats. Check the Supported raster dataset file formats topic in the Online Help to be sure the format you are using will support the data type you need.
|
String |
{raster_spatial_reference} |
The coordinate system for the raster dataset. If this is not specified, the coordinate system set in the environment settings will be used. |
Coordinate System |
{number_of_bands} |
The number of bands to be contained by the raster dataset. |
Long |
{config_keyword} |
Specifies the storage parameters (configuration) for geodatabases in 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 |
{pyramids} |
Use this option to create pyramids. For pyramid levels, choose a number of -1 or higher. A value of 0 will not build any pyramids, and a value of -1 will automatically choose the correct number of pyramid layers to create. The resampling technique instructs ArcGIS on how to resample the data when building the pyramids.
|
Pyramid |
{tile_size} |
The tile width controls the number of pixels you can store in each tile. This is specified as a number of pixels in x. The default tile width is 128. The tile height controls the number of pixels you can store in each tile. This is specified as a number of pixels in y. The default tile width is 128. Only file geodatabases and ArcSDE geodatabases use tile size. |
Tile Size |
{compression} |
This defines the type of data compression that will be used to store the raster dataset.
The JPEG and JPEG 2000 compression quality can range from 1 to 100. A higher number means better image quality but less compression. |
Compression |
{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 raster mosaics in a file geodatabase or an ArcSDE geodatabase, especially if you plan on mosaicking to them over time (for example, for updating). The pyramid reference point should be set to the upper most left corner of your raster dataset. 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 pyramid updates the parts of the pyramid that do not exist due to the new mosaicked raster 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 |
CreateRasterDataset d:\redlands_data redlands.tif 30 8_BIT_UNSIGNED # 3 # PYRAMIDS CUBIC # # JPEG 50
Scripting syntax
About getting started with writing geoprocessing scripts
CreateRasterDataset_management (out_path, out_name, cellsize, pixel_type, raster_spatial_reference, number_of_bands, config_keyword, pyramids, tile_size, compression, pyramid_origin)
Parameter | Explanation | Data Type |
out_path (Required) |
The output location to contain the raster dataset. |
Workspace | Raster Catalog |
out_name (Required) |
The name of the raster dataset to be created. When storing a raster dataset in a geodatabase (personal geodatabase, file geodatabase, or ArcSDE geodatabase), no file extension should be added to the name of the raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for TIFF, or no extension for GRID. When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase you can specify a compression type and compression quality. |
String |
cellsize (Optional) |
The cell size for the new raster dataset. |
Double |
pixel_type (Optional) |
Specifies the data type of the cell values. Not all data types are supported by all raster formats. Check the Supported raster dataset file formats topic in the Online Help to be sure the format you are using will support the data type you need.
|
String |
raster_spatial_reference (Optional) |
The coordinate system for the raster dataset. If this is not specified, the coordinate system set in the environment settings will be used. |
Coordinate System |
number_of_bands (Optional) |
The number of bands to be contained by the raster dataset. |
Long |
config_keyword (Optional) |
Specifies the storage parameters (configuration) for geodatabases in 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 |
pyramids (Optional) |
Use this option to create pyramids. For pyramid levels, choose a number of -1 or higher. A value of 0 will not build any pyramids, and a value of -1 will automatically choose the correct number of pyramid layers to create. The resampling technique instructs ArcGIS on how to resample the data when building the pyramids.
|
Pyramid |
tile_size (Optional) |
The tile width controls the number of pixels you can store in each tile. This is specified as a number of pixels in x. The default tile width is 128. The tile height controls the number of pixels you can store in each tile. This is specified as a number of pixels in y. The default tile width is 128. Only file geodatabases and ArcSDE geodatabases use tile size. |
Tile Size |
compression (Optional) |
This defines the type of data compression that will be used to store the raster dataset.
The JPEG and JPEG 2000 compression quality can range from 1 to 100. A higher number means better image quality but less compression. |
Compression |
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 raster mosaics in a file geodatabase or an ArcSDE geodatabase, especially if you plan on mosaicking to them over time (for example, for updating). The pyramid reference point should be set to the upper most left corner of your raster dataset. 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 pyramid updates the parts of the pyramid that do not exist due to the new mosaicked raster 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 |
# CreateRasterDataset_sample.py # Description: Create an empty raster dataset # Requirements: None # Author: ESRI # Date: 3/2/04 # Usage: CreateRasterDataset_management <out_path> <out_name> {cellsize} {8_BIT_UNSIGNED | 1_BIT | 2_BIT | 4_BIT | 8_BIT_SIGNED | 16_BIT_UNSIGNED | 16_BIT_SIGNED | 32_BIT_UNSIGNED | 32_BIT_SIGNED | 32_BIT_FLOAT | 64_BIT} {raster_spatial_reference} {number_of_bands} {config_keyword} {pyramids} {tile_size} {compression} {pyramid_origin} # Command line:CreateRasterDataset_management 'Database Connections/Connection to raster.sde' myraster 30 8_BIT_UNSIGNED # 1 # 'PYRAMIDS -1 BILINEAR' '128 128' LZ77 # import arcgisscripting gp = arcgisscripting.create() gp.toolbox="management" # Create an empty raster dataset in the output ArcSDE workspace with the following parameters: # cellsize : 30 # pixel type: 8 bit unsigned int # number of band: 1 # pyramid option: build full pyramids with bilinear interpolation # compression: LZ77 # tile size: 128, 128 gp.CreateRasterDataset_management("Database Connections/Connection to raster.sde","myraster","30","8_BIT_UNSIGNED","#","1","#","PYRAMIDS -1 BILINEAR","128 128","LZ77","#")