Command Line (A2EExporter.exe)

A2EExporter is a command line tool for running KML (Export/Import) and Tile creation processes outside of the ArcMap interface. It is used by the A2E Scheduler but can also be integrated in your own KML and Tile creation workflows. It can only be used with a valid Arc2Earth Enterprise license.

For KML processes, a saved Option file must be used to power the export. For Tile Creation, there are a variety of command line parameters you can use to drive the export.

Command Line Parameter Description
Shared Parameters
-l [log file path] The full path to the Log file that is created during the export. This parameter is not required.
KML Export
-type kml Specifies the type of processor. For KML Export, the value is kml.
-o [option file path] The full path to the Option file (*.a2e) that will power the export. Note that all paths must be enclosed in quotes.

Example: A2EExporter.exe -type kml -o "C:\temp\someOptionFile.a2e"
KML Import
-type import Specifies the type of processor. For KML Imports, the value is import.
-o [option file path] The full path to the Option file (*.a2ei) that will power the export. Note that all paths must be enclosed in quotes.

Example: A2EExporter.exe -type import -o "C:\temp\someOptionFile.a2ei"
Map Tile Creation
-type tile Specifies the type of processor. For Tile Exports, the value is tile. This parameter is only required if an option file is specified.
-mxd [mxd file path] Specifies the ArcMap Mxd file to use during export. If no -o option or files parameters are specified, this parameter is required. If an option file is used, all other parameters are ignored and the values in the option file are used.
-files [list of files] Comma separated list of the files that will be added to a temporary map for export. The value must contain the full path to the primary ArcGIS datatype (e.g. "C:\myshapefile.shp" instead of "C:\myshapefile.dbf"). Each file must have a valid spatial reference or it will not be exported. This option is helpful for scripting tile exports for data that changes rapidly or is created in large amounts.

You can optionally set the layer's position in the map using a ";" and a valid map index value (ex: "C:\myshapefile.shp;1,C:\myLayerFile.lyr;3"). When used with the -mxd param, you can add these temporary layers at certain positions in the map stack. For example, the mxd might contain your base layers and the -files might contain data that changes every hour/day/month etc.

For vector layers, the default symbology is used. If the file is a *.lyr file, the layer file will be loaded with all of its values maintained.
-layers [list of layer names] Comma separated list of Layer Names in the loaded Mxd that will be made visible. All other layers will be turned off. If it is not set, the layers will remain as they were saved to the Mxd file.
-o [option file path] The full path to the Option file (*.a2et) that will power the export. Note that all paths must be enclosed in quotes.

Example: A2EExporter.exe -type tile -o "C:\temp\someOptionFile.a2et"
-start [0-22] The start level for the export. The value must be from 0 to 22 and cooresponds to standard map zoom levels. If no start level is specified, the tile exporter will examine the extent of the export and choose a best guess start and end level. You should almost always specify the exact value you want.
-end [0-22] The end level for the export. The value must be from 0 to 22 and cooresponds to standard map zoom levels. This value must be greater then or equal to the start level.
-fullExtent true In the Mxd, use the Map's fullextent instead of what has been saved as the current extent. The default is to use what has been saved.
-cache [path to cache folder] The full path to a folder to use as the cache location. If the folder does not exist yet, it will be created. If no cache is specified, the default location for exports is used. The default location is:
With Option File: [User Settings]\KMLDocuments\Export Data\[Name of Export]
With Mxd parameter: [Mxd Path]\cache
-cf [cache format] The format of the cache folders and files. The default value is zxy

  • zxy - The standard format used for Google Maps and MS Bing. Tiles created in this naming convention can be used almost all online viewers
  • qk - Older MS Quadkey format. This format is not necessary for MS Bing but is needed for the older MS Virtual Earth 3D viewer
  • ags - ArcGIS Server Format - Uses the AGS Level/Row/Column format. These caches can be copied to and served from an ArcGIS Server installation
-transparent true Export all tiles with a transparent background. The default is true
-antialias false Use AntiAlias drawing to smooth lines and text in the final images. This technique can take more time then standard drawing but the output is more visually pleasing. To reduce individual tile size, you should use the PNG8 format with this option. The default is false
-adaptive true Use the Adaptive Exclusion Mask which is a mask that is created automatically as the export progresses. If areas at higher levels (say Level 10 vs. Level 12) are considered transparent (or fully the map background color), then these same areas at lower levels are also most likely transparent and those areas can be skipped by the exported when it comes to them at a later point. If your data has a lot of transparent areas that would be difficult to mask out using a manual Exclusion Mask, this feature can save large amounts of processing time. The default is true
-format png32 The image format to use with the tiles. The default it png32

  • png8 - The best option for quality images with small file sizes. Only use this option of your tiles will contain less then 256 colors
  • png24 - Smaller then full png32 but will not display in some browsers. Not recommended
  • png32 - The highest fidelity images that work with nearly all browsers and applications. With AntiAlias on, the file sizes can be large
  • jpeg - Use this option with imagery data (raster)
-cutters [2,4,8,16,32] The number of A2EExporter processes that will be used for the export. This value must be 2,4,8,16 or 32. For best results, the number of cutters should align with the number of CPU Cores on your machine. For instance, a 4 CPU Dual Core Server could be run with -cutters 8 and the export time would be approximately 8 times as fast as a single cutter. Disk access contention and other running processes may affect this result.

The extent of the export is automatically divided into each of the available cutters. For higher levels, there will be tile overwrite among the cutters however since they share teh same cache folder, this is not an issue in the final product. However, it may be optimal to export your higher levels with a single tile export and then use multiple cutters for the lower levels where it is needed most.
Both the bbox and inclusion parameters are ignored if the cutters is specified. The exclusion mask is still used by all of the cutters.
-bbox [xmin;ymin;xmax;ymax] An exact bounding box or list of bounding boxes to use during the export. The values must be in decimal degrees (lat/lng). When this value is present, the Inclusion mask for the export is set to the list in bbox. An Inclusion mask will only export tiles that intersect with its list of bounding boxes, all other areas are ignored.
Single Bounding Box: -bbox xmin;ymin;xmax;ymax
List of Bounding Boxes: -bbox xmin1;ymin1;xmax1;ymax1, xmin2;ymin2;xmax2;ymax2, xmin3;ymin3;xmax3;ymax3...
-inclusion [path to shapefile] The full path to a polygon shapefile that includes all extents that will be used in the export. The tile exporter will cycle over all of the extents and ignore all other areas in the map.
-exclusion [name of layer] The name of the layer in the Mxd that will be used as the Exclusion mask. This layer must contain polygons and will (optionally) be removed from the map prior to export. During the exporting routine, each tile chunk (a 5x5 tile area) is compared against every polygon in the Exclusion Mask. If the tile chunk's extent intersects any of the mask polygons, it is not exported. A good use for Exlusion masks are large areas that do not contain any useful mapping data. For instance, oceans, large lakes or any large land area that you would like to avoid. Using Masks can dramatically speed up tile exports.
-cdl [map level, 0-22] Change Detection Level - The level used for change detection when exporting against an existing cache with tiles that are drawn using the same symbology as your current map. When changes are detected, a new entry for the area is added to the Inclusion mask. All subsequent levels will only use the Inclusion mask areas for tile cutting. Best practise for choosing a level will vary based on map symbology and any scale dependent renderers in the map but for most cases, this level can be set to 2 levels above your -end level

This functionality can dramatically speed up tile cache maintenance where changes are minimal but unevenly spread across a cache extent. (ex: a Tax Parcel map cache that is updated each week with a hundred edits spread across the entire municipal extent). Since lower map levels take the longest to draw, this process seeks to remove large areas that do not need to be redrawn.
Remote Tile Storage
-storage [S3, A2EC] The type of remote storage to use. If this option is used, user,pwd,instance,name options must also be used.
  • S3 - Amazon S3
  • A2EC - Arc2Earth Cloud Tileset
-user
  • S3 - the AccessKey for the account
  • A2EC -the UserName of the Google account
-pwd
  • S3 - the SecretKey for the account
  • A2EC -the Password of the Google account
-instance
  • S3 - the BucketName for th export
  • A2EC -the Arc2Earth Cloud instance Url (http://demos-arc2earth.appspot.com/a2e)
-name
  • S3 - the Folder directly under the Bucket, usually the name of the tile cache
  • A2EC -the name of the TileSet (one is created if it does not exist)
Non ArcGIS Uploads to an A2E Cloud
-type uploadTiles Upload a folder containing a standard tile cache to an A2E Cloud instance. You must use this in conjunction with A2E Cloud credentials and a folder location (see example below).

A tile cache folder must be in this exact format: \CacheName\LevelFolder\XFolder\YTileName.ext (ex: C:\cache\19\103543\234581.png)
-type uploadLayer Upload a file (or http url) containing GeoJson, KML or GeoRSS to your A2E Cloud instance. The uploader will handle security and breaking up the file into multiple, parallel uploads. Attribute fields are determined by the first valid feature found in the file. All features should be of the same geometry type.

  • type - uploadLayer
  • instance - A2E Cloud instance
  • user - must be a Cloud Admin to upload
  • pwd
  • file - a file containing GeoJson, KML or GeoRSS. For GeoJson data, the features must be in a FeatureCollection array
  • format - gjson, kml or georss. the default is gjson
  • name - the name of the datasource. If the datasource exists already, the features are inserted as create_or_update
-type uploadSite Upload a folder containing client application files (html, javascript, css, images etc) to your A2E Cloud instance where it will be served using a user defined ACL for security. An upload.cfg file is written to the folder to track the last time an upload occured. On the next upload, only files that are newer then this date are uploaded

  • type - uploadSite
  • instance - A2E Cloud instance
  • user - must be a Cloud Admin to upload
  • pwd
  • folder - the folder containing the site files to upload. The folder name should match the site name (ex: -folder C:\temp\mySite -name mySite)
  • name - the name of the site. If the site exists already it is updated
  • default - make this site the default site for the Cloud (e.g. served from http://yourapp.appspot.com)

Examples

Simple Export - Only specify the Mxd file to export
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd"

Using Levels - Set the exact levels to export.
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 14 -end 18

Cache Location - Set the exact folder to use for the cache.
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 14 -end 18 -cache "X:\someNetworkDrive\cache"

Individual Files - Send in file or layer paths instead of a MXD file
A2EExporter.exe -files "C:\myRaster.tiff,C:\myRaster2.tiff" -start 14 -end 18 -cache "X:\someNetworkDrive\cache"

Use Multiple Cutters - Use a single exporter for the upper levels and use 4 cutters to subdivide the work of the larger lower levels.
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 14 -end 16
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 17 -end 19 -cutters 4

Inclusion Mask - Use a polygon shapefile from another workflow process to update only areas that have changed
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 14 -end 18 -cache "X:\someNetworkDrive\cache" -inclusion "C:\parcelChangesMask.shp"

Publish To Amazon S3 - Copy map tiles directly to S3.
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 14 -end 18 -storage S3 -user [accessKey] -pwd [secretKey] -instance [bucketName] -name "SomeName"

Publish To Arc2Earth Cloud - Copy map tiles directly to your A2E Cloud.
A2EExporter.exe -mxd "C:\pathToYourMxd.mxd" -start 14 -end 18 -storage A2EC -user [userName] -pwd [password] -instance "http://yourinstance.appspot.com/a2e" -name TilesetName

Publish Non-ArcGIS Tile Cache to an A2E Cloud - Copy map tiles directly to your A2E Cloud.
A2EExporter.exe -type uploadTiles -folder "C:\someFolder\cache" -user [userName] -pwd [password] -instance "http://yourinstance.appspot.com/a2e" -name TilesetName

Publish Non-ArcGIS Vector Data to an A2E Cloud - Upload Shapefile layer as a vector datasource.
A2EExporter.exe -type uploadLayer -file "C:\someFolder\us_states.json" -user [userName] -pwd [password] -instance "http://yourinstance.appspot.com/a2e" -name DatasourceName

Publish Site Files to an A2E Cloud - Upload a folder with html, js, css etc.
A2EExporter.exe -type uploadSite -folder "C:\someFolder\SiteName" -user [userName] -pwd [password] -instance "http://yourinstance.appspot.com/a2e" -name SiteName