Skip to content

How to install generate_tiles.py #3

Description

@Ircama

As your generate_tiles.py version needs python-3.6 and related prerequisites, I have put here a possible installation procedure including python 3.6:

# Download generate_tiles.py
wget https://raw.githubusercontent.com/StyXman/elevation/master/generate_tiles.py
wget https://raw.githubusercontent.com/StyXman/elevation/master/map_utils.py

# Install python-3.6
sudo apt-get install build-essential python-dev python-setuptools libboost-python-dev libboost-thread-dev -y
sudo add-apt-repository -y ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install -y python3.6
sudo apt-get install -y python3.6-dev

# Install python-3.6 prerequisites
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py
sudo python3.6 -m pip install --upgrade pip setuptools wheel
sudo python3.6 -m pip install shapely

# Install python-3.6 python-mapnik
git clone -b v3.0.x https://github.com/mapnik/python-mapnik
cd python-mapnik
BOOST_PYTHON_LIB=boost_python-py35 python3.6 setup.py install
cd ..

Additional notes:

  • generate_tiles.py requires to have the XML file in the current directory.
  • When running generate_tiles.py, you might get the following error if python3.6 is not installed: /usr/bin/env: ‘python3.6’: No such file or directory
  • Tou might get the following error if map_utils.py is not downloaded: ModuleNotFoundError: No module named 'map_utils'

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions