Creating custom maps

Download pmtiles

The simplest way to get map data for Battle Staff Tools is to download a pmtiles file that covers the world, or an extract from a file that covers the world.

Download the full world with all zoom levels

https://maps.protomaps.com/builds/

Download an extract of the world

If you would like to download an extract of the world so that you get a smaller file, you have several options.

  1. Download the pmtiles CLI from https://github.com/protomaps/go-pmtiles/releases
  2. In Battle Staff Tools, create a blank scenario in the map, and draw a polygon covering the area of interest
  3. Save the scenario so that you get a geojson file
  4. Go to the page listed above for downloading the full world and copy the download link for the latest pmtiles file
  5. Open a terminal window and in the directory where you have downloaded the pmtiles CLI, run the command: pmtiles extract https://build.protomaps.com/DATE.pmtiles OUTPUT.pmtiles --region=REGION.geojson

Creating pmtiles from your own raster data using GDAL

To create maps from your own raster data the quickest way is to use a combination of GDAL and the pmtiles CLI.

  1. To get GDAL, the quickest way is to download and install QGIS https://qgis.org/download/
  2. Download the pmtiles CLI from https://github.com/protomaps/go-pmtiles/releases
  3. Open OSGeoW 4 Shell under QGIS on the start menu and in the directory where you have downloaded the pmtiles CLI, run the following command to create a virtual raster that makes a mosaic of all rasters in the folder: gdalbuildvrt data.vrt C:\example\*.tif (Where you replace C:\example*.tif with the path to your data and the file extension of your data.)
  4. Now run the following command to create a mbtiles file from your virtual raster: gdal_translate data.vrt data.mbtiles -r bilinear -co TILE_FORMAT=JPEG
  5. Once that is done, run the following command to create all zoom levels in your mbtiles: gdaladdo -r bilinear data.mbtiles
  6. Finally run the following command to convert your mbtiles file to a pmtiles file: pmtiles convert data.mbtiles data.pmtiles
  7. You can now delete your data.vrt and data.mbtiles

Creating map data using ArcGIS Pro

If you are more familiar with using ArcGIS Pro than the command line, Battle Staff Tools can read both TPKX and VTPK files

Create Raster Map Tile Package

Use the functionality in ArcGIS Pro to Create Map Tile Package (Data Management).

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-map-tile-package.htm

Make sure that you check “Package for ArcGIS Online | Bing Maps | Google Maps”.

Create Vector Map Tile Package

Use the functionality in ArcGIS Pro to Create Vector Tile Package (Data Management).

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-vector-tile-package.htm

Make sure that you check “Package for ArcGIS Online | Bing Maps | Google Maps”. I would recommend setting Tiling Format to Flat, but it is not necessary.