I'd like to print a big map of Hamburg in DIN A0 format, based on #openstreetmap data!
-
I'd like to print a big map of Hamburg in DIN A0 format, based on #openstreetmap data!
Does anyone have recommendations for a command-line tool to generate one? Ideally, you could configure it a bit, to include the subway network, for example!
-
G gustavinobevilacqua@mastodon.cisti.org shared this topic on
-
A filter to convert #OpenStreetMap data to SVG, so you can import them in Inkscape, doesn't seem too difficult (probably someone has it, too).
-
@GustavinoBevilacqua @blinry the first OSM renderer called Osmarender was an XML XSLT to transform osm XML data to an XML SVG.
Most likely wont work anymore today.
-
In past century, for a friend, I wrote a TurboPascal program to convert data coming via serial cable from a Wild total station¹ to DXF, to be imported into a pirated Autocad running under DOS 2.11… on a 17" monitor the size of a microwave oven
To work with XML seems easier
-
Me: "Generate me a map of Hamburg!"
print.get-map.org: "Here you go!
"
It's what I expected, but maybe what I deserved! :P
-
@GustavinoBevilacqua @blinry the main OSM web page allows you to download the map on the screen to SVG (look under the share menu). It’s not perfect, and obviously best for small geographies, but helpful if you need a quick SVG
-
Trying what different zoom levels and DPIs look like on paper.
OSM's default tiles are only available in rather low resolution – currently leaning towards a http://printmaps-osm.de export at 1:5000 scale, printed at 600 DPI. That'll have text that's tiny but still readable, and preserve *a lot* of details! :D
-
I wanted to report on the methods I've tried to get a high-resolution #OpenStreetMap of #Hamburg so far:
https://bigmap.osmz.ru is a bulk downloader for the pre-rendered tiles you see on osm.org. It can even give you a Python script to do that, which you can customize.
Pretty neat tool – but the resolution of the "Standard" layer isn't really high enough for printing, or the text would be *super tiny*!
-
The new "Tracestack Topo" layer on osm.org has a higher resolution, and would look pretty crisp! But around my preferred map scale of ~1:10000, it doesn't show the outlines of buildings, which I really don't like, so it's not an option. :(
You can compare the two styles (and many other styles) here: https://mc.bbbike.org/mc/?lon=9.989164&lat=53.550867&zoom=16&num=2&mt0=mapnik&mt1=tracestrack-topo
-
Next, I tried to do some rendering myself! This would give me a lot of control of the result – I could make subway lines more visible, for example!
Unfortunately, this seems to requires the following tower of technologies:
1. Download the raw OSM data.
2. Import it into a Postgres database using osm2pgsql.
3. Compile the "Carto" style using CartoCSS preprocessor (which seems unmaintained).
4. Run the mapnik renderer.I had trouble fitting all of these pieces together properly, and gave up.
-
So it might be nice to use the setup of someone who has figured this out after all.
On https://wiki.openstreetmap.org/wiki/OSM_on_Paper, I found a web service that comes really close to what I'd like:
Most importantly, you can set reasonable map scales like 1:10000, which some other tools didn't allow!
It has a maximum paper size, and some glitches when you come close to it, but I generated two overlapping images and stitched them together in GIMP…
-
I decided to generate a map at a 1:10000 scale (300 dpi), and then print it at twice the resolution, to have as many details as possible (and a small but readable font size).
So here is my intermediate result: A PNG, to be printed at 600 dpi, showing much of Hamburg at a 1:20000 scale (5 cm = 1 km).
It's 650 MB large :P Take some caution trying to view it!
But… it's really fun scrolling around and seeing what I can find already! :3
-
I just took this image to the copy shop, to have it printed – when they tried to open it on their Windows computer, it showed an "insufficient memory" error! :'D
-
They told me yesterday to send them the file via their web upload – not sure what kind of difference that makes? The PC that couldn't open the file seemed more like a "USB stick handling terminal", so I guess they have more powerful computers in the back…
Anyway, they just told me I could fetch the poster in half an hour! \o/
-
Some more options for making high-resolution #openstreetmap posters that I found:
There are organizations providing high-resolution pre-rendered tiles in OSM's default "Carto" style, which I love! (osm.org's versions are too low-resolution for printing.
Many are commercial (but often have a "free tier", which should be sufficient). The best one I found is https://maps.lima-labs.com (they seem to use the "German" Carto fork, which highlights the Autobahn…)
-
And there's the data center of the University of Erlangen–Nuremberg, which also provide free high-resolution tiles in the Carto style!
They're mostly intended for internal use, but they permit low-volume external use, as well. If you go this route, please make sure to crawl the necessary tiles slowly. <3
Here's a comparison of osm.org's tiles, and the RRZE tiles:
-
Using one of these tile providers, you could use two approaches to make them into a large-scale map:
You could have https://bigmap.osmz.ru generate a Python script for bulk download, and swap in another URL to download from.
Or you could create a source for them in https://qgis.org (a desktop map-rendering application). This makes it pretty convenient to generate a print file in the correct map scale, as well! (Not sure how to do rate limiting there?)
-
Second option: Vector tiles! https://openfreemap.org is a community-made free source that I found. You can also load them into QGIS easily. (Caveat: Seems to use English labels?)
They need to be rendered client-side, though, so you need a good style definition. The best one I found is the one that comes with the MapTiler QGIS plugin: https://github.com/maptiler/qgis-maptiler-plugin (It's open source, even if their data source is not free, but you can copy the style to the OpenFreeMap source).
-
One very nice thing about this vector-based approach is that you can *change* the style definitions to your liking! For example, here's an example where I tried to highlight the subway lines more (for a similar region than the raster tiles a couple of toots ago):
To be honest, I think the quality and attention to detail in the raster Carto style is hard to replicate, though. Would require some additional tweaking to make me happy. But QGIS can now export this to a crisp PDF!
-
For my poster, I used http://printmaps-osm.de, which I still think is a good, low-hassle option, if your desired size is not larger than something like A0 or double-A0, and if you're happy with the default style. It even has a couple of different styles to pick from.