NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi all -

I need to print several maps of towns for an organisation, but they need to be styled a certain way (just roads and rivers, and certain colours). Is there away to do this programatically without having to export each map and edit the pdf's? I've seen a few forums which point me to third party sites, but a lot of them are offline and even then there's so many red herrings it seems. Is there a really common method people use?

Thanks!

asked 11 Feb '17, 22:35

dilby00's gravatar image

dilby00
11112
accept rate: 0%


If the maps don't cover too large an area, then your easiest option might be doing this with Maperitive. Maperitive allows you to load data for an area from the Overpass data service, then have it styled with a map style you defined beforehand, and export as SVG or PNG. Best thing about this, it is scriptable, so you could generate a script that repeats this action for all the towns you're interested in. Of course you'll have to invest some time before hand to come up with the right style definition.

An alternative is using the Mapnik rendering engine with a commandline frontend like nik4.py. This works well even with larger areas but requires importing all OSM data into a PostGIS database first. And of course the styling work, too, albeit in a different styling language than Maperitive's.

permanent link

answered 11 Feb '17, 22:43

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×315
×39
×25
×23
×12

question asked: 11 Feb '17, 22:35

question was seen: 1,866 times

last updated: 11 Feb '17, 22:43

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum