-
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
Alternative for comp-op="darken" #3653
Comments
I have heard complaints about SVG export at least 2 times on forum and on help.osm.org, I would be happy if this problem could be fixed. Anybody interested in fixing this? |
More details are here: mapnik/mapnik#3749 |
To my knowledge the only other way to get consistent rendering of admin boundaries with semi-transparency is by preprocessing the data. This is a workable approach but not necessarily a desirable one here. |
Does mapnik/mapnik#4012 help here? Is part of the newest Mapnik release 3.0.22… |
It seems like comp-op is only available in Cairo SVG surface for SVG version >= 1.2, see behdad/cairo@5336cf5. Since Mapnik outputs SVG with On the other hand PDF with |
Yes, SVG 1.1 is the default standard for Cairo SVG Surface. How I could overlook that 😠! |
Is this ancient script still being used for export to PDF and SVG? If yes, to allow surface.restrict_to_version(cairo.SVG_VERSION_1_2) At least PyCairo 1.12.0 is needed: https://pycairo.readthedocs.io/en/latest/reference/surfaces.html#cairo.SVGSurface.restrict_to_version Or is that script somewhere in git? |
Thanks for investigating the issue! OSM website has its own repository, I guess this is where the export might be coded or called from: https://github.com/openstreetmap/openstreetmap-website |
The website redirects to |
Hm, I am not sure where people get vector exports from, since by default it's just .osm file format. I opened a ticket here: openstreetmap/operations#270. |
This is mapnik/mapnik#3749 which has a PR opened today in mapnik/mapnik#4029. |
The script is https://github.com/openstreetmap/chef/blob/master/cookbooks/tile/templates/default/export.erb by the way, and as we're actually creating the surface ourselves in python I guess we can fix this in the script by setting the version on the surface? |
Yes @tomhughes, Ubuntu Bionic has python-cairo 1.16.2, so we can just call |
Fixed in openstreetmap/chef@d95ea79. |
Nice! When this change will became operational and how to make a simple test if this really works? |
It already is, and I already tested it. |
So can we just safely close this ticket now? Because as I understand the reporter, his aim was to allow vector exports, not a code change in itself. |
Also PDF seems OK to me now. |
Oh, I was thinking about "Export" button on top, while this function is available from "Share" button on the right... It's a small usability glitch for me. However both PDF and SVG work for me, so I'm closing it now. If there will be further problems to discuss, it can be reopened. Thanks, guys! |
The current style (4.19) uses the feature 'comp-op="darken"' three times:
Question: Is there an alternative to achieve a similar result?
Background: "comp-op" prevents mapnik/carto to create a svg file with "proper" vector data.
Instead a svg file with an (huge) embedded png map (base64 encoded) will be created. Same problem for pdf.
The text was updated successfully, but these errors were encountered: