bilaldursun1 / nettopologysuite

Automatically exported from code.google.com/p/nettopologysuite
0 stars 0 forks source link

OutOfRangeException in Simple CoordinateSequence when computing a buffer #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

Depending on the input LineString geometry, an OutOfRangeException is
sometimes raised at Simple.CoordinateSequence.cs:line 550 when computing a
buffer.

Dev. Environment: NTS v2.11 rev. 504 on VS2008 + Win7 x64

Please find a reproducer in attachment.
Best rgds,
Michel.

Original issue reported on code.google.com by michel.f...@gmail.com on 14 Apr 2010 at 3:34

Attachments:

GoogleCodeExporter commented 9 years ago
Should be fixed as of rev. 506

Original comment by felix.ob...@netcologne.de on 14 Apr 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Hi Felix,

I tested with rev 506 and have some feedback:
- OffsetCurveBuilder_110 does not compile. Unless there is some
  other mismatch in the code that has been committed in SVN, you will need to 
  replace_vertexList.Coordinates by _vertexList.GetCoordinates()
- Although the fix works for the LineString that I originally posted in the
reproducer, the same problem still occurs with some other LineStrings (see 
examples
below). Note that I checked that the Buffer operation works correctly on those
examples in JTS 1.11/TestBuilder.

Hth,
Michel.

Examples of geometries that still fail:
LINESTRING (3155 91, 2975 -3041, 979 -2893, -1497 -4490, -2664 -2422, -1486 
-490,
-4033 1558, -2373 3682, 368 3548, 3155 91)
LINESTRING (3282 89, 3062 -2335, -104 -1722, -3146 -2745, -2676 990, -1014 
1831, -508
4821, 664 987, 3282 89)
LINESTRING (6757 5207, 6602 3743, 3575 4282, 3294 4897, 3623 6276, 4925 7132, 
5947
6943, 6757 5207)

Original comment by michel.f...@gmail.com on 15 Apr 2010 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
Rev 507 fixes Coordinates issue and works with provided examples.

Original comment by felix.ob...@netcologne.de on 15 Apr 2010 at 1:35

GoogleCodeExporter commented 9 years ago
Thx a lot. Works well in my app too.

Original comment by michel.f...@gmail.com on 15 Apr 2010 at 3:10