Split Raster (Data Management)

Summary

Divides a raster dataset into smaller pieces, by tiles or features from a polygon.

Usage

  • The output files will share most of the properties of the input source raster, such as the spatial reference, source type, pixel type, pixel depth, and cell size.

  • The tiling method determines which of the optional parameters are used to determine the dimensions and location of the output tiles. In both cases, NoData values are used to pad the tiles where there is no corresponding source data. The data format depends on the limitations of the individual format specifications and the source image data type. Invalid combinations result in an appropriate error message.

  • If a tile already exists (if there is a file with the same name), it will not be overwritten.

  • If a tile only contains NoData pixel values, it will not be created.

  • Setting the Overlap parameter is recommended if you are working with elevation data, or raster data where you plan to apply focal functions, such as Slope, Aspect, Shaded Relief, and others.

Parameters

LabelExplanationData Type
Input Raster

The raster to split.

Mosaic Dataset; Mosaic Layer; Raster Layer
Output Folder

The destination for the new raster datasets.

Folder
Output Base Name

The prefix for each of the raster datasets you will create. A number will be appended to each prefix, starting with 0.

String
Split Method

Determines how to split the raster dataset.

  • Size of tileSpecify the width and height of the tile.
  • Number of tiles Specify the number of raster tiles to create by breaking the dataset into a number of columns and rows.
  • Polygon features Use the individual polygon geometries in a feature class to split the raster.
String
Output Format

The format for the output raster datasets.

  • Geotiff (*.tif)Tagged Image File Format. This is the default.
  • Bitmap (*.bmp)Microsoft Bitmap.
  • ENVI (*.dat)ENVI DAT.
  • Esri BIL (*.bil)Esri Band Interleaved by Line.
  • Esri BIP (*.bip)Esri Band Interleaved by Pixel.
  • Esri BSQ (*.bsq)Esri Band Sequential.
  • GIF (*.gif)Graphic Interchange Format.
  • Esri GRIDEsri Grid.
  • ERDAS IMAGINE (*.img)ERDAS IMAGINE.
  • JPEG 2000 (*.jp2)JPEG 2000.
  • JPEG (*.jpeg)Joint Photographic Experts Group.
  • PNG (*.png)Portable Network Graphics.
String
Resampling Technique
(Optional)

Choose an appropriate technique based on the type of data you have.

  • NearestThe fastest resampling method, and it minimizes changes to pixel values. Suitable for discrete data, such as land cover.
  • BilinearCalculates the value of each pixel by averaging (weighted for distance) the values of the surrounding 4 pixels. Suitable for continuous data.
  • CubicCalculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. Produces the smoothest image, but can create values outside of the range found in the source data. Suitable for continuous data.
String
Number of Output Rasters
(Optional)

The number of columns (x) and rows (y) to split the raster dataset into. The X coordinate is the number of columns and the Y coordinate is number of rows.

Point
Size of Output Rasters
(Optional)

The x and y dimensions of the output tiles. The default unit of measurement is in pixels. You can change this with the Units for Output Raster Size and Overlap parameter. The X coordinate is the X (horizontal) dimension the output tiles and the Y coordinate is the Y (vertical) dimension of output tiles.

Point
Overlap
(Optional)

The tiles do not have to line up perfectly; set the amount of overlap between tiles with this parameter. The default unit of measurement is in pixels. You can change this with the Units for Output Raster Size and Overlap parameter.

Double
Units for Output Raster Size and Overlap
(Optional)

Set the units of measurement for the Size of Output Rasters parameter and the Overlap parameter.

  • PixelsThe unit is in pixels. This is the default.
  • MetersThe unit is in meters.
  • FeetThe unit is in feet.
  • DegreesThe unit is in decimal degrees.
  • MilesThe unit is in miles.
  • KilometersThe unit is in kilometers.
String
Cell Size
(Optional)

The spatial resolution of the output raster. If left blank, the output cell size will match the input raster. When you change the cell size values, the tile size is reset to the image size and the tile count is reset to 1.

Point
Lower left origin
(Optional)

Change the coordinates for the lower left origin point, where the tiling scheme will begin. If left blank, the lower left origin would be the same as the input raster.

Point
Split Polygon Feature Class
(Optional)

A feature class that will be used to split the raster dataset.

Feature Layer
Clip Type
(Optional)

Limits the extent of your raster dataset before you split it.

  • None Use the full extent of the input raster dataset.
  • ExtentSpecify bounding box as your clipping boundary.
  • Feature classSpecify a feature class to clip the extent.
String
Template Extent
(Optional)

An extent or a dataset used to define the clipping boundary. The dataset can be a raster or feature class.

  • Current Display Extent Map View—The extent will be based on the active map or scene.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene.
  • Extent of a Layer Layer—The extent will be based on an active map layer. Choose an available layer or use the Extent of data in all layers option. Each map layer has the following options:

    • All Features Select All—The extent of all features.
    • Selected Features Area from Selected Features—The extent of the selected features.
    • Visible Features Extent Indicator—The extent of visible features.

  • Browse Browse—The extent will be based on a dataset.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent and coordinate system from the clipboard. If the clipboard does not include a coordinate system, the extent will use the map’s coordinate system.
  • Reset Extent Reset—The extent will be reset to the default value.

When coordinates are manually provided, the coordinates must be numeric values and in the active map's coordinate system. The map may use different display units than the provided coordinates. Use a negative value sign for south and west coordinates.

Extent
NoData Value
(Optional)

All the pixels with the specified value will be set to NoData in the output raster dataset.

String

Derived Output

LabelExplanationData Type
Updated Folder

The output folder.

Folder

