Allowing global defaults for symbolizer properties in XML #481

Closed
artemp opened this Issue Oct 11, 2011 · 9 comments

Comments

Projects
None yet
3 participants
Owner

artemp commented Oct 11, 2011

The osm.xml uses round for line-join and line-cap, which is not the default.

While round should continue to _not_ be the default (because it is measurably slower to render compared to butt), for certain styles we that demand it, and accept the slight performance loss, we should consider allowing for global defaults to be set for more concise stylesheets.

Owner

artemp commented Oct 11, 2011

[Ldp] As mentioned on irc, a wild idea: being able to set global stylesheet-wide css defaults could prove to be handy too.

Say you actually want the current 0.6/0.7 BUTT_CAP/MITRE_JOIN behaviour in 0.8+, having to set your stylesheet default only once instead of in every style saves a lot of work and bytes.

Contributor

strk commented Nov 15, 2012

+1 this will be extremely useful when dealing with default changes introduced between mapnik versions.

I'm right now dealing with the "clip" attribute of MarkerSymbolizer, for example, which was introduced in 2.1.0 and defaults to the new behavior (true). In order to transform old styles to new styles I'll have to add a clip=false attribute but ONLY when a MarkerSymbolizer is in use. The only way to do this would be to have a way to specify a default for a symbolizer (so the symbolizer is NOT activated ONLY because I needed to specify a default for it).

See Vizzuality/grainstore#33

Contributor

strk commented Nov 15, 2012

I can look at this.
Do you think it could go into a mapnik-2.1.1 ? (rationale for micro release: allows for backward compatibility).
@springmeyer

Owner

springmeyer commented Nov 15, 2012

@strk - I doubt this, when/if implemented, would feel right for a backport because it would require quite a bit of code. So, I'd say, if you are keen on this feature, then it would be best to come up with a good design that would handle many types of defaults (per symbolizer, per property, per layer), implement as a pull against master, then go from there. Because I know you are trying to find quick solutions I doubt this is the one.

Contributor

strk commented Nov 15, 2012

Got me, I think I found another way (but I still think this feature will be useful
in the future).

Contributor

strk commented Nov 27, 2012

Another case came out which clearly shows we need this:
#481

We'll want the default to be per-geometry-type, as that's the only way to replicate 2.0.0 marker-type default being ellipse for puntal input and arrow for linear or areal input.

Owner

springmeyer commented Nov 27, 2012

Did you mean to link to #481 or some other ticket? (since this is 481 :) )

Contributor

strk commented Nov 28, 2012

Sorry, I meant this: Vizzuality/grainstore#39
We're using wild string manipulation to try at handling it, but of course it won't ever possibly be 100% accurate unless by being able to know which block applies to which record of which type...

Owner

springmeyer commented Oct 4, 2014

new issue for this at #2495

@springmeyer springmeyer closed this Oct 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment