Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAlternative for comp-op="darken" #3653
Comments
kocio-pl
added
the
code
label
Jan 21, 2019
kocio-pl
added this to the Bugs and improvements milestone
Jan 21, 2019
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
More details are here: mapnik/mapnik#3749 |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
Does mapnik/mapnik#4012 help here? Is part of the newest Mapnik release 3.0.22… |
This comment has been minimized.
This comment has been minimized.
talaj
commented
Feb 8, 2019
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 |
This comment has been minimized.
This comment has been minimized.
talaj
commented
Feb 8, 2019
Yes, SVG 1.1 is the default standard for Cairo SVG Surface. How I could overlook that |
This comment has been minimized.
This comment has been minimized.
talaj
commented
Feb 8, 2019
•
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? |
This comment has been minimized.
This comment has been minimized.
Thanks for investigating the issue! OSM website has its own repository, I guess this is where the export might be coded or called from: |
This comment has been minimized.
This comment has been minimized.
talaj
commented
Feb 8, 2019
The website redirects to |
This comment has been minimized.
This comment has been minimized.
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 comment has been minimized.
This comment has been minimized.
tomhughes
commented
Feb 8, 2019
This is mapnik/mapnik#3749 which has a PR opened today in mapnik/mapnik#4029. |
This comment has been minimized.
This comment has been minimized.
tomhughes
commented
Feb 8, 2019
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? |
This comment has been minimized.
This comment has been minimized.
talaj
commented
Feb 8, 2019
Yes @tomhughes, Ubuntu Bionic has python-cairo 1.16.2, so we can just call |
added a commit
to openstreetmap/chef
that referenced
this issue
Feb 8, 2019
This comment has been minimized.
This comment has been minimized.
tomhughes
commented
Feb 8, 2019
Fixed in openstreetmap/chef@d95ea79. |
This comment has been minimized.
This comment has been minimized.
Nice! When this change will became operational and how to make a simple test if this really works? |
This comment has been minimized.
This comment has been minimized.
tomhughes
commented
Feb 8, 2019
It already is, and I already tested it. |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
talaj
commented
Feb 8, 2019
Also PDF seems OK to me now. |
This comment has been minimized.
This comment has been minimized.
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! |
Klaus-Tockloth commentedJan 21, 2019
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.