merge markers and point symbolizer #952

Open
springmeyer opened this Issue Nov 16, 2011 · 16 comments

Comments

Projects
None yet
5 participants
Owner

springmeyer commented Nov 16, 2011

A single symbolizer should be able to render any type of file (png or svg), support any kind of placement (centroids or along lines), and should support points being dynamically plotted with a few dynamic options (like fill, stroke, and width). I think - its a lot of functionality to pack in one place, but designed well it should be manageable.

Currently point and markers symbolizer's have grown alongside each other are confusingly similar and different:

Markers supports:

  • placing only svg files or dynamically drawing circle's/ellipses
  • supports advanced ability to place points along lines (with special collision avoidance)

Points symbolizer supports:

  • support reading from png or svg files
  • have more traditional placement options targeted at just points and polygons: centroid,point_on_surface/interior

@springmeyer springmeyer pushed a commit that referenced this issue Nov 16, 2011

Dane Springmeyer add support for rendering svg icons with point placement in markers s…
…ymbolizer (originally markers just supported special line placement) - closes #953 - refs #952
efa1b95
Owner

artemp commented Nov 16, 2011

I think we should consider merging PointSymbolizer and MarkersSymbolizer.

On 16 November 2011 17:52, Dane Springmeyer
reply@reply.github.com
wrote:

A single symbolizer should be able to render any type of file (png or svg), support any kind of placement (centroids or along lines), and should support points being dynamically plotted with a few dynamic options (like fill, stroke, and width). I think - its a lot of functionality to pack in one place, but designed well it should be manageable.

Currently point and markers symbolizer's have grown alongside each other are confusingly similar and different:

Markers supports:

 * placing only svg files or dynamically drawing circle's/ellipses
 * supports advanced ability to place points along lines (with special collision avoidance)

Points symbolizer supports:

 * support reading from png or svg files
 * have more traditional placement options targeted at just points and polygons: centroid,point_on_surface/interior


Reply to this email directly or view it on GitHub:
#952

Member

kunitoki commented Dec 5, 2011

At least we could also accept empty text in ShieldSymbolizer, and use that instead of a PointSymbolizer ? The ShieldSymbolizer has all the options wee need, while PointSymbolizer is lacking a lot of options.

Owner

springmeyer commented Dec 5, 2011

@kunitoki - good point - definitely worth looking into.

@kkaefer kkaefer pushed a commit to kkaefer/mapnik that referenced this issue Feb 16, 2012

Dane Springmeyer add support for rendering svg icons with point placement in markers s…
…ymbolizer (originally markers just supported special line placement) - closes #953 - refs #952
758428a

@springmeyer springmeyer pushed a commit that referenced this issue Mar 27, 2012

Dane Springmeyer cairo: match AGG functionality, adding support for dynamic ellipse dr…
…awing and loading from svg icons - closes #1071 (refs #952 - this is stopgap until we refactor and merge with point_symbolizer)
2edaefd

springmeyer was assigned Jul 16, 2012

@springmeyer springmeyer pushed a commit that referenced this issue Aug 1, 2012

Dane Springmeyer support both interior placement and point for markers - helps prepare…
… for #952
16084ff

tokumine commented Jan 5, 2013

Just going to add a point here for google. the Marker Symbolizer does support png uri's, but unpredictably resamples the png resulting in occasional blurry markers. Using point-symbolizer renders all pngs without resampling. My environment is Tilemill 0.10.1 so things may have moved on in trunk since this was released.

Owner

springmeyer commented Jan 5, 2013

@tokumine - interesting, was not aware of the sub-optimal resampling, but I can see it might happen. point_symbolizer supports resampling with basically the same code (here) as markers (here). The difference is that point_symbolizer has a catch for the case where no resampling is needed here.

So, it seems when we merge the two we should keep that non-resampling code.

But, I would be interested to see some examples from you were PNG's were blurry.

tokumine commented Jan 6, 2013

@springmeyer here's an example displaying the inconsistent resampling of icons in the same map when using png files with the marker symbolizer. It's quite hard to detect as the majority actually appear resampled, but when you notice the clean ones it is hard to avoid :).

I should add that this anomaly appears in the same map with only 1 associated style.

resampling_markers

{  
    marker-file:url('maki/airport-2-12-3.png'); 
    text-size:12;
    text-name:"[name_ascii_short]";
    text-face-name:'somefont';   
    text-fill:#666;  
    text-dy:0;
    text-dx:7;
    text-halo-fill:#fff;
    text-halo-radius:2;
    text-allow-overlap:false;
    text-placement-type: simple;
    text-placements:"E,NE,W,S,11";
    text-label-position-tolerance:5;
    text-wrap-width:80;
}

using point-file now with great success.

Owner

springmeyer commented May 8, 2013

planning to move on this soon: will keep point symbolizer interface in XML and python but will remove point symbolizer specific rendering code and instead dispatch to markers code for rendering.

Owner

springmeyer commented May 22, 2013

pushing to 3.x

Owner

springmeyer commented Jul 31, 2014

Took a look at this tonight. Going to be pretty easy to make the switch and keep back compatibility simply by re-routing PointSymbolizer to MarkersSymbolizer in load_map: https://gist.github.com/springmeyer/5fa33f89524b9dae4b98.

But one issue is that this breaks the GroupSymbolizer visual tests because it looks like GroupSymbolizer only supports PointSymbolizer and not MarkersSymbolizer. @jhollinger2 or @zerebubuth - would it be feasible to add support for Markers in Group Symbolizer?

Contributor

hollinger commented Jul 31, 2014

@springmeyer I am not sure exactly what the level of effort is to support MarkersSymbolizer inside GroupSymbolizer, but it is something I would like to have done anyway. I will look into it.

Owner

springmeyer commented Jul 31, 2014

great, thanks @jhollinger2

Owner

springmeyer commented Sep 5, 2014

@hollinger I'd love to get #952 done before 3.x release, but don't want to move on that without markers in group support so it does not break the group symbolizer. What's you sense of viability of Markers support in GroupSymbolizer in the next couple weeks? I'm okay not moving on #952 if you need more time - just let me know.

Contributor

hollinger commented Sep 5, 2014

@springmeyer I have looked at this. Although it is more complex to support than point symbolizer was, I think it can be done before the 3.x release. I plan to work on this early next week.

Owner

springmeyer commented Oct 2, 2014

@hollinger - just checking in here. 3.x release is getting close: only about 1-2 weeks worth of tickets left on my end. What are you thinking on this one? Do you have more urgent 3.x needs or is this high on your list?

Contributor

hollinger commented Oct 27, 2014

Apologies for the delay on this. It ended up being a bit more complicated than I first thought, but I have submitted pull request #2549 to add support for markers symbolizer within group symbolizer.

Owner

springmeyer commented Feb 5, 2015

Next step on this is to solve #2511. After that I think it makes sense to try to merge them. And likely along the way we'll find other issues like #2511.

springmeyer removed this from the Mapnik 3.x milestone May 14, 2015

springmeyer added the post3x label May 14, 2015

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