Generating Tiles from a Request File

This procedure outlines how to create a tile request list and use it to generate tiles with Tile Generator.

To generate tiles from a tile request list:

  1. Extract the files from TileGeneratorUtility.zip to a location of your choice.
  2. To generate a tile request file, in a command window, type cache_builder.bat followed by the required and optional parameters that meets your needs, as defined in the table.
    
    cache_builder.bat -url=http://<server>:<port>/rest/Spatial/MapTilingService -fileOutput=C:\SpatialServer\TILING\MapTilingRequests.txt -map=/NamedTiles/WorldTile -level="1,2-4"  -mbr="-20000000, -20000000, 20000000, 20000000" -username=admin -password=admin
    Parameter Required Description
    -fileOutput <fileOutput> yes Path and name of the file the tile requests will be saved to.
    -level <level> yes Level(s) for which to generate tiles (e.g., comma separated 1,2,6 or range 1-10).
    -map <map> yes Named tile in the repository used to create tile(s) ( e.g., /NamedTiles/WorldTile).
    -mbr <mbr> no Minimum Bounding Rectangle (MBR) to be used to generate tiles.
    -password <password> yes Password to access the repository.
    -url <url> yes URL to the Map Tiling Service.
    -username <username> yes User to access the repository.
  3. To generate the tiles using the output file from step 2, in the command window, type cache_builder.bat followed by the parameters as defined in the table below.
    
    cache_builder.bat -url=http://<server>:<port>/rest/Spatial/MapTilingService -fileInput=C:\SpatialServer\TILING\MapTilingRequests.txt -image=png -threads=1 -dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -password=admin 
    Parameter Required Description
    -dirOutput <dirOutput> yes Path to the directory the generated tiles will be saved to. If the Tile Generator is located on the same machine as Spectrum™ Technology Platform, dirOutput must be a different location that what is configured for the diskPath tile cache parameter in the MapTiling service configuration.
    -fileInput <fileInput> yes Path and name of the request file to generate the tiles.
    -image <image> yes Image type of tiles (e.g., png).
    -password <password> yes Password to access the repository.
    -threads <threads> no Number of threads to use to generate the tiles.
    -url <url> yes Specifies the URL to the Map Tiling Service.
    -username <username> yes User to access the repository.
    -cache <cache> no When set to false, sets the HTTP “cache-control” header to “no-cache” when doing a tile request. This tells the proxy server to go back to the originating server for the tile. The proxy server will replace what’s in its cache with the new tile.