com.esri.arcgis.geoprocessing.tools.servertools
Class GenerateMapServerCache

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.AbstractGPTool
      extended by com.esri.arcgis.geoprocessing.tools.servertools.GenerateMapServerCache
All Implemented Interfaces:
GPTool

public class GenerateMapServerCache
extends AbstractGPTool

Generates a cache of static image tiles for an ArcGIS Server Map Service. The Generate Map Server Cache tool is contained in the Server Tools tool box.

Usage tips:


Field Summary
 
Fields inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
vals
 
Constructor Summary
GenerateMapServerCache()
          Creates the Generate Map Server Cache tool with defaults.
GenerateMapServerCache(java.lang.String serverName, java.lang.String objectName, java.lang.String dataFrame, java.lang.String outFolder, java.lang.String tilingSchemeType, java.lang.String scalesType, int numOfScales, int dpi, int tileWidth, int tileHeight)
          Creates the Generate Map Server Cache tool with the required parameters.
 
Method Summary
 java.lang.String getAntialiasing()
          Returns the Antialiasing (Smoothes edges of labels and lines for improved display quality) parameter of this tool .
 java.lang.String getCacheFormat()
          Returns the Cache Tile Format parameter of this tool .
 java.lang.String getDataFrame()
          Returns the Data Frame parameter of this tool .
 int getDpi()
          Returns the Dots(Pixels) Per Inch parameter of this tool .
 java.lang.Object getLayer()
          Returns the Input Layers parameter of this tool .
 java.lang.Object getLevels()
          Returns the Scales parameter of this tool .
 java.lang.String getMapOrLayers()
          Returns the Cache Type parameter of this tool .
 int getNumOfScales()
          Returns the Number of Scales parameter of this tool .
 java.lang.String getObjectName()
          Returns the Map Server parameter of this tool .
 java.lang.String getOutFolder()
          Returns the Server Cache Directory parameter of this tool .
 java.lang.String getOutObjectName()
          Returns the Output Map Server parameter of this tool (Read only).
 java.lang.String getOutServerName()
          Returns the Output Host parameter of this tool (Read only).
 java.lang.String getScalesType()
          Returns the Scales parameter of this tool .
 java.lang.String getServerName()
          Returns the Host parameter of this tool .
 int getThreadCount()
          Returns the Number of MapServer Instances parameter of this tool .
 int getTileCompressionQuality()
          Returns the Tile Compression Quality parameter of this tool .
 int getTileHeight()
          Returns the Tile Height (in pixels) parameter of this tool .
 java.lang.Object getTileOrigin()
          Returns the Tiling origin in map units parameter of this tool .
 int getTileWidth()
          Returns the Tile Width (in pixels) parameter of this tool .
 java.lang.Object getTilingSchema()
          Returns the Predefined Tiling Scheme parameter of this tool .
 java.lang.String getTilingSchemeType()
          Returns the Tiling Scheme parameter of this tool .
 java.lang.String getToolboxAlias()
          Returns the alias of the tool box containing this tool.
 java.lang.String getToolboxName()
          Returns the name of the tool box containing this tool.
 java.lang.String getToolName()
          Returns the name of this tool.
 void setAntialiasing(java.lang.String antialiasing)
          Sets the Antialiasing (Smoothes edges of labels and lines for improved display quality) parameter of this tool .
 void setCacheFormat(java.lang.String cacheFormat)
          Sets the Cache Tile Format parameter of this tool .
 void setDataFrame(java.lang.String dataFrame)
          Sets the Data Frame parameter of this tool .
 void setDpi(int dpi)
          Sets the Dots(Pixels) Per Inch parameter of this tool .
 void setLayer(java.lang.Object layer)
          Sets the Input Layers parameter of this tool .
 void setLevels(java.lang.Object levels)
          Sets the Scales parameter of this tool .
 void setMapOrLayers(java.lang.String mapOrLayers)
          Sets the Cache Type parameter of this tool .
 void setNumOfScales(int numOfScales)
          Sets the Number of Scales parameter of this tool .
 void setObjectName(java.lang.String objectName)
          Sets the Map Server parameter of this tool .
 void setOutFolder(java.lang.String outFolder)
          Sets the Server Cache Directory parameter of this tool .
 void setScalesType(java.lang.String scalesType)
          Sets the Scales parameter of this tool .
 void setServerName(java.lang.String serverName)
          Sets the Host parameter of this tool .
 void setThreadCount(int threadCount)
          Sets the Number of MapServer Instances parameter of this tool .
 void setTileCompressionQuality(int tileCompressionQuality)
          Sets the Tile Compression Quality parameter of this tool .
 void setTileHeight(int tileHeight)
          Sets the Tile Height (in pixels) parameter of this tool .
 void setTileOrigin(java.lang.Object tileOrigin)
          Sets the Tiling origin in map units parameter of this tool .
 void setTileWidth(int tileWidth)
          Sets the Tile Width (in pixels) parameter of this tool .
 void setTilingSchema(java.lang.Object tilingSchema)
          Sets the Predefined Tiling Scheme parameter of this tool .
 void setTilingSchemeType(java.lang.String tilingSchemeType)
          Sets the Tiling Scheme parameter of this tool .
 
