-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert patterns to SVG #2045
Comments
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 #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
|
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. |
Related to #1165. |
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 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: #2727 (comment) and here: #2750. |
This will require Mapnik 3, but we want to move these PNGs to vectors for better high-resolution support.
Landuses:
Cemeteries:
Lines:
The text was updated successfully, but these errors were encountered: