bilaldursun1 / nettopologysuite

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

Error in difference between two polygons #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
var precisionModel = new GeometryFactory(new PrecisionModel(100));
var reader = new WKTReader(precisionModel);
var p1 = reader.Read(@"POLYGON ((504927.9 6228865.64, 504969.88 6228833.89, 
504980.82 6228861.76, 504927.9 6228865.64))");
var p2 = reader.Read(@"POLYGON ((504927.9 6228865.64, 504951.14 6228848.06, 
504957.42 6228863.47, 504927.9 6228865.64))");

var test = p1.Difference(p2);

What is the expected output? What do you see instead?
The two polygons share a vertex (504927.9 6228865.64) at the left tip of the 
triangle, and when creating the difference this point does not get removed, 
leaving a strange "tail" on the resulting polygon. Expected to get only the 
blue(ish) colored polygon as a result
See the image atached.

What version of the product are you using? On what operating system?
It seems to be the same problem with verison 13.1 and 13.2
Its tested on Windows 7 x64 and .NET framework 4.5.1

Please provide any additional information below.

Original issue reported on code.google.com by svalent...@gmail.com on 20 Oct 2014 at 11:23

Attachments:

GoogleCodeExporter commented 9 years ago
copied here: https://github.com/NetTopologySuite/NetTopologySuite/issues/12

Original comment by diegogu...@gmail.com on 20 Oct 2014 at 12:44