Esri / raster-tiles-compactcache

Compact Cache V2 is used by ArcGIS to store raster tiles. The bundle file structure is very simple and optimized for quick access, resulting in improved performance over alternative formats.
Apache License 2.0
60 stars 27 forks source link

Package as TPKX #4

Open techmavengeospatial opened 5 years ago

techmavengeospatial commented 5 years ago

Is there any document or specification on building archive of TPKX from folder of compact cache v2 .bundle tiles ?

ArtificialRaccoon commented 5 years ago

The TPK/TPKX is simply a zip archive of the compact cache.

Assuming you've created your bundle/bundlx files, you should have (mostly) what you need to create a TPKX. You will need to create the Conf.xml and Conf.cdi, which I don't think ESRI has defined on the github. However, I think the format is pretty simple, and you can mostly recreate it by looking at examples you can generate using ArcMap.

I'm not sure how TPKX differs, but TPK files required that the archive be set to "STORE". Any sort of compression with the zip would prevent ArcGIS runtime from opening the archive. There is also a folder structure you will need to follow.

The easiest way to see what Im talking about is to create a TPK or TPKX from ArcMap. Open the TPK using 7Zip, and observe the structure. If you follow the folder structure, and provide a valid Conf.xml/cdi, along with your bundles, you should have a valid TPK/TPKX file.

I've successfully created TPK files which can be opened by ArcGIS Runtime anyway.

gari0000 commented 5 years ago

You can use the Tile package specification available at https://github.com/Esri/tile-package-spec. The details of conf.xml and conf.cdi files will be available shortly

ArtificialRaccoon commented 5 years ago

@gari0000 Just a question: Is there a reason the Compact Cache v1 and TPK format isn't also released?

gari0000 commented 5 years ago

@GuidedByCthulhu Compact Cache V1 format does not perform well when consuming caches over network file shares and Blobstores, hence we at Esri recommend using "Compact V2" which address these issues.

ArtificialRaccoon commented 5 years ago

@gari0000 I understand the reasoning for developing the new format. I was asking why the older formats were also not released as well. Many people would be interested in official documentation about the CCv1 and TPK formats, if just to validate their reverse engineered solutions.

Many clients move slowly, and won't be moving to the CCv2/TPKX format for some time (governments, 3rd party legacy mapping tools, etc).

Heck, having the CCv1/TPK format opened would be wonderful for the GDAL, as they could possibly add support for the older format, so people wouldn't need to immediately update to 10.7.

gari0000 commented 5 years ago

Unfortunately we would not be able to open the specification for TPK format. However, we would recommend using the following geoprocessing tools to achieve backward compatibility and create compactV1 cache and tpk files:

  1. Convert Map Cache Storage Format
  2. Export Tile Cache tool
  3. Export Map Server Cache Tool
gari0000 commented 5 years ago

The specification of conf.xml and conf.cdi is now available at https://github.com/Esri/raster-tiles-compactcache/blob/master/CompactCacheV2.md