This project provides a comprehensive solution for setting up and managing a TileServer with automated processes for handling shapefile conversions and tile serving using tileserver-gl-light and PM2.
Clone the repository to your local machine:
git clone https://github.com/viper88c/TileServerAutomation.git
cd TileServerAutomationRun the setup script to install all necessary dependencies:
./setup.shAfter installation, you can use the script to process shapefiles into MBTiles format:
./processtiles.sh <input_directory_containing_tile>This script will detect the type of geographic data (e.g., Zip Codes, Counties, Cities, States), process the shapefiles, and update the corresponding layers in tiles.mbtiles.
The project uses tileserver-gl-light to serve tiles and PM2 for process management. To start the TileServer on port 3000:
pm2 start "tileserver-gl-light -p 3000 tiles.mbtiles" --name tileserverTo check the status of the TileServer:
pm2 status tileserverTo stop the TileServer:
pm2 stop tileserverEnsure your shapefiles are placed in the specified input directory before running the processing script. The script will unzip, process, and integrate the shapefile data into the TileServer automatically.
For more information on PM2 and tileserver-gl-light, refer to their respective documentation.