Select to view content in your preferred language

Hosted Tile Package with Global Extent wont Publish. 40,000 bundle count error.

761
1
07-13-2018 02:47 AM
DavidBrooks6
Deactivated User

Im trying to publish a Tile Package to ArcGIS Online as a Hosted Tile Layer. The TPK has been generated with global coverage from lvls 0-7, UK coverage from lvls 8-12 and County coverage from lvls 13-15.

The error i get, is because the TPK package has been created with no extent set, so it assumes full coverage at all levels. That's 2,614,580,757 tiles in total. I know for a fact that this is a calculation based on global coverage, which is arbitrary, and when I hit publish, AGOL draws down the tiles from the TPK and <1% of the tiles at lvls 12-15 will be included in the final service:

The problem occurs when i try to publish the tiles for lvl 15:

AGOL thinks (based on the arbitrary values) that lvl 15 contains 99588 bundle files. In fact, lvl 15 only has 2 bundle files and 2 bundlex files.

Now, some people might respond to this by suggesting that, when I Export Tile Cache (to create my TPK), I set an extent around the UK, or even around my County. However, unlike Compact Cache, a TPK applies a clipping mask to whole tiles, such that, my levels 0-7 wont show global and continental mapping for the whole globe, just within my polygon of the UK.

Does anyone have a solution to this? I have tried applying the BUG fix to my TPK as per Bug BUG-000085241, but this doesnt make a difference. Could I edit the values of any of the extents within the TPK archive so that AGOL thinks my bundle files are correct, but still exposes the whole tiles (removes the clipping mask)? I think this is the solution, but thought I would consult the GeoNet for confirmation.

Cheers all

0 Kudos
1 Reply
DavidBrooks6
Deactivated User

In case anyone was looking for a solution to this. I have found a workaround, but believe this identifies a potential issue with TPKs, unless anyone can prove me wrong?

NB; my investigations have been restricted to WMAS coordinate system and standard AGOL/BING/GOOGLE cache schema. 

The BUG-000085241: Publishing tiles does not complete in ArcGIS Online...  led me to looking at the mapserver.json file within the TPK archive.  If you have a cache store that was generated to a full global extent, and you have created your TPK without an Area of Interest defined, then the fullExtent value in here is set to the full global extent "fullExtent":{"xmin":-20037507.148458436,"ymin":-30240971.980489936,"xmax":20037509.524858847,"ymax":30240971.992746655. If you define an area of interest on TPK creation (using Export Tile Cache GP tool), the fullExtent value will change to reflect that (the xmin,ymin,xmax,ymax values will match those of the aoi).

However, if I create a TPK using a defined AOI, this also creates a clipping mask of all the data. So even though the archive contains tiles at global levels (0,1,2,3 etc etc), only the portion of those tiles that are within the AOI will be displayed. This poses visualisation issues if you want your basemap service to show the entirety of these tiles at global levels.

The workaround is to create your TPK without a defined AOI. Then edit the archive using either 7zip or WinRar. Edit the mapserver.json fullExtent value to match the extent of your AOI (xmin,ymin,xmax,ymax). 

By doing this, when the TPK is uploaded and published on AGOL as a Hosted Tile Service, it reads the theoretical max number of bundles to be retrieved based on the new fullExtent value, and thus, doesn't bottom out at 40000 bundles. Better still, the hosted tile service isn't clipped to the AOI as a mask, so the tiles that intersect this AOI are visualised in full. The only annoying thing about this, is that if i had built a cache that has all the global tiles at small scale (lvls 0,1,2,3 etc), only those tiles that intersect the AOI will display (even though they're happily sat waiting to be pulled down from the uploaded TPK).

If anyone knows how we can work with TPKs with different coverage areas at different scales, whilst avoiding the issue of bundle limits when global coverages are included, please speak up!