arcpy.management.SplitRaster(in_raster, out_folder, out_base_name, split_method, format, {resampling_type}, {num_rasters}, {tile_size}, {overlap}, {units}, {cell_size}, {origin}, {split_polygon_feature_class}, {clip_type}, {template_extent}, {nodata_value})
NameExplanationData Type
in_raster

The raster to split.

Mosaic Dataset; Mosaic Layer; Raster Layer
out_folder

The destination for the new raster datasets.

Folder
out_base_name

The prefix for each of the raster datasets you will create. A number will be appended to each prefix, starting with 0.

String
split_method

Determines how to split the raster dataset.

  • SIZE_OF_TILESpecify the width and height of the tile.
  • NUMBER_OF_TILES Specify the number of raster tiles to create by breaking the dataset into a number of columns and rows.
  • POLYGON_FEATURES Use the individual polygon geometries in a feature class to split the raster.
String
format

The format for the output raster datasets.

  • TIFFTagged Image File Format. This is the default.
  • BMPMicrosoft Bitmap.
  • ENVIENVI DAT.
  • Esri BILEsri Band Interleaved by Line.
  • Esri BIPEsri Band Interleaved by Pixel.
  • Esri BSQEsri Band Sequential.
  • GIFGraphic Interchange Format.
  • GRIDEsri Grid.
  • IMAGINE IMAGEERDAS IMAGINE.
  • JP2JPEG 2000.
  • JPEGJoint Photographic Experts Group.
  • PNGPortable Network Graphics.
String
resampling_type
(Optional)

Choose an appropriate technique based on the type of data you have.

  • NEARESTThe fastest resampling method, and it minimizes changes to pixel values. Suitable for discrete data, such as land cover.
  • BILINEARCalculates the value of each pixel by averaging (weighted for distance) the values of the surrounding 4 pixels. Suitable for continuous data.
  • CUBICCalculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. Produces the smoothest image, but can create values outside of the range found in the source data. Suitable for continuous data.
String
num_rasters
(Optional)

The number of columns (x) and rows (y) to split the raster dataset into. This is a point whose X and Y coordinates define number of rows and columns. The X coordinate is the number of columns and the Y coordinate is the number of rows.

Point
tile_size
(Optional)

The x and y dimensions of the output tiles. The default unit of measurement is in pixels. You can change this with the units parameter. This is a point whose X and Y coordinates define the dimensions of output tiles. The X coordinate is the horizontal dimension of the output and the Y coordinate is the vertical dimension of the output.

Point
overlap
(Optional)

The tiles do not have to line up perfectly; set the amount of overlap between tiles with this parameter. The default unit of measurement is in pixels. You can change this with the units parameter.

Double
units
(Optional)

Set the units of measurement for the tile_size and the overlap parameters.

  • PIXELSThe unit is in pixels. This is the default.
  • METERSThe unit is in meters.
  • FEETThe unit is in feet.
  • DEGREESThe unit is in decimal degrees.
  • MILESThe unit is in miles.
  • KILOMETERSThe unit is in kilometers.
String
cell_size
(Optional)

The spatial resolution of the output raster. If left blank, the output cell size will match the input raster. When you change the cell size values, the tile size is reset to the image size and the tile count is reset to 1.

Point
origin
(Optional)

Change the coordinates for the lower left origin point, where the tiling scheme will begin. If left blank, the lower left origin would be the same as the input raster.

Point
split_polygon_feature_class
(Optional)

A feature class that will be used to split the raster dataset.

Feature Layer
clip_type
(Optional)

Limits the extent of your raster dataset before you split it.

  • NONE Use the full extent of the input raster dataset.
  • EXTENTSpecify bounding box as your clipping boundary.
  • FEATURE_CLASSSpecify a feature class to clip the extent.
String
template_extent
(Optional)

An extent or a dataset used to define the clipping boundary. The dataset can be a raster or feature class.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent
nodata_value
(Optional)

All the pixels with the specified value will be set to NoData in the output raster dataset.

String

Derived Output

NameExplanationData Type
derived_out_folder

The output folder.

Folder

Code sample

SplitRaster example 1 (Python window)

This is a Python sample for the SplitRaster function.

import arcpy
arcpy.SplitRaster_management("c:/source/large.tif", "c:/output/splitras",
                             "ras", "NUMBER_OF_TILES", "TIFF", "NEAREST",
                             "2 2", "#", "10", "PIXELS", "#", "#")
SplitRaster example 2 (stand-alone script)

This is a Python script sample for the SplitRaster function.

##====================================
##Split Raster
##Usage: SplitRaster_management in_raster out_folder out_base_name SIZE_OF_TILE
##                              | NUMBER_OF_TILES | TIFF | BMP | ENVI | ESRI BIL |
##                              ESRI BIP | ESRI BSQ | GIF | GRID | IMAGINE IMAGE | 
##                              JP2 | JPG | PNG {NEAREST | BILINEAR | CUBIC | 
##                              MAJORITY} {num_rasters} {tile_size} {overlap} 
##                              {PIXELS | METERS | FEET | DEGREES | KILOMETERS | 
##                              MILES} {cell_size} {origin}
    
import arcpy
arcpy.env.workspace = r"\\myServer\PrjWorkspace\RasGP"

##Equally split a large TIFF image by number of images
arcpy.SplitRaster_management("large.tif", "splitras", "number", "NUMBER_OF_TILES",\
                             "TIFF", "NEAREST", "2 2", "#", "4", "PIXELS",\
                             "#", "#")

##Equally split a large TIFF image by size of images
arcpy.SplitRaster_management("large.tif", "splitras", "size2", "SIZE_OF_TILE",\
                             "TIFF", "BILINEAR", "#", "3500 3500", "4", "PIXELS",\
                             "#", "-50 60")

Related topics