Skip to content

OverlayNG difference operation moves points in outer edge #1222

Description

@ianturton

Stepping through the code the change in point locations occurs in GeometryOverlay in the JTS code base. isOverLayNG is set to true so OverlayNGRobust.overlay is used. The two input geometries are:

POLYGON ((412023.08 92158.29, 412021.68 92161.6, 412022.58 92161.96, 412021.45 
92164.58, 412022.19 92165.38, 412021.43 92167.13, 412018.32 92165.86, 412016.28 
92165.03, 412019.75 92156.92, 412023.08 92158.29))

and a negative (-0.5m) buffer of it:

POLYGON ((412022.4 92158.6, 412020 92157.6, 412016.9 92164.8, 412021.2 92166.5, 
412021.6 92165.5, 412021.1 92164.9, 412021 92164.8, 412021 92164.7, 412021 
92164.6, 412021 92164.5, 412021 92164.4, 412021.9 92162.2, 412021.5 92162.1, 
412021.4 92162, 412021.3 92162, 412021.3 92161.9, 412021.2 92161.8, 412021.2 
92161.7, 412021.2 92161.6, 412021.2 92161.5, 412021.2 92161.4, 412022.4 
92158.6))

are differenced to give a bordered polygon. which results in:

POLYGON ((412019.8 92156.9, 412016.3 92165, 412018.3 92165.9, 412021.4 92167.1, 
412022.2 92165.4, 412021.5 92164.6, 412022.6 92162, 412021.7 92161.6, 412023.1 
92158.3, 412019.8 92156.9), (412021.2 92161.4, 412021.2 92161.5, 412021.2 
92161.6, 412021.2 92161.7, 412021.2 92161.8, 412021.3 92161.9, 412021.3 92162, 
412021.4 92162, 412021.5 92162.1, 412021.9 92162.2, 412021 92164.4, 412021 
92164.5, 412021 92164.6, 412021 92164.7, 412021 92164.8, 412021.1 92164.9, 
412021.6 92165.5, 412021.2 92166.5, 412016.9 92164.8, 412020 92157.6, 412022.4 
92158.6, 412021.2 92161.4))

Some of the points in the outer polygon are moved for no reason.

Image

Reverting to isOverlayNG=false solves this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions