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.
Syntax
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})
Parameter | Explanation | Data 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.
| String |
format | The format for the output raster datasets.
| String |
resampling_type (Optional) | Choose an appropriate technique based on the type of data you have.
| 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.
| 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.
| String |
template_extent (Optional) | An extent or a dataset used to define the clipping boundary. The dataset can be a raster or feature class. | Extent |
nodata_value (Optional) | All the pixels with the specified value will be set to NoData in the output raster dataset. | String |
Derived Output
Name | Explanation | Data Type |
derived_out_folder | The output folder. | Folder |
Code sample
This is a Python sample for the SplitRaster tool.
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 the SplitRaster tool.
##====================================
##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")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes