Jody Garnett ha scritto:
> Hi Andrea -
> 
> I am looking forward to this one (and we can make it the default in
> uDig trunk so it gets some eyeball time in front of developers - we
> actually have a code sprint coming up and are releasing an alpha to
> generate bugs reports leading up to it).

> I am getting a bit tired of active words in package names "renderer"
> and "labeler" ... making a "renderer.labler" hyper active? so for
> package org.geotools.renderer.label would be fine. LabelCacheImpl
> would copy what the other implementations are doing; but you are
> correct these classes are not really going to be public facing (so
> remove the prefix).

Labeller has landed on 2.5.x and trunk. I've enabled it by default
on trunk and deprecated the old one.

> 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).

So you just have to add a method to the interface, implement
it in LabelCacheImpl and in the synchornized wrapper

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

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

Reply via email to