[postgis-tickets] [PostGIS] #4541: ST_ConcaveHull returns a "geometrycollection" type instead of the expected "polygon"
PostGIS
trac at osgeo.org
Sun Jun 26 14:00:36 PDT 2022
#4541: ST_ConcaveHull returns a "geometrycollection" type instead of the expected
"polygon"
----------------------+---------------------------
Reporter: v89461 | Owner: robe
Type: defect | Status: reopened
Priority: high | Milestone: PostGIS 2.5.5
Component: postgis | Version: 2.5.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by robe):
Replying to [comment:10 kszafran]:
> I have encountered the same problem in PostGIS 3.1.5. Here is a
reproducer:
> {{{
> select
st_asgeojson(st_concavehull('0107000020E61000006200000001010000007BA4C16D6D1159C0BE1B0B0A837230C00101000000185E49F25C1159C04643C6A3547230C0010100000089B663EAAE1059C07E552E54FE7130C0010100000060200890A11059C0C214E5D2F87130C00101000000E9B81AD9951059C00C91D3D7F37130C00101000000E9818FC18A1059C0E4654D2CF07130C0010100000037C2A2224E1059C0862348A5D87130C00101000000DCBA9BA73A1059C0C619C39CA07130C0010100000019213CDA381059C0301004C8D07130C00101000000C7F7C5A52A1059C06E1283C0CA7130C001010000005C3E92921E1059C0DC645419C67130C0010100000080113466121059C06E8D08C6C17130C00101000000CBD8D0CDFE0F59C07882FDD7B97130C00101000000D3FA5B02F00F59C0DEFE5C34647430C00101000000E9818FC18A0F59C0200BD121707430C001010000008CA19C68570F59C0DAE55B1FD66F30C00101000000709A3E3BE00E59C0E0455F419A7930C00101000000E55FCB2BD70E59C0DC8827BB997930C00101000000882EA86F990E59C0E8D7D64FFF7130C001010000007C4963B48E0E59C0DA1B7C61327930C0010100000047AE9B525E0E59C006F52D73BA7030C00101000000E606431D560E59C0A610C8258E7830C001010000001C62BCE6550E59C0A20F96B1A17330C0010100000094C3279D480E59C0FE2D01F8A77830C00101000000C74ACCB3920C59C0BAC0E5B1667430C0010100000074B9C150870C59C094FDF334607430C001010000001CEDB8E1770C59C08C53AD85597430C00101000000596ABDDF680C59C04677103B537430C001010000003B00E2AE5E0C59C044317903CC8430C00101000000EA279CDD5A0C59C0C6681D554D7430C0010100000085798F334D0C59C01C5F7B66497430C00101000000132D793C2D0C59C0D4D51D8B6D8230C00101000000FFB4519D0E0C59C0349BC761308330C0010100000080D767CEFA0B59C064045438827C30C00101000000FDF84B8BFA0B59C06E5512D9077D30C00101000000B075A911FA0B59C0E82CB308C57E30C0010100000040FCFCF7E00B59C066A71FD4457E30C001010000006DAD2F12DA0B59C06825ADF8867A30C001010000009CE09BA6CF0B59C0145CACA8C17030C001010000003DD52137C30B59C0BA63B14D2A7A30C00101000000E70297C79A0B59C008707A17EF7330C0010100000051340F60910B59C0700514EAE97330C001010000000BB952CF820B59C0BA13ECBFCE7530C00101000000ACCABE2B820B59C09259BDC3ED7030C00101000000F96706F1810B59C072395E81E87530C00101000000C9E7154F3D0B59C0107BA180ED7030C001010000007CF31B261A0B59C0087C7E18217030C00101000000EEB43522180B59C08A1F63EE5A7630C00101000000B05758703F0959C09CAA7B64736D30C0010100000074D4D171350959C0C43E0114236F30C0010200000002000000B4739A05DA0B59C0A4570394867A30C07EE4D6A4DB0B59C0F6B704E09F7A30C0010200000002000000195A9D9CA11059C0C214E5D2F87130C0A2F2AFE5951059C04E8061F9F37130C0010200000002000000BBB88D06F00F59C0DEFE5C34647430C068925852EE0F59C0A84F72874D7430C0010200000002000000412E71E4810B59C0360708E6E87530C06AC18BBE820B59C03EF20703CF7530C001020000000200000048E2E5E95C1159C0E63A8DB4547230C0679AB0FD641159C0B267CF656A7230C001020000000200000060B01BB62D0C59C01406651A4D8230C0CB660E492D0C59C0D4D51D8B6D8230C0010200000002000000C0AF9124080C59C0444DF4F9287F30C0B54FC763060C59C01E166A4DF37E30C00102000000020000000BB952CF820B59C07EE19524CF7530C004C8D0B1830B59C0B6847CD0B37530C001020000000200000044FAEDEBC00B59C00ED594641D7A30C02593533BC30B59C0988DCEF9297A30C001020000000200000027A60BB1FA0B59C05E88D51F617C30C0981936CAFA0B59C028D2FD9C827C30C0010200000002000000392BA226FA0B59C07A71E2AB1D7D30C044BFB67EFA0B59C02C6684B7077D30C001020000000200000020D4450A651159C0127008556A7230C07BA4C16D6D1159C0A002603C837230C0010200000002000000F8359204E10B59C0488E7406467E30C0F08B4B55DA0B59C0DE736039427E30C0010200000002000000ADDC0BCC0A0C59C0541C075E2D8330C0467BBC900E0C59C0768A5583308330C0010200000002000000B9FDF2C98A1059C0446E861BF07130C0E8305F5E801059C09A64E42CEC7130C001020000000200000005F9D9C8750B59C036785F950B7130C0C40C8D27820B59C01638D906EE7030C00102000000020000000E1137A7920C59C03C9F01F5667430C0D4635B069C0C59C048197101687430C0010200000002000000D15AD1E6381059C090183DB7D07130C0C120E9D32A1059C0100A4AD1CA7130C0010200000002000000596ABDDF680C59C0E86ED74B537430C0AB798EC8770C59C08C53AD85597430C0010200000002000000D15AD1E6381059C090183DB7D07130C0F0FB372F4E1059C04434BA83D87130C0010200000002000000B9FDF2C98A1059C0446E861BF07130C0A2F2AFE5951059C04E8061F9F37130C0010200000002000000139F3BC1FE0F59C07882FDD7B97130C068CF656A121059C0CC9541B5C17130C001020000000200000033DE567A6D1159C0A002603C837230C088D7F50B761159C06E8445459C7230C0010200000002000000EDBC8DCD8E0B59C0302AA913D07030C0F86D88F19A0B59C0F88DAF3DB37030C0010200000002000000E6E786A6EC0E59C05CFFAECF9C7930C02504ABEAE50E59C06AE1B20A9B7930C001020000000200000021E9D32AFA0B59C0183C4CFBE67E30C0B075A911FA0B59C04EF2237EC57E30C00102000000020000008599B67F650B59C000219221C77230C00CE71A66680B59C0B26CE690D47230C00102000000020000003BAA9A20EA0D59C09206B7B5857330C0925CFE43FA0D59C0E6948098847330C0010200000002000000AD36FFAF3A1059C0C619C39CA07130C0E14389963C1059C07E91D096737130C00102000000020000000E1137A7920C59C03C9F01F5667430C0EB03C93B870C59C0F2052D24607430C001020000000200000041683D7C990E59C066F9BA0CFF7130C0D9EC48F59D0E59C01C261AA4E07130C00102000000020000002CB81FF0C00B59C0548CF337A17030C0B2497EC4AF0B59C0E2C798BB967030C0010200000002000000252367614F0B59C0CCD1E3F7367130C0543C2EAA450B59C0464772F90F7130C001020000000200000087FA5DD89A0B59C0AA674128EF7330C039F24064910B59C0D00D4DD9E97330C00102000000020000004B2025766D0E59C09A0AF148BC7030C047AE9B525E0E59C066FD6662BA7030C0010200000002000000C6DE8B2FDA0E59C012DA722EC57930C0B6DB2E34D70E59C01C78B5DC997930C0010200000002000000DE21C500890B59C0207D93A6417530C097A949F0860B59C0329067976F7530C0010200000002000000B1C56E9F551159C0BC0512143F7230C01FA4A7C8211159C0FC523F6F2A7230C00102000000020000002CB81FF0C00B59C0548CF337A17030C0FBE8D495CF0B59C0F64201DBC17030C0010200000002000000640795B88E0E59C0DA1B7C61327930C0EFACDD76A10E59C02EAA4544317930C001020000000200000080113466121059C0CC9541B5C17130C05C3E92921E1059C09A75C6F7C57130C0010200000002000000494A7A185A0F59C0EC8497E0D46F30C045DB3175570F59C0DAE55B1FD66F30C001020000000200000033C34659BF0859C0A6BF97C2836E30C03F541A31B30859C0144031B2646E30C00102000000020000007F315BB22A1059C050F9D7F2CA7130C05C3E92921E1059C09A75C6F7C57130C00102000000020000005663096B630E59C072C971A7747830C0B682A625560E59C0041901158E7830C0010200000002000000EDBC8DCD8E0B59C0302AA913D07030C0C40C8D27820B59C01638D906EE7030C0010200000002000000FCC3961E4D0C59C09A805F23497430C0016A6AD95A0C59C086798F334D7430C00102000000020000005663096B630E59C072C971A7747830C02A1DACFF730E59C06A4DF38E537830C0',
0.99));
> }}}
>
> If I use target_percent=0.98, I get a Polygon, as expected. The input is
a collection of points and line segments.
Okay looking at the code, from 3.1 - 3.3 this is still set to 0.98 so is
not handling the 0.99 case. So I guess I somehow missed backporting
these.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4541#comment:16>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list