Skip to content

Instantly share code, notes, and snippets.

@ryanbaumann
Last active April 11, 2024 13:20
Show Gist options
  • Save ryanbaumann/e5c7d76f6eeb8598e66c5785b677726e to your computer and use it in GitHub Desktop.
Save ryanbaumann/e5c7d76f6eeb8598e66c5785b677726e 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
@chiubaca
Copy link

Great write up, very useful! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment