Generating Tiles Directly with Tile Generator


This process generates tiles directly without using a request file.


To generate tiles, use the following options:

Parameter Required Description Example
-url=<url> yes The URL to the MapTiling service (MTS) or proxy when configured with MTS as an origin server.
Note: When using a third-party cache tool, specify the third-party URL instead of the Spectrum MapTiling service URL. Refer to the third-party help for details.
url=http://<server>:<port>/ rest/Spatial/MapTilingService
-format=<format> yes Tile format type (gif, jpeg, jpg, mvt, png).
Note: The -format type replaces the deprecated -image type.
-level=<level> yes Level to generate tiles for. This is a comma-separated list (such as 1,2,6) or a value range (such as 1-10). (You might skip a level if it is already generated.) level="2,5-8"
-threads=<threads> no Number of threads to use to generate the tiles. To maximize throughput, set to the number of CPUs for the machine. threads=4
-dirOutput=<dirOutput> no Directory path to save generated tiles locally. See also Output Directory (-dirOutput).
Note: When using a third-party cache tool, you may not need to write tiles to a directory (using dirOutput). Refer to the third-party help for details.
dirOutput=C:\SpatialServer\ TILING\OUTPUT
-map=<map> yes Named Tile Resource to create tiles in the repository. map=/NamedTiles/NYCTile
-mbr=<mbr> no Minimum Bounding Rectangle (MBR) to use to generate tiles. Four values represent the lower left and upper right corners of a bounding rectangle in the coordinate system of the named tile. Defaults to the Tile bounds. See also Minimum Bounding Rectangle (-mbr). mbr="-8275553, 4932706, -8188786, 5003330"
-username=<username> yes Spectrum user accessing the repository. Either an administrator (any user with the Spectrum admin role) or a user with Spatial access permission to the named tile and its dependent resources. username=admin
-password=<password> yes Password for the Spectrum user. password=admin
-cache=<cache> no Use when working with a third-party cache tool that requires a cache header. See also Tile Caching (-cache). cache=false


This request generates png files. No request file is used for this example. This request generates tiles for levels 2 and 5 to 8 skipping levels 1, 3, and 4.

cache_builder.bat -url=http://<server>:<port>/rest/Spatial/MapTilingService -format=png -level="2,5-8" -threads=4 -map=/NamedTiles/NYCTile -mbr="-8275553,4932706,-8188786,5003330" -dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -password=admin

This request generates Mapbox Vector Tile (-format=mvt) files. No request file is used for this example.

cache_builder.bat -url=http://<server>:<port/rest/Spatial/MapTilingService -format=mvt -level="2,5-8" -threads=4 -map=/NamedTiles/NYCTile -mbr="-8275553,4932706,-8188786,5003330" -dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -password=admin