Skip to content

keithsharp/osm-print-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mapping Virtual Challenges

This is the notes, scripts, and tools I used to build the maps for the virtual running challenges.

Specific Maps

Software install

Use scripts/build-mapnik.sh to build mapnik (version 4.0 from HEAD) and python-mapnik.

brew install postgresql@14 postgis osm2pgsql
pip3 install nik4
git clone https://github.com/gravitystorm/openstreetmap-carto.git
git clone https://github.com/mapnik/mapnik.git
git clone https://github.com/mapnik/python-mapnik.git

Setup

Download data from Geofabrik - the route readme files for details.

To start the PostgresQL database:

brew services run postgresql@14

To prepare the database (you might want to delete the database first?):

createdb gis
psql -d gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;'

To load the data:

cd openstreetmap-carto
osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis ../data/us-latest.osm.pbf
./scripts/get-external-data.py

Build the mapnik.xml:

npm install -g carto
cd openstreetmap-carto
carto project.mml > mapnik.xml

Fonts

You need to use Font Book.app to check if the fonts are installed. If not:

cd openstreetmap-carto
./scripts/get-fonts.sh

Now use the Finder to drag all the font files to Font Book.

Tools

About

Creating printable maps from OSM data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages