Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_ConcaveHull returns polygon with holes despite allow_holes set to false #1214

Closed
nbvfgh opened this issue Dec 24, 2024 · 1 comment
Closed

Comments

@nbvfgh
Copy link

nbvfgh commented Dec 24, 2024

Considering following query:

WITH data AS(
	SELECT ST_GeomFromText('POLYGON ((0 0, 1 0, 2 1, 1 1, 0 0),(0.2 0.1, 0.5 0.4, 0.5 0.3,0.2 0.1))'
	) geom
)
SELECT ST_AsText(ST_ConcaveHull(geom, 0.3, false))
	   from data;

-- expected:{ POLYGON((0 0,1 0,2 1,1 1,0 0))}
-- acutal:  { POLYGON((0 0,1 0,2 1,1 1,0 0),(0.2 0.1,0.5 0.4,0.5 0.3,0.2 0.1)) }

We calculate the concave hull of a Polygon With hole,and set param_allow_holes = false.
But the result still contains a hole when the optional param_allow_holes argument is specified as false, which seems to be unexpected.

The original input and result are shown in the following figure:
图片

@dr-jts
Copy link
Contributor

dr-jts commented Jan 2, 2025

The concave hull is formed using the outer shells of the input polygons. The "allow holes" parameter controls whether holes are allowed to be formed in the additional area created for the concave hull. Holes already present in the input are preserved.

@dr-jts dr-jts closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants