ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Create Raster Dataset

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates an empty raster dataset.

Usage

  • When you create a raster dataset, you are creating an empty location to contain a single raster dataset. You can then mosaic or load raster datasets into this location.

  • You can save your output to BIL, BIP, BMP, BSQ, DAT, Esri Grid, GIF, IMG, JPEG, JPEG 2000, PNG, TIFF, or any geodatabase raster dataset.

  • When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a Compression Type type and Compression Quality within the Environment Settings.

  • The GIF format only supports single-band raster datasets.

  • Building pyramids improves the display performance of raster datasets.

  • Calculating statistics allows ArcGIS applications to properly stretch and symbolize raster data for display.

Syntax

CreateRasterDataset_management (out_path, out_name, {cellsize}, pixel_type, {raster_spatial_reference}, number_of_bands, {config_keyword}, {pyramids}, {tile_size}, {compression}, {compression}, {pyramid_origin})
ParameterExplanationData Type
out_path

The output location to store the raster dataset.

Workspace; Raster Catalog
out_name

The name, location and format for the dataset you are creating.

When storing the raster dataset in a file format, you need to specify the file extension:

  • .bil—Esri BIL
  • .bip—Esri BIP
  • .bmp—BMP
  • .bsq—Esri BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • no extension for Esri Grid

When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset.

When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the Environment Settings.

String
cellsize
(Optional)

The cell size for the new raster dataset.

Double
pixel_type

The bit-depth (radiometric resolution) of the output raster dataset. If this is not specified, your raster dataset will be created with a default pixel type of 8-bit unsigned integer.

Not all data types are supported by all raster formats. Check the Supported raster dataset file formats help topic 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 unsigned 8-bit data type. The values supported can be from 0 to 255.
  • 8_BIT_SIGNED —A signed 8-bit data type. The values supported can be 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. 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 output 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 that the output raster dataset will have.

Long
config_keyword
(Optional)

Specifies the storage parameters (configuration) for a file or enterprise geodatabase. 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 Pyramid Resampling Technique defines how the data will be resampled when building the pyramids.

  • NEAREST—Nearest neighbor should be used for nominal data or raster datasets with color maps, 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.

The Pyramid Compression Type defines the method used when compressing the pyramids.

  • DEFAULT—This uses the compression that is normally used by the raster dataset format.
  • LZ77—A lossless compression. The values of the cells in the raster will not be changed.
  • JPEG—A lossy compression.
  • NONE—No data compression.
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 height is 128.

Only geodatabases and enterprise geodatabases use tile size.

Tile Size
compression
(Optional)

Define the type of compression to store the raster dataset.

  • LZ77
  • JPEG —Lossy compression that uses the public JPEG compression algorithm. If you choose JPEG, you can also specify the compression quality. The valid compression quality value ranges are from 0 to 100. This compression can be used for JPEG files and TIFF files.
  • JPEG 2000 —Lossy compression
  • PACKBITS —PackBits compression for TIFF files.
  • LZW —Lossless compression that preserves all raster cell values.
  • PackBits
  • RLE —Run-length encoding for IMG files.
  • CCITT GROUP 3 —Lossless compression for 1-bit data.
  • CCITT GROUP 4 —Lossless compression for 1-bit data.
  • CCITT (1D) —Lossless compression for 1-bit data.
  • NONE —No compression will occur. This is the default.
String
compression
(Optional)

This defines the type of data compression that will be used to store the raster dataset.

  • LZ77 —Lossless.
  • JPEG —Lossy. Uses a compression quality setting.
  • JPEG 2000 —Lossy. Uses a compression quality setting.
  • PackBits —Lossless. Only for TIFF format.
  • LZW —Lossless.
  • RLE —Lossless.
  • CCITT GROUP 3 —Lossless. Only for TIFF format.
  • CCITT GROUP 4 —Lossless. Only for TIFF format.
  • CCITT (1D) —Lossless. Only for TIFF format.
  • 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 mosaics in a file geodatabase or enterprise 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 left corner of your raster dataset.

In setting this point for a file geodatabase or enterprise 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

Code sample

CreateRasterDataset example 1 (Python window)

This is a Python sample for the CreateRasterDataset tool.

import arcpy
arcpy.CreateRasterDataset_management("c:/data", "EmptyTIFF.tif", "2",
                                     "8_BIT_UNSIGNED", "World_Mercator.prj",
                                     "3", "", "PYRAMIDS -1 NEAREST JPEG",
                                     "128 128", "NONE", "")
CreateRasterDataset example 2 (stand-alone script)

This is a Python script sample for the CreateRasterDataset tool.

##==================================
##Create Raster Dataset
##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}

import arcpy
arcpy.env.workspace = r"\\workspace\PrjWorkspace\RasGP"
##Create a empty TIFF format Raster Dataset with the following parameters
##Cellsize: 2
##Pixel type: 8 Bit Unsigned Integer
##Number of Bands: 3
##Pyramid: Build full pyramids with NEAREST interpolation and JPEG compression
##Compression: NONE
##Projection: World_Mercator
##Tile size: 128 128
arcpy.CreateRasterDataset_management("CreateRD","EmptyTIFF.tif","2","8_BIT_UNSIGNED",\
                                     "World_Mercator.prj", "3", "", "PYRAMIDS -1 NEAREST JPEG",\
                                     "128 128", "NONE", "")

##Create a SDE Raster Dataset
##No Spatial Reference, with Pyramid Origin
arcpy.CreateRasterDataset_management("CreateRD\\CreateRD.gdb","NewRD","10","16_BIT_UNSIGNED",\
                                     "", "1", "MAX_FILE_SIZE_4GB", "PYRAMIDS 3 BILINEAR DEFAULT",\
                                     "128 128", "JPEG2000 80", "-20037508.34278775 30198185.16987658")

Environments

  • Current Workspace
  • Scratch Workspace
  • Output Coordinate System
  • Extent
  • Snap Raster
  • Output CONFIG Keyword
  • Output XY Domain
  • Output Z Domain
  • Cell Size
  • Pyramid
  • Raster Statistics
  • Compression
  • Tile Size

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Raster toolset
  • Environment settings for raster data
  • Supported raster dataset file formats

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal