locationtech / locationtech/jts

Summary: OverlayNG failures

Open
#1,000 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

jts-core-overlay type-bug
Dominant language
Java
Stars
2.2k
Forks
475
Avg merge
14d 10h
Merged PRs (30d)
1

Description

This is a summary issue fo bug reports about OverlayNG failure cases.

The cases always (?) involve nearly-coincident linework (either in a single input or between inputs). The result of overlay operations is obviously incorrect (i.e. it is drastically different from the expected result).

image image

Works with snapping

Options for fixing

An Area-Check heuristic was added in #812, but this does not handle all cases. Any fix should be tested to see if it handles the cases resolved by that fix (https://github.com/Toblerity/Shapely/issues/1216, GEOS-1144.

  • add an Envelope-Check heuristic sanity check (analogous to the heuristic area check). This will not catch all cases, however.
  • use a Area-Only Intersection check, utilizing the IntersectionArea approach. This should be (almost?) fully robust, at the cost of decreased performance
  • Add supplementary vertex location checks for linework with topology determined by geometry edge intersection. This should allow detecting invalid topology graphs.

Fixed

  • #820

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by reviewing the linked failure reports, especially the nearly-coincident linework cases, and compare them with the Area-Check work from #812. No source files or tests are named, so locate the OverlayNG validation and test entry points first. Done means a selected fix handles the reported cases, including the cases previously covered by #812, without introducing incorrect overlay results.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.