Generating Tiles from a File with Tile Generator
Description
This process generates tiles using a request file.
Parameters
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 |
-fileInput=<fileInput> | yes | Path and name of the request file to generate the tiles. | fileInput=C:\SpatialServer\ TILING\MapTilingRequests.txt |
-format=<format> | yes | Tile format type (gif, jpeg, jpg, mvt, png).
Note: The -format type replaces the deprecated -image type.
|
format=png |
-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 |
-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 |
Examples
First you must have a file containing tile information. For details about creating this request, see Creating a Tile Request File with Tile Generator. This request is an example that generate the file:
cache_builder.bat -url=http://<server>:<port>/rest/Spatial/MapTilingService -fileOutput=C:\SpatialServer\TILING\MapTilingRequests.txt -map=/NamedTiles/WorldTile -level="2,5-8" -mbr-8275553,4932706,-8188786,5003330" -username=admin -password=admin
This request reads the file containing tile information and then generates tiles using that information:
cache_builder.bat -url=http://<server>:<port>/rest/Spatial/MapTilingService -fileInput=C:\SpatialServer\TILING\MapTilingRequests.txt -format=png -threads=4 -dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -password=admin