Label | Explanation | Data Type |
Output Tiling Scheme
| The path and file name for the output tiling scheme to be created. | File |
Generation Method | Choose to use a new or predefined tiling scheme. You can define a new tiling scheme with this tool or browse to a predefined tiling scheme file (.xml).
| String |
Number of Scales
| The number of scale levels to be created in the tiling scheme. | Long |
Predefined Tiling Scheme (Optional) | Path to a predefined tiling scheme file (usually named conf.xml). This parameter is enabled only when the Predefined option is chosen as the tiling scheme generation method. | File |
Scales (Optional) | Scale levels to be included in the tiling scheme. By default, these are not represented as fractions. Instead, use 500 to represent a scale of 1:500, and so on. The value entered in the Number of Scales parameter generates a set of default scale levels. | Value Table |
Cell Size (Optional) | Determines the units of the Scales parameter.
| Boolean |
Tile Origin in map units (Optional) | The origin (upper left corner) of the tiling scheme in the coordinates of the spatial reference of the source dataset. The extent of the source dataset must be within (but does not need to coincide) this region. | Point |
Dots (Pixels) Per Inch
(Optional) | The dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, typically a display monitor, the scale of the tile will appear incorrect. The default value is 96. | Long |
Tile Size (in pixels)
(Optional) | The width and height of the cache tiles in pixels. The default is 256 by 256. For the best balance between performance and manageability, avoid deviating from widths of 256 or 512.
| String |
Tile Format (Optional) | The file format for the tiles in the cache.
| String |
Tile Compression Quality (Optional) | Long | |
Storage Format
(Optional) | Determines the storage format of tiles.
| String |
LERC Error
(Optional) | Set the maximum tolerance in pixel values when compressing with LERC. | Double |
Summary
Creates a tiling scheme file based on the information from the source dataset. The tiling scheme file will then be used in the Manage Tile Cache tool when creating cache tiles.
This tool can be used to edit the properties of an existing tiling scheme, such as tile format, storage format, tile size, and so on. In addition, you can also use it to add new scale levels to an existing tiling scheme.
Usage
By default, the tiling origin starts at the upper left of the coordinate system used by the source dataset.
There are several options for loading an existing tiling scheme.
- Load a tiling scheme from an existing image service or map service cache.
- Load a tiling scheme that you created in a previous run of this tool.
Parameters
arcpy.management.GenerateTileCacheTilingScheme(out_tiling_scheme, tiling_scheme_generation_method, number_of_scales, {predefined_tiling_scheme}, {scales}, {scales_type}, {tile_origin}, {dpi}, {tile_size}, {tile_format}, {tile_compression_quality}, {storage_format}, {lerc_error})
Name | Explanation | Data Type |
out_tiling_scheme | The path and file name for the output tiling scheme to be created. | File |
tiling_scheme_generation_method | Choose to use a new or predefined tiling scheme. You can define a new tiling scheme with this tool or browse to a predefined tiling scheme file (.xml).
| String |
number_of_scales | The number of scale levels to be created in the tiling scheme. | Long |
predefined_tiling_scheme (Optional) | Path to a predefined tiling scheme file (usually named conf.xml). This parameter is enabled only when the Predefined option is chosen as the tiling scheme generation method. | File |
scales [scale,...] (Optional) | Scale levels to be included in the tiling scheme. By default, these are not represented as fractions. Instead, use 500 to represent a scale of 1:500, and so on. The value entered in the Number of Scales parameter generates a set of default scale levels. | Value Table |
scales_type (Optional) | Determines the units of the scales parameter.
| Boolean |
tile_origin (Optional) | The origin (upper left corner) of the tiling scheme in the coordinates of the spatial reference of the source dataset. The extent of the source dataset must be within (but does not need to coincide) this region. | Point |
dpi (Optional) | The dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, typically a display monitor, the scale of the tile will appear incorrect. The default value is 96. | Long |
tile_size (Optional) | The width and height of the cache tiles in pixels. The default is 256 by 256. For the best balance between performance and manageability, avoid deviating from widths of 256 or 512.
| String |
tile_format (Optional) | The file format for the tiles in the cache.
| String |
tile_compression_quality (Optional) | Long | |
storage_format (Optional) | Determines the storage format of tiles.
| String |
lerc_error (Optional) | Set the maximum tolerance in pixel values when compressing with LERC. | Double |
Code sample
This is a Python sample for the GenerateTileCacheTilingScheme tool.
import arcpy
arcpy.GenerateTileCacheTilingScheme_management(
"C:/Data/Cache.gdb/Md","C:/TilingSchemes/scheme.xml",
"NEW","8","#","#","#","#","96","256 x 256","MIXED",
"75","COMPACT")
This is a Python script sample for the GenerateTileCacheTilingScheme tool.
#Generate tiling scheme for a mosaic dataset
#Generate 5 default scales
import arcpy
arcpy.env.workspace = "C:/Workspace"
mdname = "C:/Workspace/Cache.gdb/md"
outScheme = "C:/Workspace/Schemes/Tilingscheme.xml"
method = "NEW"
numscales = "5"
predefScheme = "#"
scales = "#"
scaleType = "SCALE"
tileOrigin = "-20037700 30198300"
dpi = "96"
tileSize ="256 x 256"
tileFormat = "MIXED"
compQuality = "75"
storageFormat = "COMPACT"
arcpy.GenerateTileCacheTilingScheme_management(
mdName, outScheme, method, numscales, predefScheme, scales,
scaleType, tileOrigin, dpi, tileSize, compQuality, storageFormat)