Coder Social home page Coder Social logo

elevation's Introduction

Metrics

elevation's People

Contributors

mdione-cloudian avatar styxman avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

miklobit johan--

elevation's Issues

generate_tiles.py - mapnik.load_map flag

Hi,

I think you might maintain the most updated/functional version of generate_tiles.py.

I would suggest to consider revising the hardcoded setting of the strict flag in mapnik.load_map.

Possibly, it might be set to False like

mapnik.load_map(self.m, mapfile, False)

or alternatively parametrized through a command-line option.

It will avoid errors like:

RuntimeError: Failed to find font face 'unifont Medium' in FontSet 'book-fonts'

How to install generate_tiles.py

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.