Top 5 reasons why I made the switch to ArcGIS Pro (5 of 5)
January 30, 2017
by Robert Krisher
Senior Consultant at POWER Engineers
This article was originally published as a LinkedIn Article
Reason #5: Vector Tile Caches
In the conclusion of this series we’ll be doing a comparison between the type of caching you can perform in ArcMap and the new style of caching that was added with the release of ArcGIS Pro. We’ll then walk through an example of creating a vector tile cache using the map we created in the previous article.
With ArcMap your only option for building a cached map service is to use a raster cache. While this type of caching is very performant and scalable from an end-user perspective, they can take an enormous amount of time to build and require significant amounts of storage once built. Caching at higher scales like 1:500,000 is no problem, where raster caches bog down is when your users start asking you to go down to the 1:500 or 1:100 scale. The amount of time and storage it takes to build a cache increases exponentially every time you add one of these scales and these lower scales can take days and terabytes to build out.
Vector Tile Cache
With ArcGIS Pro, they added the ability to create a new type of cache called a vector cache. Instead of pre-rending raster tiles they create cached copies of the vector geometries at different scales and serve them up through ArcGIS Online or Portal.
The first benefit of this approach is in the resources it takes to create vector cache. They take up significantly less size and can be created much quicker. Whereas raster caches are measured in gigabytes of storage and days of processing, vector tile caches are measured in megabytes and hours. Because of this, it is usually feasible to go down to much more detailed scales using a vector cache.
The second benefit of this approach is that the data is stored separately from its symbology. While the service that gets published includes the symbology it was generated with, you also have the ability to change the appearance of any cached layer or even a whole service on the fly.
Vector tile caches give you the same performance boost that a raster tile cache will provide but requires a fraction of the time to generate and space to store. You also don’t need to regenerate the whole cache if all you need to do is adjust the symbology associated with your features. Then again if it only takes a few hours to rebuild your cache, there’s no reason not to.
Preparing your Map
Creating a vector tile cache is relatively straight forward, but it does have a few caveats. The first caveat is that at the current release, they only support creating caches using a WGS 84 projection. This is great for overlaying your data with external data sources, but means that you need to re-project your data on the fly in order to compare it against any data sets that may be using a different projection. The good news is you don’t actually need to re-project your entire database just to build a tile cache. It is sufficient to set the data frame of your map document to be the appropriate coordinate system and you’re good to go.
So the first step to creating a vector tile cache is to load up the map document we want to cache and set its coordinate system to be WGS 84 Web Mercator.
Build a Vector Tile Index
The next step in the process is to build a vector tile index. It can take a fair bit of time depending on how much data you’re trying to publish. While this step is optional, if you’re going to be publishing vector tile caches on a regular basis, it’ll save you time in the long run since you won’t have to create a vector tile index on the fly every time. The tool can be found under Data Management > Packages.
When you run this process, it will analyze all of the features you are trying to publish and determine the optimal size for all of the grids. Because this process only supports vector data, you will need to turn off any non-vector data in your map before you run this tool.
Create a Vector Tile Package
Now that you have a vector tile index and map all ready to go, the next step is to build the vector tile package itself. As previously mentioned, the process for creating vector tiles is very different from the process for creating a raster tile cache. You simply pick your map, output file, give it a minimum / maximum scale, specify a tile index if you have one, and finally give it a summary and tags for when you publish it. Once you’ve entered all the required information to publish a vector tile cache, the tool will then create a vector tile package. In this example, it took 5 seconds to build the tile cache containing approximately 50,000 features from a scale of 1:3,000,000 to 1:100.
Publish your Vector Tile Package
Support for vector tile caches in ArcGIS Runtime Applications is supported but must be evaluated on an application by application basis. Currently it’s not supported in any of off the shelf ArcGIS runtime applications. Next we’ll focus on the path to use it in a web application. In order to do this you will either need access to an ArcGIS Online Organizational account or an installation of ArcGIS Portal that supports vector tiles. You simply log into your account, go to “My Content,” and choose to add an item from your local machine. Once you select the tile package, ArcGIS will automatically detect that it is a vector tile package and will automatically select to publish the package as a tile layer. Give the new item a title, tags, and then click “Add Item.”
This concludes my top 5 reasons for making the switch to ArcGIS Pro. Look for these same benefits: an improved user experience with the application, reduced amount of chatter with the database and lower memory requirements for using the application. Download ArcGIS Pro and let’s get mapping!
About the Author:
Robert is a Senior Consultant in POWER’s Geospatial and Asset Management group with over 10 years of industry experience. Robert excels at pushing the boundaries of what is possible with GIS and related technologies at utilities, often by re-purposing proven technologies and methods in clever ways. As an active member of many early access programs across the industry and author of more than a dozen published articles, Robert is a recognized expert with Esri’s latest technology including ArcGIS Pro and the new Utility Network. He loves finding innovative solutions to complex challenges and sharing his insights with the GIS community. If you have any questions or comments for Robert, you can contact him at email@example.com.