Repository navigation
OverlayNG difference operation moves points in outer edge #1222
Description
Activity
Which version of JTS are you using? I'm not seeing this behaviour in the current master.
- this is version 1.20 as used by GeoTools 35.0 Cheers Ian…On Tue, 11 Aug 2026 at 16:03, Martin Davis ***@***.***> wrote: *dr-jts* left a comment (locationtech/jts#1222) <#1222 (comment)> Which version of JTS are you using? I'm not seeing this behaviour in the current master. — Reply to this email directly, view it on GitHub <#1222?email_source=notifications&email_token=AAA55IN4VFPJJIHUN4X5XU35JMYUJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRVGQ4TGNJYGY3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5254935866>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAA55IK4NHYKUU2OOJERHKL5JMYUJAVCNFSNUABEKJSXA33TNF2G64TZHM2TAMZXGAYTSMB3JFZXG5LFHM2TCMRQGQZTSMJYHGQXMAQ> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/AAA55IMO5WD3AGPVX4HJD5D5JMYUJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRVGQ4TGNJYGY3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG> and Android <https://github.com/notifications/mobile/android/AAA55IN5IYIP2NKH6LTC5P35JMYUJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRVGQ4TGNJYGY3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>. Download it today! You are receiving this because you authored the thread.Message ID: ***@***.***>-- Ian Turton
I can't reproduce this in 1.20 either (in the TestBuilder).
Ideally this would have a simple code reproducer. Failing that, can you provide a stack trace and debug output confirming that this is the result coming out of OverlayNG?
Another observation: the points in the result are rounded to one decimal place. This is what is causing the discrepancy from the input geometry. is it possible that the rounding is being done somewhere else in the pipeline you are using?
I'm using a 100 scale PrecisonModel when building the inputs which should give me cm accuracy, I can't see any way to pass my own GeometryFactory down to the GeoTools renderer to make sure it's used in this operation
Stepping through the code the change in point locations occurs in
GeometryOverlayin the JTS code base.isOverLayNGis set totruesoOverlayNGRobust.overlayis used. The two input geometries are:and a negative (-0.5m) buffer of it:
are differenced to give a bordered polygon. which results in:
Some of the points in the outer polygon are moved for no reason.
Reverting to isOverlayNG=false solves this issue.