Create Vector Tile Index (Data Management)

Summary

Creates a multiscale mesh of polygons that can be used as index polygons when creating vector tile packages.

Illustration

Create Vector Tile Index tool illustration
A multiscale mesh of vector tile index polygons covering Australia and New Zealand is shown.

Usage

  • The resulting mesh of polygons is multiscale, representing different levels of detail as defined in the input map. The highest level of detail polygons are sized to enclose no more than the specified vertex count from features from the input map as determined by their density, distribution, and the inherent generalization that occurs when creating vector tiles. The maximum level of detail of the resulting polygons will not exceed 16.

  • The PTS field value in each polygon indicates the number of vertices each polygon contains from the source data. Examine high values in this field across the index polygons to find areas that are high in vertex count and may result in poor performing vector tiles.

  • The LOD field value in each polygon indicates the level of detail (LOD). Sort the field values to find the maximum LOD for the map. The maximum LOD represented by the index polygons may not match the maximum LOD specified in the tiling scheme. Since vector tile layers support a lightweight and efficient tile solution, the maximum LOD should be sufficient. Vector tile layers use oversampling for viewing detail beyond the maximum LOD.

  • The LEAF field value in each polygon indicates whether the tile will overzoom as you render the vector tile layer. The LEAF field values are as follows:

    • LEAF = 0 indicates that the tile will not overzoom.
    • LEAF = 1 indicates that the tile will overzoom when zooming beyond its LOD value.
    For example, if the maximum LOD is 10 for the map, the vector tile layer allows zooming of detail beyond LOD 10. As you zoom in to larger scales beyond LOD 10, the tiles will continue to render features appropriately for those scales. For maps that are considered continuous data, outputting to raster tiles may better maintain proper detail.

  • The output feature class is suited for use with the Create Vector Tile Package tool as the input index polygons. The Create Vector Tile Package tool will use these polygons to create tiles that are optimized for feature density across the multiple levels of detail being created. The smallest and largest LOD values will be stored as minLOD and maxLOD values for the vector tiles.

    This tool will use the index polygons as follows:

    • When using an indexed tile structure—The tool will use the output polygons to create tiles that are optimized for feature density across the multiple levels of detail being created. The smallest and largest LOD values will be stored as minLOD and maxLOD values for the vector tiles.
    • When using a flat tile structure—The tool will use the output polygons to generate an intermediate indexed cache from which the flat cache will be generated, speeding up the process of generating vector tiles for the map or basemap.

  • To learn more about creating vector tiles, see Author a map for vector tile creation.

Parameters

LabelExplanationData Type
Input Map

The input map with the feature distribution and vertex density that determine the size and arrangement of output polygons. The input map is typically one that you will subsequently use to create vector tiles using the Create Vector Tile Package tool.

Map
Output Tile Feature Class

The output polygon feature class of indexed tiles at each level of detail. Each tile encloses a manageable number of input vertices not exceeding the number specified by the Maximum Vertex Count parameter.

Feature Class
Package for ArcGIS Online | Bing Maps | Google Maps

Specifies whether the tiling scheme will be generated from an existing map service or for ArcGIS Online, Bing Maps, and Google Maps.

  • Checked—The ArcGIS Online/Bing Maps/Google Maps tiling scheme will be used. The ArcGIS Online/Bing Maps/Google Maps tiling scheme allows you to overlay cache tiles with tiles from these online mapping services. ArcGIS Pro includes this tiling scheme as a built-in option when loading a tiling scheme. When you check this parameter, the data frame of the source map must use the WGS84 Web Mercator (Auxiliary Sphere) projected coordinate system. This is the default.
  • Unchecked—The tiling scheme from an existing vector tile service will be used. Only tiling schemes with scales that double in progression through levels and have 512-by-512 tile size are supported. You must specify a vector tile service or tiling scheme file for the Tiling scheme parameter.

  • OnlineThe ArcGIS Online/Bing Maps/Google Maps tiling scheme will be used. The ArcGIS Online/Bing Maps/Google Maps tiling scheme allows you to overlay cache tiles with tiles from these online mapping services. ArcGIS Pro includes this tiling scheme as a built-in option when loading a tiling scheme. When you choose this option, the data frame of the source map must use the WGS84 Web Mercator (Auxiliary Sphere) projected coordinate system. This is the default.
  • ExistingThe tiling scheme from an existing vector tile service will be used. Only tiling schemes with scales that double in progression through levels and have 512-by-512 tile size are supported. You must specify a vector tile service or tiling scheme file for the tiling_scheme parameter.
Boolean
Tiling scheme
(Optional)

The vector tile service or tiling scheme file that will be used if the Package for ArcGIS Online | Bing Maps | Google Maps parameter is not checked. The tiling scheme tile size must be 512 by 512 and must have consecutive scales in a ratio of two.

Map Server; File
Maximum Vertex Count
(Optional)

The ideal number of vertices from all visible layers to be enclosed by each polygon in the output feature class. The default value is the recommended count of 10,000 vertices.

Long

arcpy.management.CreateVectorTileIndex(in_map, out_featureclass, service_type, {tiling_scheme}, {vertex_count})
NameExplanationData Type
in_map

The input map with the feature distribution and vertex density that determine the size and arrangement of output polygons. The input map is typically one that you will subsequently use to create vector tiles using the Create Vector Tile Package tool.

Map
out_featureclass

The output polygon feature class of indexed tiles at each level of detail. Each tile encloses a manageable number of input vertices not exceeding the number specified by the vertex_count parameter.

Feature Class
service_type

Specifies whether the tiling scheme will be generated from an existing map service or for ArcGIS Online, Bing Maps, and Google Maps.

  • ONLINEThe ArcGIS Online/Bing Maps/Google Maps tiling scheme will be used. The ArcGIS Online/Bing Maps/Google Maps tiling scheme allows you to overlay cache tiles with tiles from these online mapping services. ArcGIS Pro includes this tiling scheme as a built-in option when loading a tiling scheme. When you choose this option, the data frame of the source map must use the WGS84 Web Mercator (Auxiliary Sphere) projected coordinate system. This is the default.
  • EXISTINGThe tiling scheme from an existing vector tile service will be used. Only tiling schemes with scales that double in progression through levels and have 512-by-512 tile size are supported. You must specify a vector tile service or tiling scheme file for the tiling_scheme parameter.
Boolean
tiling_scheme
(Optional)

The vector tile service or tiling scheme file that will be used if the service_type parameter is set to EXISTING. The tiling scheme tile size must be 512 by 512 and must have consecutive scales in a ratio of two.

Map Server; File
vertex_count
(Optional)

The ideal number of vertices from all visible layers to be enclosed by each polygon in the output feature class. The default value is the recommended count of 10,000 vertices.

Long

Code sample

CreateVectorTileIndex example 1 (Python window)

The following Python window script demonstrates how to use the CreateVectorTileIndex function in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/cartography.gdb/transportation"
arcpy.CreateVectorTileIndex_management("CURRENT", "tiles", "ONLINE", "", 10000)
CreateVectorTileIndex example 2 (stand-alone script)

This stand-alone script shows an example of using the CreateVectorTileIndex function.

# Name: CreateVectorTileIndex.py
# Description: Find all the maps in the project and
#   create vector tile index polygon feature class for each map

# import system modules
import os
import arcpy

#set environment settings
arcpy.env.overwriteOutput = True
outputPath = "C://Tilepackages//"

# Loop through the project, find all the maps, and
#   creates vector tile index polygon for each map,
#   using the same name as the map

p = arcpy.mp.ArcGISProject("c:\\temp\\myproject.aprx")for m in p.listMaps():
      print("Creating Vector Tile Index for: " + m.name)
      arcpy.CreateVectorTileIndex_management(m, outputPath + m.name + '.shp', "ONLINE", "", 10000)

Environments

This tool does not use any geoprocessing environments.

Related topics