Hi Victor,
as an alternative to what Andrea has suggested you might try to prepare
a custom image for the graphic symbol, which is appropriately offset and
has transparent background. Then use the displacement only to displace
the label.
However, I'm not sure if GeoServer is clever enough to figure out that
transparent parts of the images are actually not overlapping, you'll
have to try it.
Peter
On 26. 7. 2016 8:41, Victor.Sinceac wrote:
Hi Peter,
Nope, separating Graphic and Label elements in 2 different rules would
of course handle well the relative displacement but wouldn’t manage
the labels overlapping.
The labels overlapping is the main reason of using both Graphic and
Label in the same rule: it ensures that each Label is drawn over a
Marker, then also avoids the overlapping of different pairs Marker+Label.
My particular requirement is to have:
- a pair Marker+Label for each point
- pairs Marker+Label shall not overlap when zooming the map
- the Marker is centered on the point geom (X,Y)
- the Label is centered on the point geom (X+DELTAX,Y)
Something similar with the well-known case of roads shields (the road
number in the middle of a road marker) but where the road number is
not centered on the marker but it is written on the right side of the
marker.
Did someone already find a solution to this?
Thanks,
Victor
> Date: Mon, 25 Jul 2016 12:51:25 +0200
> From: Peter Kovac <peter.ko...@microstep-mis.com
<mailto:peter.ko...@microstep-mis.com>>
> Subject: Re: [Geoserver-users] SLD: Is it possible to get relative
displacement between <Label> and <Graphic> in <TextSymbolyzer>?
> To: geoserver-users@lists.sourceforge.net
<mailto:geoserver-users@lists.sourceforge.net>
> Message-ID: <90e7c4a5-488f-462b-4fa8-6bab429c7...@microstep-mis.com
<mailto:90e7c4a5-488f-462b-4fa8-6bab429c7...@microstep-mis.com>>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> Hi Victor,
> just split it into 2 rules: one for the graphic and one for the text
label.
> Then you can use different displacement in each of them.
> Cheers,
> Peter
> On 25. 7. 2016 12:00, Victor.Sinceac wrote:
> > Hi All,
> >
> > In a SLD rule, I need to use a <TextSymbolizer> with both <Label> and
> <Graphic> elements (something similar to Highways Shields use case):
> > <Rule>
> > <TextSymbolizer>
> > <Label> ... </Label>
> > <Fill> ... </Fill>
> > <Halo> ... </Halo>
> >
<Graphic><Mark><WellKnownName>...</WellKnownName><Fill>...</Fill></Mark><Size>...</Size></Graphic>
> > </TextSymbolizer>
> > </Rule>
> > This works well when the requirement is to get the same position
X,Y for
> > both Graphic and Label elements.
> > If I had well understood, the <LabelPlacement> element in such a rule
> > would apply to both elements Label and Graphic.
> > Is it possible to define in such a rule a displacement which would
only apply
> > to the element Label?
> > Thanks,
> > Victor
------------------------------------------------------------------------
This message is subject to and does not create or vary any contractual
relationship between Campbell Scientific Limited, its subsidiaries or
affiliates ("CSL") and you. Internet communications are not secure and
therefore CSL does not accept legal responsibility for the contents of
this message. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone +44 (0)1509 601141 or email
postmas...@campbellsci.co.uk. Thank you.
Campbell Scientific Ltd.
Company Registration Number: 1933935 (England and Wales) Registered
Address: Campbell Park, 80 Hathern Road, Shepshed, Loughborough,
Leicestershire LE12 9GX, UK
Tel: +44 (0) 1509 601141
Fax: +44 (0) 1509 601091
Web: www.campbellsci.co.uk
------------------------------------------------------------------------
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Peter Kovac
IMS Programmer
MicroStep-MIS
peter.ko...@microstep-mis.com
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users