Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leegee/c60177a0b1ef2b4fc84ef863be023d3d to your computer and use it in GitHub Desktop.
Save leegee/c60177a0b1ef2b4fc84ef863be023d3d to your computer and use it in GitHub Desktop.
Install Tippecanoe to make Mapbox Vector Tiles on a Windows 10 OS machine

Problem

Tippecanoe is an open source command line tool for creating Mapbox Vector Tiles. It runs only on unix environments like MacOS and Linux - so if you need to make maps with large vector data from geojson, shapefiles, or similar - you're hosed if you're on Windows.

Goals

  1. Create vector tiles of massive vector data on a Windows 10 machine

Requirements

  1. Windows 10 personal, pro, or server OS
  2. Admin rights on the machine you're installing on
  3. Install Ubuntu 14.04+ or more recent

Tutorial

  1. Install the Ubuntu Linux Bash shell from the Microsoft Store. Follow the tutorial here.
    • Make sure to setup your UNIX username and password to something that you'll remember. Store it in your password manager!
  2. Open the Ubuntu Bash terminal on your Windows machine once everything is installed.
  3. Change directory to your C:/ drive in your Ubuntu shell - cd ../../mnt/c. This should put you in the directory /mnt/c on your Windows C:/ drive.
  4. Install git to download the latest Tippecanoe
    • sudo apt-get install software-properties-common
    • sudo apt-add-repository ppa:git-core/ppa
    • sudo apt-get update
    • sudo apt-get install git
    • sudo apt-get install unzip
    • sudo apt-get install wget
    • (if for some reason you have issues with git, you can download the Tippecanoe code to use in the next step directly for version 1.34.0 using wget https://github.com/mapbox/tippecanoe/archive/1.34.0.zip && unzip 1.34.0.zip
  5. Install Tippecanoe
    • Prereqs
      • sudo apt-get install build-essential libsqlite3-dev zlib1g-dev
      •  sudo apt-get update -y
         sudo apt-get install -y g++-5
         export CXX=g++-5```
        
    • git clone https://github.com/mapbox/tippecanoe.git
    • cd tippecanoe
    • make
    • sudo make install
  6. Check your install was successful
    • tippecanoe --version
  7. Now Tippecanoe is installed, and you can run it from your Ubuntu bash terminal on any files you have on your Windows machine.
    • EX I have a geojson file containing polygons representing US ACLU districts in Flordia. I can now tile it using this command: tippecanoe -P -ab -o out.mbtiles --coalesce-densest-as-needed --extend-zooms-if-still-dropping -zg --generate-ids -f -l "districts" Florida_63_to_63.geojson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment