Ian,

First off, I get the geotools-devel list in digest form, so pardon the
non-threaded reply.


As for the label-placement/graphics automagic:


Dave's label placement code was originally written solely for text.  It
has specific code and a specific datamodel (DTOs and method signatures)
that expected text and only text.  The SLD that activated that code only
accepted the SLD-standard XML for labels, which itself allows only for
text-based labeling.

I modified his label code, and the SLD parser to accept a <Graphic>
element in an appropriate place and to handle it in a somewhat-intuitive
manner.


The only other point-based graphics code that existed was code which
allowed one to use a PointSymbolizer on a Line Geometry, which simply
placed exactly one Graphic at the mid-point of every line segment.  This
is not what the labeler does.


Since I needed the graphic to appear exactly at the same point as the
label to get all the good stuff that labeling gives
(grouping/non-grouping, spaceAround support, offsets, rotation, halos,
etc...what I believe we're referring to as the "automagical" stuff) I
simply extended the labeler to take a <Graphic> tag and to render it
underneath the label.  I changed the DTO's and the method signatures to
handle an extra graphic as well as text, rather than only text.


Does this clear up what the patch does and why it was motivated?  Let me
know if that's unclear!

--saul


> Um Ian, I doubt Dave's label placement code is error. My understanding
> is that Label Placement is a bit of a "magic occurs here" issue, and
> fleshing out the boundary allowing SLD authors to interact with a
> placement algorithm is probably a good thing.


I didn't say Dave's label placing code was in error. I think the need
for
this patch occurs because the label placement code will move text
symbolizers automagically but not the associated graphic. May be Saul
could
confirm my understanding is correct?

Ian



--

Ian Turton
http://www.geotools.org



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to