DegeneratedLine2DException

Help
Anonymous
2012-06-01
2012-12-12
  • Anonymous - 2012-06-01

    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,

    misan

     
  • Anonymous - 2012-06-04

    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.

     
  • David

    David - 2012-06-17

    Hi Misan,

    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,

    regards

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks