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.
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 filename. The tile number is then appended to complete the filename, which starts with 0. By default, the prefix is the same name as the input raster. | String |
split_method (Optional) |
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 (Optional) |
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 for Output Raster Size and Overlap" parameter will determine the units that are used for these values. This option is only valid when the tiling method is SIZE_OF_TILE. | Point |
overlap (Optional) |
The number of pixels of overlap between the adjoining tiles. The overlap value will be determined by the "Units for Output Raster Size and Overlap" parameter. | Double |
Units (Optional) |
Determines the units that apply to the "Size of Output Rasters" 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 spatial reference system, which is set in the Environment Settings. | Point |
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()