PROBLEM

Layers with lots of points or vertices prevent vector tiles from being created or published

Last Published: May 19, 2025

Description

Large datasets can cause the process of creating or publishing vector tiles in ArcGIS Pro to run out of memory. If this occurs during caching, you may receive an error message such as “Staging failed” or you may see “Error 999999”.

This has been known to happen with data that has many millions of points or vertices, such as large scale captured point data or small interval contours.

Cause

The tool tries to add and process every feature in the data into the root tile. For example, when using the WGS_1984_Web_Mercator_Auxiliary_Sphere coordinate system and the default tiling scheme, the root tile is represented with the “Start Tile” for Level of Detail 0 (LOD 0), as shown on the World Topo Map (MapServer):

  • Level ID: 0 [ Start Tile, End Tile ]
    • Resolution: 156543.03392800014
    • Scale: 5.91657527591555E8 (approximately 1:591 million)

If the dataset also covers a large extent, then processing this tile and the tiles in other smaller scales might require many gigabytes of RAM. This can cause the process to fail or take a significantly long time to complete.

Solution or Workaround

Enforce the creation of vector tiles for only the scales that are required for the output. This works best if the layer or vector tiles are not required at smaller scales.

To do this, perform the following steps:

  1. Set a Visible Scale Range on the layer:
    1. Determine the smallest scale at which your vector tiles need to be visible.
    2. Open the Layer or Group Layer Properties from the Contents pane of your map.
    3. In the General section, under Visible Scale Range, select Show layer between these scales only and populate the Minimum scale (zoomed out) to match your smallest required scale.
    4. Click Apply and OK.

setting the layer properties

  1. When caching for the web or in the Create Vector Tile Package tool UI, set the Minimum Cached Scale and Maximum Cached Scale parameters to only use the scales that are required in the output.

Sample code

Copy and paste the code below into your IDE of choice (Pycharm, IDLE, Spyder and so on). The lines of code you need to alter are the project_path, map, layer, min_scale, min_cached_scale, max_cached_scale, and output_file variables. This script does the following:

  1. Sets the desired Visible Scale Range on the layer ‘POI’ 
  2. Sets the Minimum Cached Scale and Maximum Cached Scale parameters to only use the scales that are required in the output. Parameter values are set to match the scale values from the tiling scheme used to create the vector tiles 
  3. Creates a vector tile package for the map ‘Original map’
# Import system modules 
import arcpy
import os

#Get Projectpath
script = os.getcwd()
project_path = os.path.join(script, r"myProject.aprx")

aprx = arcpy.mp.ArcGISProject(project_path)
arcpy.env.overwriteOutput = True

map = aprx.listMaps("Original map")[0]
layer = map.listLayers("POI")[0]
print(layer.name)

# Set the desired scale range on the 'POI' layer
# Set the Visible Scale Range on the layer 
min_scale = 36112  # Minimum scale (zoomed out) is (1:36,112)
if layer.isFeatureLayer:
  layer.minThreshold = min_scale    
  print(f"Set Minimum scale (zoomed out) for layer: '{layer.name}' to minScale: {min_scale}")
else:
  print(f"'{layer.name}' is not a FeatureLayer and cannot have scale ranges set.")  

# Set parameter values for Create Vector Tile Package tool
# Set the Minimum Cached Scale and Maximum Cached Scale parameters to only 
# use the scales that are required in the output
# Save the changes made to the project
output_file = os.path.join(script, r"Example.vtpk")
min_cached_scale = 36111.909643 
max_cached_scale = 564.248588 
service_type = "ONLINE"
tiling_scheme = None
tile_structure = "INDEXED"
index_polygons = None
summary = "Vector tiles for scales LOD13 and beyond"
tags = "vt"
arcpy.management.CreateVectorTilePackage(map, output_file, service_type, tiling_scheme, tile_structure, min_cached_scale, max_cached_scale, index_polygons, summary, tags) 
print(f"Vector tile package '{output_file}' created for map '{map.name}' ")
aprx.save()
print("Project saved!")

Article ID: 000036053

Software:
  • ArcGIS Pro

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options