Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install generate_tiles.py #3

Open
Ircama opened this issue Feb 25, 2018 · 3 comments
Open

How to install generate_tiles.py #3

Ircama opened this issue Feb 25, 2018 · 3 comments

Comments

@Ircama
Copy link

Ircama commented Feb 25, 2018

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'
@StyXman
Copy link
Owner

StyXman commented Feb 25, 2018

Yes, I should improve this, maybe even fork this into its own project. I'll have some time this week, I'll see how feasible that is.

@StyXman
Copy link
Owner

StyXman commented Mar 2, 2018

In fact py-3.6 is not needed, but py-3 is, so I just change the #! line and that should simplify the install a lot.

@StyXman
Copy link
Owner

StyXman commented Mar 2, 2018

So now instructions should be more like:

  • sudo apt-get install python3-shapely python3-mapnik
  • wget https://raw.githubusercontent.com/StyXman/elevation/master/generate_tiles.py
  • wget https://raw.githubusercontent.com/StyXman/elevation/master/map_utils.py

Etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants