Skip to content

clockard/xyz-tile-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XYZ Tile Cache

A slippy (xyz) tile proxy server that caches tiles for fast local retrieval or offline loading. Sources can be XYZ or WMTS and can include a time parameter.

A set of publicly available sources are included by default but can be removed or update as desired.

Bounding boxes with max zoom levels can be defined for preloading tile data. If a tile is not locally available the server will reach out to the source to try and retrieve the tile. If successful the new tile will be cached as long as the maxTileStorage has not been surpassed.

Configuration Parameters

server:
  port: 8383

xyz:
  baseTileDirectory: "/tmp/tiles"
  maxTileStorage: 1000000000
  layers:
    - name: "satellite"
      urlTemplate: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
  boundingBoxes:
    - preCache: true
      maxZoom: 5
      north: 70
      south: -70
      east: 179
      west: -179

Docker Build

mvn clean package
docker build --build-arg VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) -t xyz-tile-cache:latest .

Docker Run

This example assumes a local tile repository at /tmp/tiles and a configuration file at /tmp/application.yml

docker run -v /tmp/tiles:/tmp/tiles -v /tmp/application.yml:/app/application.yml --rm --name xyz -p 127.0.0.1:8383:8383/tcp xyz-tile-cache:latest

By default tile layers will be available at http://localhost:8383/tilesZYX/satellite/{z}/{y}/{x}.png

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors