[Geoserver-devel] Programmable control of labels

Hello, I wrote about GML and labels previously . Is there anyway through which I can control the placement of labels. Which algorithm is being used to place labels now? I want to write a plugin in Geoserver for optimum labeling. Could somebody please help me.
Thanks in advance.


View this message in context: Programmable control of labels
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

rchhe ha scritto:

Hello, I wrote about GML and labels previously <http://www.nabble.com/Re%3A-Labeling-in-Geoserver-td22829430.html&gt;\. Is there anyway through which I can control the placement of labels. Which algorithm is being used to place labels now? I want to write a plugin in Geoserver for optimum labeling. Could somebody please help me.

The code for labelling in not in GeoServer, it's in GeoTools, in the
renderer module. Luckly labelling has an extension point, if you
don't like the default placement you can write your own.

Look for the org.geotools.renderer.lite.LabelCache interface and
the org.geotools.renderer.lite.LabelCacheDefault implementation

Out of curiousity, what kind of label placement algorithms are
you planning to implement?

Cheers
Andrea

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

Thanks. I read the java doc of LabelCache. I glanced at the code too. The
labeling that I want to do is for an university project based on an
algorithm by Zhang and Harrie(2004). Could you please elaborate on the
extension point.
Robin

Andrea Aime-4 wrote:

rchhe ha scritto:

Hello, I wrote about GML and labels previously
<http://www.nabble.com/Re%3A-Labeling-in-Geoserver-td22829430.html&gt;\. Is
there anyway through which I can control the placement of labels. Which
algorithm is being used to place labels now? I want to write a plugin in
Geoserver for optimum labeling. Could somebody please help me.

The code for labelling in not in GeoServer, it's in GeoTools, in the
renderer module. Luckly labelling has an extension point, if you
don't like the default placement you can write your own.

Look for the org.geotools.renderer.lite.LabelCache interface and
the org.geotools.renderer.lite.LabelCacheDefault implementation

Out of curiousity, what kind of label placement algorithms are
you planning to implement?

Cheers
Andrea

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

------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
View this message in context: http://www.nabble.com/Programmable-control-of-labels-tp22840334p22877729.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

rchhe ha scritto:

Thanks. I read the java doc of LabelCache. I glanced at the code too. The
labeling that I want to do is for an university project based on an
algorithm by Zhang and Harrie(2004). Could you please elaborate on the
extension point.

Nope. Let's play it the other way. You read the docs and the code
and if you have questions I'll be glad to answer them.

Cheers
Andrea

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