Select to view content in your preferred language

Specifying AGOL as your tile scheme

1691
9
Jump to solution
05-02-2021 10:54 PM
Brady
by
Occasional Contributor

Has anyone got information on how to set the "method" param for AGOL cache creation?

ERROR 000732: Import Tiling Scheme: Dataset ArcGIS Online scheme does not exist or is not supported
Failed to execute (ManageTileCache).

The Python window suggests

Input Tiling Scheme (Optional)
An optional parameter to specify the tiling scheme.
• ArcGIS Online scheme—Use the default ArcGIS Online tiling scheme.
• Import scheme—Import an existing tiling scheme.
• Elevation tiling scheme—Use this tiling scheme for elevation services.
• WGS84 Version 2 tiling scheme—Use this tiling scheme based on WGS84 Version 2.
• WGS84 Version 2 elevation tiling scheme— Use this tiling scheme based on WGS84 Version 2 to build tile cache for elevation data.

but ArcGIS Online Scheme doesn't seem to work. Pro2.7. Any help is appreciated.

Thanks.

folder = "E:\\CITYOFPERTH_IMAGERY\\20201220\\AGOL_CACHE"

mode = "RECREATE_ALL_TILES"
cacheName = "20201220_3857"
dataSource = "E:\\CITYOFPERTH_IMAGERY\\20201220\\20201220_3857.jp2"
method = "ArcGIS Online scheme"
tilingscheme = "#"
scales = "18055.954822;9027.977411;4513.988705;2256.994353;1128.497176;564.248588;282.124294;141.062147;70.5310735"
areaofinterest = "E:\\CITYOFPERTH_IMAGERY\\3857_AGOL_AOI.shp"
maxcellsize = "#"
mincachedscale = "18055.954822"
maxcachedscale = "70.5310735"

arcpy.ManageTileCache_management(
folder, mode, cacheName, dataSource, method, tilingScheme,
scales, areaofinterest, maxcellsize, mincachedscale, maxcachedscale)

0 Kudos
1 Solution

Accepted Solutions
Tim_McGinnes
Frequent Contributor

Try this and post the errors if you get any:

arcpy.ManageTileCache_management("E:\\CITYOFPERTH_IMAGERY\\20201220\\AGOL_CACHE","RECREATE_ALL_TILES","20201220_3857","E:\\CITYOFPERTH_IMAGERY\\20201220\\20201220_3857.jp2","ARCGISONLINE_SCHEME",scales= [18055.954822,9027.977411,4513.988705,2256.994353,1128.497176,564.248588,282.124294,141.062147,70.5310735],area_of_interest="E:\\CITYOFPERTH_IMAGERY\\3857_AGOL_AOI.shp")

View solution in original post

0 Kudos
9 Replies
Tim_McGinnes
Frequent Contributor

If you are not importing a scheme, then leave it out of the parameters. That means you have to specify the parameters coming afterwards specifically though:

arcpy.ManageTileCache_management(folder, mode, cacheName, dataSource, method, scales=scales, area_of_interest=areaofinterest, min_cached_scale=mincachedscale, max_cached_scale=maxcachedscale)

 

0 Kudos
Brady
by
Occasional Contributor

Thanks for your response. I was just modifying that and have updated my post to reflect my oversight. However, it still won't play nice. 🙂 bypassing that still gives the same error but that param isn't the issue

0 Kudos
Tim_McGinnes
Frequent Contributor

You will have to have method="ARCGISONLINE_SCHEME". Are you getting a different error now?

0 Kudos
Brady
by
Occasional Contributor

That was my earlier path and it bombed. 🙂

0 Kudos
Tim_McGinnes
Frequent Contributor

Try this and post the errors if you get any:

arcpy.ManageTileCache_management("E:\\CITYOFPERTH_IMAGERY\\20201220\\AGOL_CACHE","RECREATE_ALL_TILES","20201220_3857","E:\\CITYOFPERTH_IMAGERY\\20201220\\20201220_3857.jp2","ARCGISONLINE_SCHEME",scales= [18055.954822,9027.977411,4513.988705,2256.994353,1128.497176,564.248588,282.124294,141.062147,70.5310735],area_of_interest="E:\\CITYOFPERTH_IMAGERY\\3857_AGOL_AOI.shp")
0 Kudos
Brady
by
Occasional Contributor

Thanks.  As a regular inline statement, that seems to be all good and is running now. The other form from the help isn't too helpful.

I still think it will give me an error at around the 18 minute mark of WARNING 001518: failed to build tile cache for feature with OID = 0 which is a whole other story that esri couldn't troubleshoot for me. Problem since 2.5 for me

0 Kudos
Tim_McGinnes
Frequent Contributor

If I remember correctly, I may have had that warning before also. I think it occurred when it was trying to create a small tile within the AOI, but it didn't intersect with the source raster. Is your AOI polygon completely within the raster extents?

0 Kudos
Brady
by
Occasional Contributor

Yes, the error is persistent regardless of an AIO being used or not. Using different imagery, different coordinate systems, and reinstalls made no difference.

The same formats and other earlier image releases and AOI's all worked for years up until 2.5 when it decided that it wasn't happy anymore.

It has been a headscratcher for Esri

0 Kudos
Brady
by
Occasional Contributor

No go. This was going overnight and didn't generate any outputs other than the standard _alllayers folder and config files. Thanks for your help though. Much appreciated.

0 Kudos