Help on Vector Tile tools is incorrect

4215
15
Jump to solution
04-12-2016 08:20 AM
DougBrowning
MVP Esteemed Contributor

The help for the Vector Tile tools is wrong.  This code from the help does not work.  It keeps saying the value type for in_map is wrong.

Create Vector Tile Package—Data Management toolbox | ArcGIS for Desktop

p = arcpy.mp.ArcGISProject("c:\\temp\\myproject.aprx")

for m in p.listMaps():

print("Packaging" + m.name)

arcpy.CreateVectorTilePackage_management(m, m.name + '.vtpk', "INDEXED", 295828763.795777, 1128.497176)

It just has "Map" for the in_map when copied from the python snippet but that of course does not work in script. I have yet to find anything it likes.  Any hints?

arcpy.management.CreateVectorTilePackage("Map", r"C:\Vector\Settings.vtpk", "ONLINE", None, "INDEXED", 295828763.795778, 564.248588, r"C:\Vector\SettingsIndex.shp", None, None)

The tool to create the vector index will also not accept in_map.  Its help has a sample from some other tool??

Create Vector Tile Index—Data Management toolbox | ArcGIS for Desktop

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

import arcpy from arcpy 
import env 
env.workspace = "C:/data/cartography.gdb/transportation" 
arcpy.CreateIndexTiles_cartography("CURRENT", "tiles", 10000)

Also when copying the snippet from Pro it has another parameter with the value ONLINE that does not exist in the help.

#arcpy.management.CreateVectorTileIndex("Map", r"C:\Vector\SettingsIndex.shp", "ONLINE", None, 10000)

Please let me know the correct params or point me to help files that are correct.

Thanks

0 Kudos
15 Replies
GreggRoemhildt1
Occasional Contributor

Hey Andy, got any suggestions on building custom vector tile schemes? Or do you just use the google/web-mercator style?

I keep running into this issue:

https://community.esri.com/thread/188936-vector-tile-custom-scheme 

0 Kudos
AndyWright
Occasional Contributor

Sorry Gregg. We haven’t had any reason to go outside the usual google/arcgis online tile format, so I don’t have any suggestions for you on this one.

0 Kudos
KateLeroux
New Contributor III

Hi Doug, 

It does seem like only a small handful of us are trying to work with vector tiles so far. I found something recently that might be helpful for your question: 

To keep the resulting tiles as small and efficient as possible, only those fields necessary to draw the features are passed into the vector tiles when they're created from a map. In some cases, extra fields are derived to help with quick rendering. For example, layers drawn with graduated colors or graduated symbols symbology will include new fields of integer values corresponding to the class break values.

Since vector tiles can be customized by editing their associated style file, there may be instances when you bring other fields into the vector tiles to support this customization. For example, you can leverage a different field that contains place name label strings in different (local) languages and access them in the style file. To bring specific fields into the vector tiles, highlight them in the Fields view of the layer.

Source: Author a map for vector tile creation—ArcGIS Pro | ArcGIS Desktop 

I have yet to use this successfully, so let us know if you try it. 

0 Kudos
ColinLawrence
Esri Regular Contributor

Just a quick update for everyone.

BUG-000098329 has been resolved with the latest release (Pro 1.4.1)

Release Notes for ArcGIS Pro 1.4—ArcGIS Pro | ArcGIS Desktop 

Hopefully no further issues are discovered!

Regards,
Colin
0 Kudos
YannDeschenes
New Contributor II

Hello Collin,

Indeed, after updating to latest release 1.4.1, I was finally able to generate a Vector Tile using ArcPy with tools

arcpy.CreateVectorTileIndex_management and arcpy.CreateVectorTilePackage_management but only when using a map with FGBD source. Both tool doesn't work when using standalone script and map with Layer type source:
ERROR 001852: Layer type is not supported for vector tile packages.

However when use within ArcGIS Pro, those tools are working with any Layer type (ex. Oracle source).

I was wondering if this is supposed to be the steps to follow, are we to convert first all source to a FGBD before using tools for Creating a Vector Tile with the standalone script?

Currently, we are working on a tiling project for one of our client: we are evaluating possible solutions for improving the user experience on a WebGIS application. One of the potential solution would be to implement vector tiling for some of the more static layers instead of dynamic service layers that the WebGIS is using at the moment. The client would have to re-generate all the vector tiling on a daily basis with a target time of 30 min.

We were amazed at how fast the entire creation process generated the Vector Tile Package compared to a normal generation of a standard raster Tile Cache so we pushed this solution a little more. In order to meet the client criteria, it is imperative to be able to use the tools on the Oracle source directly, have extra steps for converting oracle source to a FGBD format would be lost of time effort and would render the project impossible using Vector tiling.

Do you know if this is a BUG? Does ESRI is aware of it and if so when do they plan to resolve the matter in a near future?

or do you have a alternative solution for this problem that I didn't discover yet?

Thanks in advance for your help in this matter,

Yann Deschênes | Geomatic Consultant | CGI
0 Kudos
RyanColeman
Occasional Contributor

I'm on 2.2.4 and this script still doesn't work. Still getting Input Map: Value is Required when using an .aprx

0 Kudos