Opened 3 years ago

Closed 3 years ago

#5147 closed defect (fixed)

ST_ConcaveHull gives ERROR: lwgeom_concavehull: GEOS Error: IllegalArgumentException: Edge length ratio must be in range [0,1]e

Reported by: robe Owned by: pramsey
Priority: blocker Milestone: PostGIS 3.3.0
Component: postgis Version: master
Keywords: Cc:

Description

— this is with the new GEOS implementation

POSTGIS="3.3.0dev 3.2.0-788-g82538c6ea" [EXTENSION] PGSQL="110" GEOS="3.11.0dev-CAPI-1.16.0" SFCGAL="SFCGAL 1.4.1, CGAL 5.3, BOOST 1.78.0" PROJ="7.2.1" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)"

Example that gives the error:

SELECT ST_ConcaveHull('MULTIPOINT((99.5 68.5),(69 49.5),(106 50.5),(67.5 52),(86.5 58.5),(104 50.5),(70 57),(95 87),(89 114),(103.5 56),(76 61.5),(53.5 59.5),(56 67),(86 123),(89 51.5),(53 60.5),(103.5 59),(58 73.5),(59.5 87),(69.5 57),(91 104.5),(79.5 123),(59 51),(67.5 53),(88 117.5),(79.5 61),(74 124),(98 73.5),(83.5 123.5),(61.5 90.5),(72 124.5),(55.5 71.5),(60 90),(93 49),(99 51),(69 57.5),(90.5 106),(61.5 50),(69 118),(68 52),(65 109),(77.5 99.5),(81.5 77),(81 87.5),(76.5 78),(80 92),(80.5 81),(81 88.5),(75.5 87),(77 100.5))'::geometry, 0.1)

I tried with .1, 0.2, 0.5 also as in the docs and resulted in the same error.

Change History (2)

comment:1 by robe, 3 years ago

For what it's worth, I can generate the same issue with these

DROP TABLE letters;
CREATE TABLE letters(name text PRIMARY KEY, geom geometry);
INSERT INTO letters(name, geom)
SELECT CHR(65 + i) AS name, ST_SnapToGrid(geom,0.5,0.5)
FROM generate_series(0,9) AS i, ST_GeneratePoints(ST_Translate( ST_Buffer(ST_Boundary(ST_Letters(CHR(65 + i))),1),50,50),50,1) AS geom;
SELECT ST_ConcaveHull(geom,0.8)
FROM letters 
WHERE name = 'A'

comment:2 by robe, 3 years ago

Resolution: fixed
Status: newclosed

Fixed at [4a3f8597/git]

Note: See TracTickets for help on using tickets.