com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class PackageLayer
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.PackageLayer
- All Implemented Interfaces:
- GPTool
public class PackageLayer
- extends AbstractGPTool
Packages one or more layers and all referenced data sources to create a single compressed .lpk file .
The Package Layer tool is contained in the Data Management Tools tool box.
Usage tips:
- To unpack a layer package, either drag the .lpk file into ArcMap or right click on the .lpk file and select Unpack. Alternatively, you can use the Extract Package tool and specify an output folder.Unpack will always extract the package into your user profile under:
- When consolidating or packaging layers, the resulting layers will be renamed using the following convention:(for example 001fGDB_Polylayer.lyr). The numbered sequence is added to maintain the ordering of the layers as they appear in the Table of Contents. The lower the number, the higher the layer will appear in the Table of Contents when the package is unpacked.
- All layer packages must have a description. These can be added by accessing the layer properties and populating the appropriate fields. Layer properties can be found by right clicking the layer in the ArcMap table of contents and selecting Properties or by right clicking the layer file in the Catalog window and selecting Properties.
- For layers that contain a join or participate in a relationship class, all joined or related data sources will be consolidated into the output folder.
- For layers that reference vector data, the specified extent will be used to select the features that will be packaged. For layers that reference raster formats, the specified extent will be used to clip the rasters.
- If packaging a layer that references a controller dataset such as topologies, geometric networks, network datasets, and so on, all the feature classes that participate in the controller dataset will be consolidated in the package.
- Every unique data source referenced by the specified layers, will have a unique file geodatabase created in the layer package.
- Unchecking Convert Data to File Geodatabase will preserve the data format of your layers in the package layer.
- Compressed raster fomats will be converted into a file geodtabase if Convert Data to File Geodatabase is checked. in this case, raster compression will be lost and size of raster in output file geodatabase will increase
- Compressed raster and vector formats will not be clipped when extent is specified and Convert Data to File Geodatabase is unchecked. To use an extent with compressed data sources, use the Convert options.
- Data sources that do not support a schema will not be packaged. If Schema Only is checked and the tool encounters a layer that is not supported for schema only, a warning message will be displayed and that layer will be skipped. If the only layer specified is unsupported for schema only, the tool will fail.
- Consolidating coverage or VPF layers will copy the entire coverage or VPF dataset into the layer package.
Constructor Summary |
PackageLayer()
Creates the Package Layer tool with defaults. |
PackageLayer(java.lang.Object inLayer,
java.lang.Object outputFile)
Creates the Package Layer tool with the required parameters. |
Method Summary |
java.lang.String |
getApplyExtentToArcsde()
Returns the Apply Extent to ArcSDE Layers Only parameter of this tool . |
java.lang.String |
getConvertArcsdeData()
Returns the Convert ArcSDE Data to File Geodatabase parameter of this tool . |
java.lang.String |
getConvertData()
Returns the Convert Data to File Geodatabase parameter of this tool . |
java.lang.Object |
getExtent()
Returns the Extent parameter of this tool . |
java.lang.Object |
getInLayer()
Returns the Input Layer parameter of this tool . |
java.lang.Object |
getOutputFile()
Returns the Output File parameter of this tool . |
java.lang.String |
getSchemaOnly()
Returns the Schema Only 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. |
java.lang.Object |
getVersion()
Returns the Package version parameter of this tool . |
void |
setApplyExtentToArcsde(java.lang.String applyExtentToArcsde)
Sets the Apply Extent to ArcSDE Layers Only parameter of this tool . |
void |
setConvertArcsdeData(java.lang.String convertArcsdeData)
Sets the Convert ArcSDE Data to File Geodatabase parameter of this tool . |
void |
setConvertData(java.lang.String convertData)
Sets the Convert Data to File Geodatabase parameter of this tool . |
void |
setExtent(java.lang.Object extent)
Sets the Extent parameter of this tool . |
void |
setInLayer(java.lang.Object inLayer)
Sets the Input Layer parameter of this tool . |
void |
setOutputFile(java.lang.Object outputFile)
Sets the Output File parameter of this tool . |
void |
setSchemaOnly(java.lang.String schemaOnly)
Sets the Schema Only parameter of this tool . |
void |
setVersion(java.lang.Object version)
Sets the Package version parameter of this tool . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PackageLayer
public PackageLayer()
- Creates the Package Layer tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
PackageLayer
public PackageLayer(java.lang.Object inLayer,
java.lang.Object outputFile)
- Creates the Package Layer 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:
inLayer
- the input layers that will be packagedoutputFile
- the location and name of the output package file (.lpk) that will be created.
getInLayer
public java.lang.Object getInLayer()
- Returns the Input Layer parameter of this tool .
This parameter is the input layers that will be packaged
This is a required parameter.
- Returns:
- the Input Layer
setInLayer
public void setInLayer(java.lang.Object inLayer)
- Sets the Input Layer parameter of this tool .
This parameter is the input layers that will be packaged
This is a required parameter.
- Parameters:
inLayer
- the input layers that will be packaged
getOutputFile
public java.lang.Object getOutputFile()
- Returns the Output File parameter of this tool .
This parameter is the location and name of the output package file (.lpk) that will be created.
This is a required parameter.
- Returns:
- the Output File
setOutputFile
public void setOutputFile(java.lang.Object outputFile)
- Sets the Output File parameter of this tool .
This parameter is the location and name of the output package file (.lpk) that will be created.
This is a required parameter.
- Parameters:
outputFile
- the location and name of the output package file (.lpk) that will be created.
getConvertData
public java.lang.String getConvertData()
- Returns the Convert Data to File Geodatabase parameter of this tool .
This parameter is specifies if input layers will be converted into file geodatabase or preserve their original format.
This is an optional parameter.
- Returns:
- the Convert Data to File Geodatabase
setConvertData
public void setConvertData(java.lang.String convertData)
- Sets the Convert Data to File Geodatabase parameter of this tool .
This parameter is specifies if input layers will be converted into file geodatabase or preserve their original format.
This is an optional parameter.
- Parameters:
convertData
- specifies if input layers will be converted into file geodatabase or preserve their original format.
getConvertArcsdeData
public java.lang.String getConvertArcsdeData()
- Returns the Convert ArcSDE Data to File Geodatabase parameter of this tool .
This parameter is specifies if input layers will be converted into file geodatabase or preserve their original format. specifies if input layers will be converted into file geodatabase or preserve their original format.
This is an optional parameter.
- Returns:
- the Convert ArcSDE Data to File Geodatabase
setConvertArcsdeData
public void setConvertArcsdeData(java.lang.String convertArcsdeData)
- Sets the Convert ArcSDE Data to File Geodatabase parameter of this tool .
This parameter is specifies if input layers will be converted into file geodatabase or preserve their original format. specifies if input layers will be converted into file geodatabase or preserve their original format.
This is an optional parameter.
- Parameters:
convertArcsdeData
- specifies if input layers will be converted into file geodatabase or preserve their original format. specifies if input layers will be converted into file geodatabase or preserve their original format.
getExtent
public java.lang.Object getExtent()
- Returns the Extent parameter of this tool .
This parameter is specify the extent by manually entering the coordinates in the extent parameter using the format {X-Min Y-Min X-Max Y-Max}. Additionally, to use the extent of a specific layer, simply add the layer name for the extent parameter. for example: ConsolidateLayer_management("C:/Workspace/parcels.lyr","C:/Workspace/output/parcels.lpk","CONVERT", "CONVERT_SDE", "1556900.00591249 379195.663930234 1753436.4759875 568118.813069764","ALL", "ALL)
This is an optional parameter.
- Returns:
- the Extent
setExtent
public void setExtent(java.lang.Object extent)
- Sets the Extent parameter of this tool .
This parameter is specify the extent by manually entering the coordinates in the extent parameter using the format {X-Min Y-Min X-Max Y-Max}. Additionally, to use the extent of a specific layer, simply add the layer name for the extent parameter. for example: ConsolidateLayer_management("C:/Workspace/parcels.lyr","C:/Workspace/output/parcels.lpk","CONVERT", "CONVERT_SDE", "1556900.00591249 379195.663930234 1753436.4759875 568118.813069764","ALL", "ALL)
This is an optional parameter.
- Parameters:
extent
- specify the extent by manually entering the coordinates in the extent parameter using the format {X-Min Y-Min X-Max Y-Max}. Additionally, to use the extent of a specific layer, simply add the layer name for the extent parameter. for example: ConsolidateLayer_management("C:/Workspace/parcels.lyr","C:/Workspace/output/parcels.lpk","CONVERT", "CONVERT_SDE", "1556900.00591249 379195.663930234 1753436.4759875 568118.813069764","ALL", "ALL)
getApplyExtentToArcsde
public java.lang.String getApplyExtentToArcsde()
- Returns the Apply Extent to ArcSDE Layers Only parameter of this tool .
This parameter is specifies the extent that will be used to select ArcSDE data sources.
This is an optional parameter.
- Returns:
- the Apply Extent to ArcSDE Layers Only
setApplyExtentToArcsde
public void setApplyExtentToArcsde(java.lang.String applyExtentToArcsde)
- Sets the Apply Extent to ArcSDE Layers Only parameter of this tool .
This parameter is specifies the extent that will be used to select ArcSDE data sources.
This is an optional parameter.
- Parameters:
applyExtentToArcsde
- specifies the extent that will be used to select ArcSDE data sources.
getSchemaOnly
public java.lang.String getSchemaOnly()
- Returns the Schema Only parameter of this tool .
This parameter is specifies if the schema of the input layers will be consolidated.
This is an optional parameter.
- Returns:
- the Schema Only
setSchemaOnly
public void setSchemaOnly(java.lang.String schemaOnly)
- Sets the Schema Only parameter of this tool .
This parameter is specifies if the schema of the input layers will be consolidated.
This is an optional parameter.
- Parameters:
schemaOnly
- specifies if the schema of the input layers will be consolidated.
getVersion
public java.lang.Object getVersion()
- Returns the Package version parameter of this tool .
This parameter is specifies if input layers will be converted into file geodatabase or preserve their original format. For multiple versions, use semi colons to separate the arguements. ie "CURRENT;9.3.1"
This is an optional parameter.
- Returns:
- the Package version
setVersion
public void setVersion(java.lang.Object version)
- Sets the Package version parameter of this tool .
This parameter is specifies if input layers will be converted into file geodatabase or preserve their original format. For multiple versions, use semi colons to separate the arguements. ie "CURRENT;9.3.1"
This is an optional parameter.
- Parameters:
version
- specifies if input layers will be converted into file geodatabase or preserve their original format. For multiple versions, use semi colons to separate the arguements. ie "CURRENT;9.3.1"
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