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

Create 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 on file or in a geodatabase.


Usage tips

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.

  • 1_BIT — A 1-bit unsigned integer. The values can be 0 or 1.
  • 2_BIT — A 2-bit unsigned integer. The values supported can be from 0 to 3.
  • 4_BIT — A 4-bit unsigned integer. The values supported can be from 0 to 15.
  • 8_BIT_UNSIGNED — An 8-bit, unsigned data type. The values can range from 0 to 255. This is the default.
  • 8_BIT_SIGNED — An 8-bit signed data type. The values can range from -128 to 127.
  • 16_BIT_UNSIGNED — A 16-bit, unsigned data type. The values can range from 0 to 65,535.
  • 16_BIT_SIGNED — A 16-bit signed data type. The values can range from -32,768 to 32,767.
  • 32_BIT_UNSIGNED — A 32-bit unsigned data type. The values can range from 0 to 4,294,967,295.
  • 32_BIT_SIGNED — A 32-bit signed data type supported by GRID. The values can range from -2,147,483,648 to 2,147,483,647.
  • 32_BIT_FLOAT — A 32-bit data type supporting decimals.
  • 64_BIT — A 64-bit data type supporting decimals.

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.

  • NEAREST — Nearest neighbor should be used for nominal data or raster datasets with colormaps such as land use or pseudo-color images.
  • BILINEAR — Bilinear interpolation is best used with continuous data such as satellite imagery or aerial photography.
  • CUBIC — Cubic convolution is best used with continuous data such as satellite imagery or aerial photography. It is similar to bilinear interpolation; however, it resamples the data using a larger matrix.

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.

  • LZ77 — A lossless compression; the values of the cells in the raster will not be changed.
  • JPEG — A lossy compression.
  • JPEG2000 — A lossy compression.
  • NONE — No data compression.

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


Command line example

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.

  • 1_BIT — A 1-bit unsigned integer. The values can be 0 or 1.
  • 2_BIT — A 2-bit unsigned integer. The values supported can be from 0 to 3.
  • 4_BIT — A 4-bit unsigned integer. The values supported can be from 0 to 15.
  • 8_BIT_UNSIGNED — An 8-bit, unsigned data type. The values can range from 0 to 255. This is the default.
  • 8_BIT_SIGNED — An 8-bit signed data type. The values can range from -128 to 127.
  • 16_BIT_UNSIGNED — A 16-bit, unsigned data type. The values can range from 0 to 65,535.
  • 16_BIT_SIGNED — A 16-bit signed data type. The values can range from -32,768 to 32,767.
  • 32_BIT_UNSIGNED — A 32-bit unsigned data type. The values can range from 0 to 4,294,967,295.
  • 32_BIT_SIGNED — A 32-bit signed data type supported by GRID. The values can range from -2,147,483,648 to 2,147,483,647.
  • 32_BIT_FLOAT — A 32-bit data type supporting decimals.
  • 64_BIT — A 64-bit data type supporting decimals.

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.

  • NEAREST — Nearest neighbor should be used for nominal data or raster datasets with colormaps such as land use or pseudo-color images.
  • BILINEAR — Bilinear interpolation is best used with continuous data such as satellite imagery or aerial photography.
  • CUBIC — Cubic convolution is best used with continuous data such as satellite imagery or aerial photography. It is similar to bilinear interpolation; however, it resamples the data using a larger matrix.

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.

  • LZ77 — A lossless compression; the values of the cells in the raster will not be changed.
  • JPEG — A lossy compression.
  • JPEG2000 — A lossy compression.
  • NONE — No data compression.

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

Data types for geoprocessing tool parameters


Script example

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

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