Issue Type: Bug Bug
Affects Versions: 10.0
Assignee: Andrea Aime
Components: render
Created: 26/Sep/13 4:06 AM
Description:

When vendor option "followLine" is specified for labeling along a line sometimes the labels are not painted because the angle between segments of a line exceed the maximum angle allowed. That's correct but there are times that the obtained angle between segments shouldn't exceed the maximum angle allowed. For instance, suppose that a segment has an angle of -170º and another one an 170º angle with coordinate axis. When doing the difference between the two we get an angle of -340º or 340º when it should be 40º or -40º. The problem is at method "getMaxAngleChange" of class "LineStringCursor". The method "getSegmentAngle" returns an angle between pi and -pi. The code line "double difference = currAngle - prevAngle" can result in an angle between -2pi and 2pi. When "difference" exceeds pi it should be subtracted by 2pi or if it is lower than -pi then it should be summed with 2pi. With that we allways have and angle between -pi and pi and there will be more labels to be painted.

Environment: Geoserver 2.4.0, Windows server 2008
Project: GeoTools
Priority: Major Major
Reporter: Bruno da Fonseca
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to