locationtech / locationtech/jts

`ConcaveHullOfPolygons` can produce disconnected result

Open
#948 0 comments 0 reactions 1 assignee View on GitHub

@dr-jts is already working on this.

Since Jan 6, 2023.

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

Description

ConcaveHullOfPolygons can produce a disconnected MultiPolygon output in some situations. This is contrary to the stated contract for this class.

This is due to a design limitation in the current code. It can be fixed by ensuring that triangle removal does not disconnect the triangulation.

Notes

  • It might be nice to provide an option to allow disconnected output, if this is desired (also for ConcaveHull for points).

Example

MULTIPOLYGON (((10 20, 20 20, 20 10, 10 10, 10 20)), ((20 30, 30 30, 30 20, 20 20, 20 30)), ((80 90, 90 90, 90 80, 80 80, 80 90)))

Result for Length Ratio = 0.1

MULTIPOLYGON (((20 30, 30 30, 30 20, 20 10, 10 10, 10 20, 20 30)), ((90 90, 90 80, 80 80, 80 90, 90 90)))

image

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.