styxman / elevation Goto Github PK
View Code? Open in Web Editor NEWScripts for generating maps based in OSM and SRTM
Scripts for generating maps based in OSM and SRTM
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'
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:
/usr/bin/env: ‘python3.6’: No such file or directory
ModuleNotFoundError: No module named 'map_utils'
Just to inform, the way the -i
option is currently implemented requires to have the XML file in the current directory of generate_tiles.py.
This for instance produces an error even if the file does exist:
cd ~/src
./generate_tiles.py -i ~/src/openstreetmap-carto/style.xml -o ~/src/Tiles
RuntimeError: Could not load map file: File does not exist of 'style.xml'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.