When creating a tile package using the Create Map Tile Package tool in ArcMap, the tiles are created for the visible extent of the map. In most cases, the extent of the generated cache is larger than the area of interest. As a result, the tile package (.tpk) file size is huge, and consumes more credits if shared to ArcGIS Online.
To reduce the size of the tile package, specify an area of interest when exporting the tile package (.tpk) using the Export Tile Cache tool before sharing the file. Follow the steps outlined below:
- Create a polygon feature to specify an area of interest. Refer to ArcMap: Create a feature class in a database in ArcMap and ArcMap: Exercise 1d: Creating new polygon features for steps to do this.
- Extract the tile package file using a file compressor software.
- Right-click the created tile package (.tpk) file, and select a file compressor software. For example, 7-Zip, WinRAR, and WinZip.
- Click Extract files.
- Specify a location for the extracted tile package file under Extract to in the Extract window, and click OK.
- Export the tile package file using the Export Tile Cache geoprocessing tool.
- Open the Export Tile Cache (Data Management) tool.
- Click the folder icon under Input Tile Cache in the Export Tile Cache window. Navigate to the extracted folder from step 2, select v101 > Layers, and click Add.
The Export Tile Cache tool cannot process compressed .tpk files as the input feature.
- Specify the location for the exported tile package in Output Tile Cache Location.
- Specify a name for the exported tile package in Output Tile Cache Name.
- Click the drop-down menu for Export Cache As (optional), and select TILE_PACKAGE.
- Select the polygon feature class specified as the area of interest in step 1 for Area of Interest (optional).
The polygon feature class is necessary to define an area of interest of the tile package for export. Refer to area_of_interest (Optional), under the Syntax section in ArcMap: Export Tile Cache.
- Leave the other parameters at default, and click OK.
The image below shows the tile package file size for export is reduced.