Methods inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
getParameterValues, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenerateMapServerCache

public GenerateMapServerCache()
Creates the Generate Map Server Cache tool with defaults.

Initializes the array of tool parameters with the default values specified when the tool was created.


GenerateMapServerCache

public GenerateMapServerCache(java.lang.String serverName,
                              java.lang.String objectName,
                              java.lang.String dataFrame,
                              java.lang.String outFolder,
                              java.lang.String tilingSchemeType,
                              java.lang.String scalesType,
                              int numOfScales,
                              int dpi,
                              int tileWidth,
                              int tileHeight)
Creates the Generate Map Server Cache tool with the required parameters.

Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.

Parameters:
serverName - the host name of the ArcGIS Server to use to generate the cache.
objectName - the name of the Map Service to use to generate the cache.
dataFrame - the map documents data frame to cache. Make sure you select the same data frame that you selected for your map service.
outFolder - the parent directory for this Map Service cache.
tilingSchemeType - choose to use a NEW or PREDEFINED tiling scheme. A new tiling scheme can be defined in this tool, or a predefined scheme file (.xml) can be loaded. A predefined scheme can be created by running the Generate Map Server Cache Tiling Scheme GP Tool. nEW is the default.
scalesType - set the scale level
numOfScales - the number of scale levels to create in the cache.
dpi - the dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96.
tileWidth - the width, in pixels, of output map tiles. Small widths map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile width is 512.
tileHeight - the height, in pixels, of output map tiles. Small heights map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile height is 512.
Method Detail

getServerName

public java.lang.String getServerName()
Returns the Host parameter of this tool . This parameter is the host name of the ArcGIS Server to use to generate the cache. This is a required parameter.

Returns:
the Host

setServerName

public void setServerName(java.lang.String serverName)
Sets the Host parameter of this tool . This parameter is the host name of the ArcGIS Server to use to generate the cache. This is a required parameter.

Parameters:
serverName - the host name of the ArcGIS Server to use to generate the cache.

getObjectName

public java.lang.String getObjectName()
Returns the Map Server parameter of this tool . This parameter is the name of the Map Service to use to generate the cache. This is a required parameter.

Returns:
the Map Server

setObjectName

public void setObjectName(java.lang.String objectName)
Sets the Map Server parameter of this tool . This parameter is the name of the Map Service to use to generate the cache. This is a required parameter.

Parameters:
objectName - the name of the Map Service to use to generate the cache.

getDataFrame

public java.lang.String getDataFrame()
Returns the Data Frame parameter of this tool . This parameter is the map documents data frame to cache. Make sure you select the same data frame that you selected for your map service. This is a required parameter.

Returns:
the Data Frame

setDataFrame

public void setDataFrame(java.lang.String dataFrame)
Sets the Data Frame parameter of this tool . This parameter is the map documents data frame to cache. Make sure you select the same data frame that you selected for your map service. This is a required parameter.

Parameters:
dataFrame - the map documents data frame to cache. Make sure you select the same data frame that you selected for your map service.

getOutFolder

public java.lang.String getOutFolder()
Returns the Server Cache Directory parameter of this tool . This parameter is the parent directory for this Map Service cache. This is a required parameter.

Returns:
the Server Cache Directory

setOutFolder

public void setOutFolder(java.lang.String outFolder)
Sets the Server Cache Directory parameter of this tool . This parameter is the parent directory for this Map Service cache. This is a required parameter.

Parameters:
outFolder - the parent directory for this Map Service cache.

getTilingSchemeType

public java.lang.String getTilingSchemeType()
Returns the Tiling Scheme parameter of this tool . This parameter is choose to use a NEW or PREDEFINED tiling scheme. A new tiling scheme can be defined in this tool, or a predefined scheme file (.xml) can be loaded. A predefined scheme can be created by running the Generate Map Server Cache Tiling Scheme GP Tool. nEW is the default. This is a required parameter.

Returns:
the Tiling Scheme

setTilingSchemeType

public void setTilingSchemeType(java.lang.String tilingSchemeType)
Sets the Tiling Scheme parameter of this tool . This parameter is choose to use a NEW or PREDEFINED tiling scheme. A new tiling scheme can be defined in this tool, or a predefined scheme file (.xml) can be loaded. A predefined scheme can be created by running the Generate Map Server Cache Tiling Scheme GP Tool. nEW is the default. This is a required parameter.

Parameters:
tilingSchemeType - choose to use a NEW or PREDEFINED tiling scheme. A new tiling scheme can be defined in this tool, or a predefined scheme file (.xml) can be loaded. A predefined scheme can be created by running the Generate Map Server Cache Tiling Scheme GP Tool. nEW is the default.

getScalesType

public java.lang.String getScalesType()
Returns the Scales parameter of this tool . This parameter is set the scale level This is a required parameter.

Returns:
the Scales

setScalesType

public void setScalesType(java.lang.String scalesType)
Sets the Scales parameter of this tool . This parameter is set the scale level This is a required parameter.

Parameters:
scalesType - set the scale level

getNumOfScales

public int getNumOfScales()
Returns the Number of Scales parameter of this tool . This parameter is the number of scale levels to create in the cache. This is a required parameter.

Returns:
the Number of Scales

setNumOfScales

public void setNumOfScales(int numOfScales)
Sets the Number of Scales parameter of this tool . This parameter is the number of scale levels to create in the cache. This is a required parameter.

Parameters:
numOfScales - the number of scale levels to create in the cache.

getDpi

public int getDpi()
Returns the Dots(Pixels) Per Inch parameter of this tool . This parameter is the dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96. This is a required parameter.

Returns:
the Dots(Pixels) Per Inch

setDpi

public void setDpi(int dpi)
Sets the Dots(Pixels) Per Inch parameter of this tool . This parameter is the dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96. This is a required parameter.

Parameters:
dpi - the dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96.

getTileWidth

public int getTileWidth()
Returns the Tile Width (in pixels) parameter of this tool . This parameter is the width, in pixels, of output map tiles. Small widths map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile width is 512. This is a required parameter.

Returns:
the Tile Width (in pixels)

setTileWidth

public void setTileWidth(int tileWidth)
Sets the Tile Width (in pixels) parameter of this tool . This parameter is the width, in pixels, of output map tiles. Small widths map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile width is 512. This is a required parameter.

Parameters:
tileWidth - the width, in pixels, of output map tiles. Small widths map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile width is 512.

getTileHeight

