Hi Roar,

If I use Centroid then goodnessOfFit is not working and labels are displaying 
even if they are not fit in polygon geometry.

Aastha 

-----Original Message-----
From: "Roar Brænden" <[email protected]>
Sent: ‎11-‎09-‎2015 02:23
To: "Andrea Aime" <[email protected]>
Cc: "Aastha Aggarwal" <[email protected]>; 
"[email protected]" 
<[email protected]>; "Rahkonen Jukka (MML)" 
<[email protected]>
Subject: Re: [Geoserver-users] Label fit to polygon



Den torsdag 10. september 2015 skrev Andrea Aime <[email protected]> 
følgende:

On Thu, Sep 10, 2015 at 3:38 PM, Aastha Aggarwal <[email protected]> wrote:

We are using OpenLayers.
No I can't use my application in single tile mode.

Is this some type of restriction that centroid and goodnessOfFit can't be used 
together?


It has been already explained, When you extract the centroid the labelling 
system is labeling
a point, not a polygon anymore, so the goodness of fit cannot be applied, the 
polygon is gone
(it really does not get into the labelling subsystem anymore, only the centroid 
does).


If you want to modify the code to suit your needs I can show you the classes 
involved.
For generalities sake, I'd add a new vendor option "goodnessOfFitReference"
where you can specify the field that needs to be used for label fitting, if you 
implement
it there is a good chance a pull request from yours with such change would be 
accepted
in the code base.




You could also have an option to label polygons only when the centroid is 
present I think. In that way you could avoid the confusion about repetitive 
labels in tiles mode.


Best regards 


Roar Brenden
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to