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 TileServerAutomation
Run the setup script to install all necessary dependencies:
./setup.sh
After 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 tileserver
To check the status of the TileServer:
pm2 status tileserver
To stop the TileServer:
pm2 stop tileserver
Ensure 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.