public int getTileHeight()
Returns the Tile Height (in pixels) parameter of this tool . This parameter is the height, in pixels, of output map tiles. Small heights map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile height is 512. This is a required parameter.

Returns:
the Tile Height (in pixels)

setTileHeight

public void setTileHeight(int tileHeight)
Sets the Tile Height (in pixels) parameter of this tool . This parameter is the height, in pixels, of output map tiles. Small heights map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile height is 512. This is a required parameter.

Parameters:
tileHeight - the height, in pixels, of output map tiles. Small heights map improve performance of the application requesting tiles from the cache as less data will travel over the wire. However, smaller tile size results in a larger cache size and longer creation time. The default tile height is 512.

getMapOrLayers

public java.lang.String getMapOrLayers()
Returns the Cache Type parameter of this tool . This parameter is choose to generate a FUSED or MULTI_LAYER cache: This is an optional parameter.

Returns:
the Cache Type

setMapOrLayers

public void setMapOrLayers(java.lang.String mapOrLayers)
Sets the Cache Type parameter of this tool . This parameter is choose to generate a FUSED or MULTI_LAYER cache: This is an optional parameter.

Parameters:
mapOrLayers - choose to generate a FUSED or MULTI_LAYER cache:

getTilingSchema

public java.lang.Object getTilingSchema()
Returns the Predefined Tiling Scheme parameter of this tool . This parameter is path to a pre-defined tiling scheme. This is an optional parameter.

Returns:
the Predefined Tiling Scheme

setTilingSchema

public void setTilingSchema(java.lang.Object tilingSchema)
Sets the Predefined Tiling Scheme parameter of this tool . This parameter is path to a pre-defined tiling scheme. This is an optional parameter.

Parameters:
tilingSchema - path to a pre-defined tiling scheme.

getTileOrigin

public java.lang.Object getTileOrigin()
Returns the Tiling origin in map units parameter of this tool . This parameter is specify the origin (upper left corner) of the tiling scheme in coordinates of the spatial reference of the source map document. The extent of the source map document must be within (but does not need to coincide) with this region. This is an optional parameter.

Returns:
the Tiling origin in map units

setTileOrigin

public void setTileOrigin(java.lang.Object tileOrigin)
Sets the Tiling origin in map units parameter of this tool . This parameter is specify the origin (upper left corner) of the tiling scheme in coordinates of the spatial reference of the source map document. The extent of the source map document must be within (but does not need to coincide) with this region. This is an optional parameter.

Parameters:
tileOrigin - specify the origin (upper left corner) of the tiling scheme in coordinates of the spatial reference of the source map document. The extent of the source map document must be within (but does not need to coincide) with this region.

getLevels

public java.lang.Object getLevels()
Returns the Scales parameter of this tool . This parameter is scales at which to cache the Map Service. This is an optional parameter.

Returns:
the Scales

setLevels

public void setLevels(java.lang.Object levels)
Sets the Scales parameter of this tool . This parameter is scales at which to cache the Map Service. This is an optional parameter.

Parameters:
levels - scales at which to cache the Map Service.

getLayer

public java.lang.Object getLayer()
Returns the Input Layers parameter of this tool . This is an optional parameter.

Returns:
the Input Layers

setLayer

public void setLayer(java.lang.Object layer)
Sets the Input Layers parameter of this tool . This is an optional parameter.

Parameters:
layer - null

getThreadCount

public int getThreadCount()
Returns the Number of MapServer Instances parameter of this tool . This parameter is the number of MapServer Instances to use while generating the cache. This is an optional parameter.

Returns:
the Number of MapServer Instances

setThreadCount

public void setThreadCount(int threadCount)
Sets the Number of MapServer Instances parameter of this tool . This parameter is the number of MapServer Instances to use while generating the cache. This is an optional parameter.

Parameters:
threadCount - the number of MapServer Instances to use while generating the cache.

getAntialiasing

public java.lang.String getAntialiasing()
Returns the Antialiasing (Smoothes edges of labels and lines for improved display quality) parameter of this tool . This parameter is choose whether to use antialiasing when rendering the tiles. If ANTIALIASING is chosen, edges of lines, borders, and text will be smoothed. There is a performance cost for this option. No benefit will be gained on raster data. This is an optional parameter.

Returns:
the Antialiasing (Smoothes edges of labels and lines for improved display quality)

setAntialiasing

public void setAntialiasing(java.lang.String antialiasing)
Sets the Antialiasing (Smoothes edges of labels and lines for improved display quality) parameter of this tool . This parameter is choose whether to use antialiasing when rendering the tiles. If ANTIALIASING is chosen, edges of lines, borders, and text will be smoothed. There is a performance cost for this option. No benefit will be gained on raster data. This is an optional parameter.

Parameters:
antialiasing - choose whether to use antialiasing when rendering the tiles. If ANTIALIASING is chosen, edges of lines, borders, and text will be smoothed. There is a performance cost for this option. No benefit will be gained on raster data.

getCacheFormat

public java.lang.String getCacheFormat()
Returns the Cache Tile Format parameter of this tool . This parameter is choose either PNG8, PNG24, PNG32 or JPEG file format for the tiles in the cache. PNG24 is the default. This is an optional parameter.

Returns:
the Cache Tile Format

setCacheFormat

public void setCacheFormat(java.lang.String cacheFormat)
Sets the Cache Tile Format parameter of this tool . This parameter is choose either PNG8, PNG24, PNG32 or JPEG file format for the tiles in the cache. PNG24 is the default. This is an optional parameter.

Parameters:
cacheFormat - choose either PNG8, PNG24, PNG32 or JPEG file format for the tiles in the cache. PNG24 is the default.

getTileCompressionQuality

public int getTileCompressionQuality()
Returns the Tile Compression Quality parameter of this tool . This parameter is enter a value between 1 and 100 for the JPEG compression quality. The default value is 75 for JPEG tile format and zero for other formats. compression is supported only for JPEG format. The level of compression will depend on the data, but can also be controlled by changing the compression quality. Choosing a higher value will result in less compression and a higher-quality image. Choosing a lower value will result in more compression but a lower-quality image. This is an optional parameter.

Returns:
the Tile Compression Quality

setTileCompressionQuality

public void setTileCompressionQuality(int tileCompressionQuality)
Sets the Tile Compression Quality parameter of this tool . This parameter is enter a value between 1 and 100 for the JPEG compression quality. The default value is 75 for JPEG tile format and zero for other formats. compression is supported only for JPEG format. The level of compression will depend on the data, but can also be controlled by changing the compression quality. Choosing a higher value will result in less compression and a higher-quality image. Choosing a lower value will result in more compression but a lower-quality image. This is an optional parameter.

Parameters:
tileCompressionQuality - enter a value between 1 and 100 for the JPEG compression quality. The default value is 75 for JPEG tile format and zero for other formats. compression is supported only for JPEG format. The level of compression will depend on the data, but can also be controlled by changing the compression quality. Choosing a higher value will result in less compression and a higher-quality image. Choosing a lower value will result in more compression but a lower-quality image.

getOutServerName

public java.lang.String getOutServerName()
Returns the Output Host parameter of this tool (Read only). This is an derived parameter.

Returns:
the Output Host

getOutObjectName

public java.lang.String getOutObjectName()
Returns the Output Map Server parameter of this tool (Read only). This is an derived parameter.

Returns:
the Output Map Server

getToolName

public java.lang.String getToolName()
Returns the name of this tool.

Returns:
the tool name

getToolboxName

public java.lang.String getToolboxName()
Returns the name of the tool box containing this tool.

Returns:
the tool box name

getToolboxAlias

public java.lang.String getToolboxAlias()
Returns the alias of the tool box containing this tool.

Returns:
the tool box alias