Andrea Aime wrote:
> Labeller has landed on 2.5.x and trunk. I've enabled it by default
> on trunk and deprecated the old one.
Thanks Andrea; I am testing it on trunk now.
>> There is one annoying bit of work that I would like to request - even
>> if you can just tell me how to do it. Jesse started to look into this
>> one but got busy. In uDig we have a problem with labels "floating to
>> the top" and appearing over top over other map graphics like
>> scalebars and legends.  I would like a method to to be able to
>> "reserve" an rectangle on the screen and let the labeller know that
>> it is already full up.
> So, about the synchronized wrapper Jesse made, there should be no
> issues, as it's a wrapper an the new label cache just implements
> the same interface as the old one.
>
> As for adding obstacles that labels should not overlap with, I'd
> suggest to add the following method to LabelCache (interface):
> void addObstacle(Geometry g);
> that will add a geometry that labels won't touch. The initial
> implementation can simply extract the bbox and populate the
> LabelIndex with it so that no labels will overlap (the LabelIndex
> is a spatial index of all bounds of the labels drawn so far,
> if you pre-populate with some boxes those won't be overlapped
> by labels).
Cool I had come to a similar conclusion after going over a the old label 
code; I have a copy of the old label code
with all the generic warnings fixed up that I can commit.
> So you just have to add a method to the interface, implement it in 
> LabelCacheImpl and in the synchornized wrapper
I will have a look next break I get. Thanks for committing this work Andrea.

Jody

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to