I'm reposting my question below which I initial posted to the NTS group.
Since QGis is experiencing the same issue Diego (NTS) suggested posting it
to the JTS group.

The main question is if this is a bug in JTS or not.
The L-shaped polygon was created using a single-sided buffer of a
linestring made of coordinates from the larger polygon.
In this case I can also use a 'normal' buffer. When I do so the difference
is correct.

Thanks,

Paul

---------- Forwarded message ----------
I have two polygons which I want to subtract from each other.
The field polygon it the larger polygon and overlaps the smaller polygon.

When I perform the Difference action the remaining part has one additional
point on the smaller point which is not expected.

This is the WKT:
POLYGON ((194908.68715217288 586962.86751464731, 194881.30215215127
586952.0195146437, 194879.05315214754 586952.15151464322,
194877.20115214764 586954.13551464747, 194831.95715210476
587019.88551468146, 194760.91615204382 587122.9405147346,
194857.09315212426 587178.23851475632, 194858.9451521278
587178.63551475492, 194860.26815212792 587177.44451475318,
194873.10015214139 587158.65951475059, 194925.75215218749 587081.797514704,
194953.13715220965 587042.10951468861, 194962.79415221984
587027.42551468522, 194985.68115224215 586994.0885146677,
194986.21015224193 586991.70651466073, 194985.54815224075
586989.32551465672, 194908.68715217288 586962.86751464731))

and

POLYGON ((194886.66904433916 586975.65752607386, 194901.74579137619
586981.629866985, 194928.53316474415 586990.85093296878, 194935.04290785809
586971.94000373222, 194908.68715217288 586962.86751464731,
194881.30215215127 586952.0195146437, 194879.05315214754
586952.15151464322, 194877.20115214764 586954.13551464747,
194831.95715210476 587019.88551468146, 194821.8332618672
587034.57164674706, 194838.29986314307 587045.92290405277,
194848.42375338063 587031.23677198717, 194886.66904433916
586975.65752607386))

Both geometries are in EPSG:28992 (RD_new/Amersfoort, The Netherlands).

I hope you can see the screen shot:
[image: Inline afbeelding 1]

The blue L-shaped polygon is the small polygon. The grey-brown polygon is
the result of the Difference action. As you can see the 12th point is
unexpected. The border should go from 11 to 13 and so on. Now it passed
point 13 and created point 12 and then goes back to point 13.

My C# command: field.Difference(small);
I use NTS v1.13.1

I already normalized the input polygons and even tried the Geometry
snapper, but I can't get this fixed.

Any help is much appreciated.


Paul Meems
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to