[geotk] Rendering of Glyph/Legend of symbolizers

Alexis Manin alexis.manin at geomatys.com
Thu Nov 2 01:55:51 PDT 2017


Stephan,

I'm sorry, but we will not be able to provide much help in such a short
delay. Here is what I know :

1 - The size you're setting is only a clip for legend. To reach your goal,
you'll have to create a new PointSymbolizer with expected dimension, and
then use it to draw your image.

2 - I was not aware we could apply symbols on polygons. What I would do in
this case is the following : define a point symbolizer along the polygon
one (in the same style rule). In that case, I'm sure the glyph and
rendering will work. However, by default, the point symbolizer will draw a
single mark over the polygon (taking the centroid as location, if I
remember well). If your aim is to draw a symbol on each point of your
polygon, you'll have to modify the "Geometry" property of your point
symbolizer. You can use a function expression named "allPoints" to get
layer geometries as multi-points. See attached SLD for an example.

3 - I tested it on 4.0.0 tag, and it looks like it's working. However, the
rendering is only applied on few pixels, so it can be hard to see on thin
lines.

Good luck for tomorrow !


2017-11-02 0:30 GMT+01:00 Stephane Fellah <stephanef at imagemattersllc.com>:

> Hi,
>
> I have found a number of issues with the DefaultGlyphService and
> DefaultLegendService to render symbolizers.
>
> 1) For PointSymbolizer referring to external image GraphicSymbol, the
> image is clipped whether I set the dimension or not.
>
> final Dimension preferredSize = DefaultGlyphService.glyphPreferredSize(symbolizer, dimension, null);
> // Create glyph image.
> DefaultGlyphService.create(symbolizer, preferredSize, null);
>
> For example for the following icon: http://ows.usersmarts.com/ems/
> icons/tier1/Base/ems.incident.civil.emergency.png
>
> It renders like this picture:
>
> [image: Inline image 1]
>
> How should I configure the DefaultGlyphService and DefaultLegendService to
> render the whole image within the dimension I specify.
>
> 2) The rendering of glyph /legend for PolygonSymbolizer does not render
> marks (such circle. square), but does on the layer.
>
> What the default set up to create a legend the render the symbolizer as
> specified. Is there any work around to solve this problem?
>
> 3) The line symbolizer does not seem to take in account linecap, linejoin
> parameter on the legend/glyph.
>
> I have an internal demo Friday for OGC to demonstrate a semantic portrayal
> service based on Gtk portrayal engine. I would appreciate if you can give
> me some solutions for these issues.
>
> Thanks in advance.
>
> --
> Stephane Fellah
> Chief  Knowledge Scientist
> Image Matters LLC
> Office: +(703) 669 5510 <(703)%20669-5510>
> Cell: 703 431 9420 <(703)%20431-9420>
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geotoolkit
>



-- 
Alexis Manin,
Développeur JAVA/JEE.
Geomatys.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20171102/b65912bd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12919 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20171102/b65912bd/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allPoints.sld
Type: application/octet-stream
Size: 4958 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20171102/b65912bd/attachment-0001.obj>


More information about the Geotoolkit mailing list