I was trying to use the SimplePolygon2D getBuffer() method. Unfortunately almost all my polygons end up with a DegeneratedLine2DException.
You can see some of my cases in this link: http://pastie.org/4008763
I've tried simplifying my polygons before calling getBuffer and the problem almost dissapears. However that output is not what I need.
Thanks a lot,
Already answered http://sourceforge.net/projects/geom-java/forums/forum/618722/topic/4633860
Well, not entirely solved :-(
Even if I force the vertices list not to repeat the begin + end vertex (that would create a zero-length vector) I still get DegeneratedLine2DException for negative offsets on most of my polygons getBuffer calls (link to sample data above).
I have double checked all of them have a .getArea() so I assume the vertices order is correct too.
For the same dataset, positive values in polygon getBuffer() method cause no Exception but only one element is obtained on the getContinuesCurves() medthod of the resultant boundary2D.
I also got problems with the data set you linked. The buffering algorithm is not yet fully robust (I'm working on it !), so problems can still happen.
Also, be aware that getArea() method always return positive result. The method getAreaSigned() returns value whose sign depends on polygon orientation. However, this is likely to change in a future release (i.e., area will return a signed result).
I will investigate the problem with your data,
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.