About tile packages
About tile packages
Tile packages (.tpk) contain a tile cache of data that you can display as a base map with ArcGIS Runtime applications. Tile packages can be used for easy sharing of cached maps between colleagues in a work group, across departments in an organization, or with any other ArcGIS user using ArcGIS Online. Tile packages are ideal in disconnected environments where access to local data is required.
Tile package
There are two options available when trying to create a tile package.
Upload package to my ArcGIS Online account - Use this option to easily share your package with a much wider audience by sharing to your ArcGIS Online account. Once you have uploaded your package to your online account, you can share it within your private groups or with everyone.
Save package to file - Packages can be shared locally by writing a package file to disk. Just like any other format, a package can be shared through email or by copying and pasting to other locations on your internal network.
Below is an example of the Tile Package dialog.
Tile format
Tiling scheme
The tiling scheme includes the scale levels, tile dimensions, and tile origin for the cache. These properties define where tile boundaries will exist and are important to match when overlaying caches in some clients. Other properties such as image format are also written into the tiling scheme but do not affect whether the client application can successfully overlay the tiles.
There are several options you can choose for the tiling scheme:
-
ArcGIS Online / Bing Maps / Google Maps
The ArcGIS Online/Bing Maps/Google Maps tiling scheme allows you to overlay your cache tiles with tiles from these online mapping services. ArcGIS Desktop includes this tiling scheme as a built-in option when loading a tiling scheme. When you choose this tiling scheme, the data frame of your source map document must use the WGS 1984 Web Mercator (Auxiliary Sphere) projected coordinate system.
The ArcGIS Online/Bing Maps/Google Maps tiling scheme is required if you'll be overlaying your package with ArcGIS Online, Bing Maps, or Google Maps. One advantage of the ArcGIS Online/Bing Maps/Google Maps tiling scheme is that it is widely known in the web mapping world, so your tiles will match those of other organizations who have used this tiling scheme. Even if you don't plan to overlay any of these well-known map services, you may choose the tiling scheme for its interoperability potential.
The ArcGIS Online/Bing Maps/Google Maps tiling scheme may contain scales that would be zoomed in too far to be of use to your map. Packaging for large scales can take up much time and disk storage space. For example, the largest scale in the tiling scheme is about 1:1,000. Packaging the entire continental United States at this scale can take weeks and require hundreds of gigabytes of storage. If you aren't prepared to package at this scale level, you should remove this scale level when you create the tile package.
-
An existing map service
Choose this option if your organization has created a tiling scheme for an existing service on your GIS server and you want to match it. Matching tiling schemes ensures that your tiles will overlay correctly in your ArcGIS Runtime Application.
If you choose this option, your source map document should use the same coordinate system as the map whose tiling scheme you are importing.
-
A tiling scheme file
All tile packages have a tiling scheme file conf.xml in the package directory (example: C:\Documents and Settings\username\My Documents\ArcGIS\packages\MyDataFrame\Layers\conf.xml). You can browse to this file to set the tiling scheme for your map service. This option allows you to use a tiling scheme file you obtained through e-mail, a file share, or an ArcGIS for Server service.
-
Create a custom tiling scheme
Choosing a tiling scheme from an online mapping service is not always possible due to requirements that you use a different coordinate system or set of scale levels. In this scenario, you will need to create your own tiling scheme. The following sections in this document will help you choose appropriate scales and other properties for your tiling scheme.
ArcGIS Online previously used a tiling scheme based on the WGS 1984 geographic coordinate system that used 512 x 512 pixel tiles. If you have services running that need to use this tiling scheme, you must load it from an existing service or a tiling scheme file.
Tile format
This setting determines what output image format the map service will use when it creates the tiles. Your choice of image format is important, because it determines the size on disk of the tiles, the image quality, and the ability to make the tile background transparent.
The default image format is PNG 8, but you may often need to change this based on the type of map you are creating. Below is a summary of the available image formats and their appropriate uses.
- PNG8—Use PNG 8 for overlay services that need to have a transparent background, such as roads and boundaries. PNG 8 creates tiles of very small size on disk with no loss of information.
Do not use PNG 8 if your map contains more than 256 colors. Imagery, hillshades, gradient fills, transparency, and antialiasing can easily push your map over 256 colors. Even symbols such as highway shields may have subtle antialiasing around the edges that unexpectedly adds colors to your map.
- PNG24—You can use PNG 24 for overlay services, such as roads and boundaries, that have more than 256 colors (if fewer than 256 colors, use PNG 8).
- PNG32—Use PNG 32 for overlay services, such as roads and boundaries, that have more than 256 colors. PNG 32 is an especially good choice for overlay services that have antialiasing enabled on lines or text. PNG 32 creates larger tiles on disk than PNG 24, but the tiles are fully supported in all browsers.
- JPEG—Use this format for basemap services that have large color variation and do not need to have a transparent background. For example, raster imagery and very detailed vector basemaps tend to work well with JPEG.
JPEG is a lossy image format. It attempts to selectively remove data without affecting the appearance of the image. This can cause very small tile sizes on disk, but if your map contains vector linework or labels, it may produce too much noise or blurry area around the lines. If this is the case, you can attempt to raise the compression value from the default of 75. A higher value, such as 90, may balance an acceptable quality of linework with the small tile size benefit of the JPEG.
It's up to you to decide what image quality you consider acceptable. If you are willing to accept a minor amount of noise in the images, you may save large amounts of disk space by choosing JPEG. The smaller tile size also means the application can download the tiles faster.
- Mixed—A Mixed package uses JPEG in the center of the package with PNG 32 on the edge of the package. Use the mixed mode when you want to cleanly overlay raster packages on other layers.
When a mixed package is created, PNG 32 tiles are created anywhere that transparency is detected (in other words, anywhere that the data frame background is visible). The rest of the tiles are built using JPEG. This keeps the average file size down while providing you with a clean overlay on top of other packages. If you do not use the mixed mode package in this scenario, you will see a nontransparent "collar" around the periphery of your image where it overlaps the other package.
Before committing to an image format for a large pacakge, build a small package of a representative area of your map and examine the tile quality and performance in a test application. If you'll be working with multiple packages, build a small test package for each and add them to a test application to make sure they overlay as expected. This will allow you to make adjustments before you create the entire package.
Levels
Select the highest level of detail that you wish to generate your tiles to. The display will indicate the scale of data that you should expect to see at the selected level of detail. Each increase in the level of detail will, of course, increase the time to create the tile package and the size of the tile package.
Entering information about your package
The Item Description is an important part of your package to provide information to users more details about the package you are providing. The Item Description dialog provides fields where you can enter information describing your package. This includes
- Summary - Contains brief information about your package. This is a required field.
- Tags - Tags make it easier to find this package when you or someone else searches for it. Separate tags with a single comma(,). This is a required field.
- Description - Can contain more detailed information about your package.
- Access and Use Constraints - Any limitations regarding use, data or distribution.
- Credits - Acknowledgment indicating who contributed to the package.
Any changes you make to item descriptions pre-populated from the Map Document Properties..., will not be reflected in the map document properties. The changes you make will only be for the package itself.
Before packaging a map, be sure to enter descriptive information about it in the Map Document Properties dialog box. This information is built into the package and is accessible to others when you upload your map package into ArcGIS online. You can access this dialog box by clicking File > Map Document Properties on the main menu.
For more information on setting Map Document Properties to pre-populate the Item Description seeSetting_map_document_properties
Below is an example of the Item Description dialog.