This will require Mapnik 3, but we want to move these PNGs to vectors for better high-resolution support.
Landuses:
Cemeteries:
Lines:
We could start doing it now, as the software update on servers is ready, but that would break all the other systems still using Mapnik 2. We need a roadmap first - see https://github.com/gravitystorm/openstreetmap-carto/issues/2198.
I think of this ticket as meta-issue, because each pattern requires separate PR probably. I'm not sure how to count them, because some of them are combined, but let's start with this list:
If you add the checkbox list to the first post the "ready count" will be displayed on many places here.
I can do it if Paul has noting against it, but first I wanted to know if I get this list right.
In my eyes the line patterns (cliff/embankment) are much more important to move the SVG since they will actually profit from this in terms of normal rendering results.
For the area patterns i would before all put
check if there are any serious performance implications of moving to SVG patterns, especially if the SVGs are fairly large
Mapnik converts SVGs to images as a one time operation for icons and caches the result. I expect it does the same for SVGs as patterns.
BTW: do we have any other line patterns except those two (cliff and embankment)? We should add all of them to the checklist and check/strike them later.
As I'm developing the new PR for rendering aretes and ridges (sorry for the delay BTW, I have limited spare time), I'd like to know whether I can keep the already available PNG icons or I necessarily need to convert them to SVG, thanks.
@kocio-pl - https://github.com/gravitystorm/openstreetmap-carto/search?utf8=%E2%9C%93&q=line-pattern-file
@Ircama - creating them as SVG would be highly advisable because it gives you better control and adjustability and leads to more consistent results. But it is not a big deal in my opinion - if you have a draft as PNG that works nicely it should not be too difficult to translate that concept into a vector design but if you end up re-designing your current drafts anyway it would make sense not to invest into pixel painting it.
I have looked into the problem with using jsdotpattern generated SVGs and it seems Mapnik is just extremely limited in the SVG functionality it understands. Not only <use> is unsupported, nested groups with transforms are apparently not correctly interpreted either.
I have added a script to the jsdotpattern repository (https://github.com/imagico/jsdotpattern/blob/master/svg_pattern.sh) that uses inkscape to sanitize jsdotpattern generated SVGs to be compatible with Mapnik by flattening + clipping the whole content and converting it to a single path.
Note inkscape can be fairly slow with that, the uncloning step on a complex non-inlined pattern can take several minutes.
The script also has a third optional parameter that allows clipping the pattern to a strip in y-direction which will allow using it as a line pattern which might be useful for example in #110.
Any progress here? Is mapnik still the limiting component?
It has to be tested, some description of the problem is here: https://github.com/gravitystorm/openstreetmap-carto/pull/2727#issuecomment-322042825 and here: #2750.