ArcGIS 3 ways to quickly make TPK files

Source: Internet
Author: User
Tags xsl

From: http://blog.csdn.net/arcgis_mobile/article/details/8048549

TPK is a new type of data file introduced by ArcGIS10.1, mainly used to package tile files into offline map packages, TPK can be loaded as tile basemaps in ArcGIS Runtime or ArcGIS for Android/ios. There are several ways to make TPK, as follows:

Making TPK with ArcMap

The generation of TPK in ArcGIS10.1 is integrated in ArcGIS for desktop and is made as follows:

1. Open ArcMap, load the data in, select Menu customize-"ArcMap options, select" Sharing "tab in the popup dialog and tick" Enable ArcGIS Runtime Tools ";

2. At this point, the "Share as ..." menu in the File menu has one more option "tile package ...", select the menu, pop up the tile Package dialog box, set the parameters in each tab, basic and publish ArcGIS for Server map Service When the parameters are the same, fill in the completion of the "Analyze", if the error is correct according to the wrong instructions to re-modify the parameters, and finally click Share to start the production of TPK files:

Making TPK with GP tools

Another way is to complete the production of TPK directly through the GP tool.

Select "ArcToolbox"-"Data Management Tools"-"Create Map Tile Package" as follows:

Run the GP tool and the following dialog box appears:

Select the map document MXD that you want to make TPK, specify the location where the TPK is saved, the tile format uses PNG by default, the level is set according to need, click "OK" to complete the TPK production.


Making TPK with existing compact slices

1, the composition of the TPK file

TPK file is actually a zip file, by extracting the TPK file, we can get the internal structure of the TPK file, consisting of two folders of Esriinfo and V101, such as:

where "trchive" can be replaced with the actual name in your own project, other folder names or file names cannot be changed. Thumbnail folder is a thumbnail of the slice, the rest of the file is a description file or TPK file configuration information file, although there is a file suffix Pkinfo, is the XML structure of the The V101 folder is the compact slice data and a. layer file that we are familiar with.

Familiar with the structure of the TPK, the production of TPK data set is easy, first according to its composition in the project folder under the new two directory Esriinfo and V101, after the production of other files, we need to produce a total of four files: a thumbnail, two profiles, and a layer file.

2, the production of thumbnail (thumbnail image)

Make a 200x133 size for the tile, formatted as a PNG thumbnail, and saved to the thumbnail folder under the Esriinfo directory (in the actual process, it is not possible to do this file).

3. Generate Item.pkinfo File

In the Esriinfo directory to create a new file Item.pkinfo, the file content is as follows, the red part needs to be modified (in fact culture= ' ZH-CN ' This can also be modified, different countries this is not the same, because we are in China, so this I skipped):

<?xml version= "1.0" encoding= "Utf-8"?>

<?xml-stylesheettype= "Text/xsl"

href= "Http://www.arcgisonline.com/home/pkinfostylesheet.xsl"?>

<pkinfo culture= ' ZH-CN ' >

<ID>F24BC58B-F4A6-4414-921D-B762DE9545F3</ID>

<name>Test</name>

<version>10.1Pre-release</version>

<size>-1</size>

<created></created>

<type>tile package</type>

<servable>false</servable>

<packagelocation></packagelocation>

<pkinfolocation></pkinfolocation>

</pkinfo>

4. Generate Iteminfo.xml File

In the Esriinfo directory to create a new file Iteminfo.xml, the file contents are as follows, the red part must be modified, the blue part is some descriptive information, you can fill in freely:

<?xml version= "1.0" encoding= "Utf-8"?>

<esri_iteminformationculture= ' ZH-CN ' >

<name>Test</name>

<guid>F24BC58B-F4A6-4414-921D-B762DE9545F3</guid>

<catalogpath></catalogpath>

<snippet>Test</snippet>

<description>Test</description>

<summary>Test</summary>

<title>Test</title>

<tags>Test</tags>

<type>tile package</type>

<typekeywords>

<typekeyword>TilePackage</typekeyword>

<typekeyword>ArcGISRuntime</typekeyword>

<typekeyword>.tpk</typekeyword>

</typekeywords>

<thumbnail>thumbnail/thumbnail.png</thumbnail>

<documentation></documentation>

<url></url>

<datalastmodifiedtime></datalastmodifiedtime>

<extent>

<xmin>-179.999999999987</xmin>

<ymin>-86.3842826037127</ymin>

<xmax>179.999999999987</xmax>

<ymax>86.3842826106563</ymax>

</extent>

<spatialreference>WGS_1984_Web_Mercator_Auxiliary_Sphere</spatialreference>

<accessinformation></accessinformation>

<licenseinfo></licenseinfo>

</ESRI_ItemInformation>

Tips: You may have noticed that the values of the <name> and <guid> tags in the red section of these two profiles are the same, yes, their values must correspond to one by one, Name is. Mxd, and the GUID is a globally unique identification number that can be generated automatically using some software. There are a lot of introductions on the GUID generation network, and we don't repeat them here.

5. Make layer File

Open ArcMap, add a slice file to ArcMap, set the document Save property to a relative path, save the added tile layer as a layer file, and copy the resulting tile file and layer file to the V101 directory.

6, Packaging for TPK

Package the entire project directory as a zip and select storage when packaging. Change the file suffix name to TPK to get the TPK file we need.

    • Previous ArcGIS for Windows Mobile 3.1 release
    • Next show ArcGIS data (Ⅰ) in the real-world enhancement app Layar
Top
2
Step

ArcGIS 3 ways to quickly make TPK files (go)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.