Split Raster (Data Management)
Summary
Creates a tiled output from an input raster dataset.
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), then it will not be overwritten.
If a tile only contains NoData pixel values, then it will not be created.
Syntax
Parameter | Explanation | Data Type |
in_raster |
The input raster dataset to be split into tiles. | Raster Layer |
out_folder |
The output folder where the tiles will be created. | Folder |
out_base_name |
The prefix for each file name. The tile number is then appended to complete the file name, which starts with 0. By default, the prefix is the same name as the input raster. | String |
split_method |
The tiling method to be used when splitting the raster dataset. It will determine the size and number of tiles for each output dataset.
| String |
format |
The file format for the output raster datasets.
| String |
resampling_type (Optional) |
Choose the resampling method to use when splitting your raster. The default is bilinear interpolation resampling.
| String |
num_rasters (Optional) |
Specify the number of tiles in each direction. The default value is 1 tile for each direction. This option is only valid when the tiling method is NUMBER_OF_TILES. | Point |
tile_size (Optional) |
The x and y dimensions of the output tiles. The units parameter will determine the units that are used for these values. This option is only valid when the tiling method is SIZE_OF_TILE. The minimum tile size that can be specified it 64 rows by 64 columns. | Point |
overlap (Optional) |
The number of pixels of overlap between the adjoining tiles. The overlap value will be determined by the units parameter. | Double |
units (Optional) |
Determines the units that apply to the tile_size and the overlap parameters.
| String |
cell_size (Optional) |
Specify the output pixel size in each direction. By default, the output will match the input raster. If the cell size values are changed, the tile size and count are reset to their default values (image size and 1, respectively). This parameter is based on the output spatial reference system, which is set in the Environment Settings. | Point |
origin (Optional) |
The coordinate for the lower left origin point, where the tiling scheme will begin. By default, the lower left origin would be the same as the input raster. This parameter is based on the output coordinate system environment setting. | Point |
split_polygon_feature_class (Optional) |
The feature class geometry used when splitting the raster. | Feature Layer |
clip_type (Optional) | The clipping boundary used to subset your split images.
| String |
template_extent (Optional) |
An extent or a dataset used to define the clipping boundary. | Extent |
nodata_value (Optional) |
All the pixels with the specified value will be set to NoData in the output raster dataset. | String |
Code Sample
This is a Python sample for SplitRaster.
import arcpy
arcpy.SplitRaster_management("c:/source/large.tif", "c:/output/splitras",
"ras", "NUMBER_OF_TILES", "TIFF", "NEAREST",
"2 2", "#", "10", "PIXELS", "#", "#")
This is a Python script sample for SplitRaster.
##====================================
##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}
try:
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")
except:
print "Split Raster exsample failed."
print arcpy.GetMessages()