Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Group letters and halo in a label in exported SVG #2229

Open
Zverik opened this Issue · 6 comments

3 participants

@Zverik

Ideally all symbolizers should produce not an array of objects, but a group with them. An outstanding case is TextSymbolyzer: it produces a lot of individual letters and paths for halo. I had to write a script to group those, but it would be nice if mapnik did it.

@tomhughes
Collaborator

The problem is that mapnik currently outputs SVG via cairo, and cairo has no support for grouping so there is not much mapnik can do.

When the native SVG renderer is complete no doubt it will do what you want.

@Zverik

So #1917 does not actually work?

@tomhughes
Collaborator

It probably does, yes, but that is using the native svg renderer which, as I understand it, is not complete yet and might not therefore be able to render everything that the agg and cairo renderers can.

@Zverik

Is it possible to include some markers in exported SVG objects that indicate symbolizers (and hopefully layers) those objects are on? E.g. symbolizer="t1231", or as id? This would allow for easier postprocessing, maybe with grouping.

@springmeyer
Owner

Yes, <g id="layer name"> is done in the native svg_renderer if I recall correctly. Its also easy to extend. I recommend you try it out. The limitations are that it does not yet support text and is not bound from python (so you have to currently write a bit of c++ to access it). But otherwise works well and has promise.

@springmeyer
Owner

patch to support text at https://gist.github.com/springmeyer/2778d7c64b301c9e2aa5. Just needs updated to latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.