XYZTile
The XYZTile tool is a universal application for processing and serving XYZ tile data, supporting both color imagery and elevation datasets. It uses Xml configuration files to define tile sources, regions, formats, processing rules, and output targets.
It supports streaming from multiple sources, file formats, and cache layout schemes, making it suitable for rendering large-scale planetary datasets in real-time engines or GIS applications.
XYZTile operates in two main modes:
- Process Mode: Converts local or remote geospatial sources into standardized XYZ tiles, including elevation (Global, GEBCO, SRTM, USGS) and imagery (Esri, OSM, OpenTopo).
- Server Mode: Runs as a dynamic XYZ tile server that downloads and caches high-resolution data on demand, automatically generating lower LODs.
It is possible to specify MD5 exclude hashes for input streams to avoid bad or corrupted data.
The input streams are based on the GeoStream plugin and can be extended to support custom formats or additional protocols.
Process Mode
In Process Mode, XYZTile reads elevation or color data from local or remote sources, generates XYZ tile pyramids, and stores them in a user-defined layout. This mode is ideal for preparing datasets for offline use or high-performance rendering.
The following example Xml configuration generates global elevation coverage using GEBCO and SRTM sources:
<?xml version="1.0" encoding="utf-8"?>
<XYZTile version="1.01">
<target>
<level>12</level>
<border>2</border>
<format>rf32</format>
<target>height_{Z}/{y}/{x}.tif</target>
</target>
<streams>
<gebco>
<prefix>gebco_2022_</prefix>
<path>data/gebco_2022/</path>
</gebco>
<srtm1>
<postfix>.SRTMGL1.hgt.zip</postfix>
<path>data/SRTM1.v3/</path>
</srtm1>
</streams>
</XYZTile>
Server Mode
In Server Mode, XYZTile functions as a caching XYZ tile server. It dynamically fetches and generates tiles on request, caching results for future use. This setup supports hybrid use cases where multiple sources and LODs are blended seamlessly.
On the first request, the tool downloads the highest available resolution and automatically generates lower LODs. Note that initial cache generation may take time depending on the data volume.
Multiple tile targets can be served from a single XYZTile instance:
- Earth street map:
http://xyz_server/earth/street_{Z}/{y}/{x}.png
- Earth topo map:
http://xyz_server/earth/topo_{Z}/{y}/{x}.png
- Earth elevation:
http://xyz_server/earth/height_{Z}/{y}/{x}.tif
- Mars color map:
http://xyz_server/mars/color_{Z}/{y}/{x}.png
- Mars elevation:
http://xyz_server/mars/height_{Z}/{y}/{x}.tif
<?xml version="1.0" encoding="utf-8"?>
<XYZTile version="1.01">
<targets>
<color>
<level>19</level>
<url>earth/street_{z}/{y}/{x}</url>
<path>earth/street_{Z}/{y}/{x}.png</path>
<streams>
<xyz>
<levels>19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1</levels>
<path>earth/street_{Z}/{y}/{x}</path>
<source>https://tile.openstreetmap.org/{z}/{x}/{y}.png</source>
</xyz>
</streams>
</color>
<color>
<level>17</level>
<url>earth/topo_{z}/{y}/{x}</url>
<path>earth/topo_{Z}/{y}/{x}.png</path>
<streams>
<xyz>
<levels>17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1</levels>
<path>earth/topo_{Z}/{y}/{x}</path>
<source>https://tile.opentopomap.org/{z}/{x}/{y}.png</source>
</xyz>
</streams>
</color>
<height>
<url>earth/height_{z}/{y}/{x}</url>
<path>earth/height_{Z}/{y}/{x}.tif</path>
</height>
<color>
<level>9</level>
<url>mars/color_{z}/{y}/{x}</url>
<path>mars/color_{Z}/{y}/{x}.jpg</path>
</color>
<height>
<level>9</level>
<url>mars/height_{z}/{y}/{x}</url>
<path>mars/height_{Z}/{y}/{x}.tif</path>
</height>
</targets>
</XYZTile>
Command Line Parameters
Tellusim XYZTile Tool
-name <name> Configuration name
-log <filename> Log file name
-config <filename> Config file name
-server <name> Server configuration name
Common parameters:
-verbose <enable> Enable verbose output
-check <enable> Validate existing output tiles
-proxy <name> <port> Use HTTP proxy for remote streams
Tile parameters:
-level <number> Target level number (3)
-quality <number> Target image quality (95)
-progress <progress> Resume from specified progress (0)
-memory <memory> Set memory usage limit in GB (2)
-threads <number> Number of worker threads
-override <enable> Overwrite existing tiles
-indices <enable> Fetch indices from streams
-ignore <enable> Continue on errors