Exported SVG files now not workable in Inkscape

Hi all,
Two months ago I exported an svg file from openstreetmap and edited it in Inkscape to create a map for a non-fiction book I have written. It worked seamlessly and I and the publisher were pleased with the result. However, today I tried to start a second map using exactly the same procedure and settings and the resulting svg does not work properly in Inkscape, it is blocky and slow and crashes Inkscape. The problem is not with Inkscape as I have uninstalled and reinstalled the programme, and when I import the openstreetmap svg file from two months ago it continues to work seamlessly.
My question is, (a) is this a known issue with a known fix, or (b) is there a way to access the version of Openstreetmap from two months ago, when the exports worked perfectly.
Any help would be much appreciated as I spent a frustrating day on this, thinking Inkscape was the problem.
Wayne

So I don’t know exactly what’s happened in this particular case, and am open to being corrected by more knowledgeable people (like @pnorman ), but…

When this has happened previously, the culprit is usually a change to the stylesheet for the default map style (openstreetmap-carto). Some features in the stylesheet can’t be adequately translated into SVG by Cairo (the SVG rendering software). When this happens, it falls back to a bitmap image which in theory is more faithful to the original map stylesheet, but obviously looks blocky if you view it at any scale other than the original.

You could try opening an issue over at Issues Ā· openstreetmap-carto/openstreetmap-carto Ā· GitHub and seeing if anyone there has any further insight.

See also Problems exporting SVG as a standard map layer

There’s discussion on possible causes in Odd visual effects, missing features when exporting Standard layer to SVG Ā· Issue #1368 Ā· openstreetmap/operations Ā· GitHub though no fix yet

We already have an issue at Odd visual effects, missing features when exporting Standard layer to SVG Ā· Issue #1368 Ā· openstreetmap/operations Ā· GitHub where we believe it to have occurred when upgrading mapnik to v4 but more than that is not known yet other than that it only affects a few SVG renderers and many others are fine.

Thank you for your replies, team. Part of the problem (or possibly the entire problem) seems to be that the svg files are now much larger than when I did the earlier map two months ago. For example, exporting at a similar scale the files were more around 1MB whereas now they come out at 10-20MB.
I’m wondering if anyone can answer part (b) of my original question, i.e. ā€˜Is there a way to access the version of Openstreetmap from two months ago, when the exports worked perfectly?’

Technically yes. But not easy.

It would require separately setting up and running the code for the website and the map generation as it existed two months ago and feeding in the data into a database. You’d have to do this yourself, or pay someone to do so. Possible, but not straightforward.

@Jarek answered, so I have another question for you: did you try https://print.get-map.org/ or similar services?

1 Like

A possible workaround: If you aren’t wedded to the specific appearance of the Standard layer (that is, the OSM Carto stylesheet), you could load a vector map style into QGIS, then export it as SVG. There are a wide variety of vector styles, including multiple vector ports that have a passing resemblance to OSM Carto. QGIS’s support for vector styles is still in its infancy, so be prepared for some incompatibilities that you might have to touch up, particularly regarding text labels.

as the operator of print.get-map.org I was about to suggest the same; I’m still using Mapnik 3.x on that site so the SVGs should still be ā€œfineā€ …

4 Likes

Hi Hartmut, thank you for your reply. I did try print.get-map and downloaded the resulting map, which all looked promising, but when I clicked on the svgz file I could only see it in my (MS Edge) web browser and couldn’t see a way to access the file itself to customize it. I would be grateful if you could point me in the right direction on this.

Did you try do unzip the SVGZ into a SVG?

1 Like

I did manage to obtain the svg by using ctrl-S on the web page displaying the map, and saving-as an svg. The narrow band working display on get-map means that my window for the area I wanted had to be zoomed in quite a bit, which means that not all the finer detail of the OSM base plan was collected. It did work fine when imported into Inskcape however, which is much better than I had achieved previously this time round, so it is certainly a helpful partial solution.

Did you try to change the paper size? I did edit a previous job (yours?), and with 2 DIN A0 I get much more details.
https://print.get-map.org/results/2026/06/10/518273_2026-06-10_11-26_841-x-1189-mm2.svgz

Depending on how your browser is set up it may try to display the file right away; in that case you should be able to right-click on the file symbols and select ā€œSave link as ā€¦ā€ or equivalent.

Also when having a SVG / SVGz displayed already there should also be a ā€œSave as ā€¦ā€ feature, e.g. in the ā€œFileā€ menu.

Regarding detail levers: yes, the paper size determines the Zoom level, and so the level of detail.

But also be warned: the more details, the more painful editing with Inkscape will become. Inkscape unfortunately still can utilize a single CPU core for most operations only; so when trying to edit a Din A1 SVG of a densely populated area can at times feel like working with CorelDraw! 3 on a 386 with 2MB of RAM in 1993 … :o

Thanks Hartmut, it’s getting late here in NZ but just a quick note to acknowledge your help. I did manage to use the ā€˜save as’ to get the svg file and it does work fine in Inkscape. I note what you say about paper size vs level of detail vs performance tradeoff. Thankfully the maps I am producing do not need a lot of detail so I will look further at an optimal setting in the morning.

Thank you for your help, and we are definitely getting there, as per my separate reply to Hartmut

If your goal is to produce a print map with a Mapnik style you should produce a PNG of a suitable resolution and scale and embed it in a PDF. The Mapnik vector to raster process is better than the on-printer or inkscape vector to raster process.

Printers may have trouble with full-page 300 or 600 DPI images but massive SVGs are worse.

Creating a SVG to edit is sometimes useful but you’re generally better off editing the style or data to get what you want if it’s possible.