<div dir="ltr"><div>> <span style="font-family:Helvetica,Tahoma,Arial;color:rgb(0,0,0);font-size:14px">Any comment is welcomed.</span></div><div style="color:rgb(0,0,0);font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;margin:0px;padding:0px;border:0px;outline:0px;clear:both"></div><br class="gmail-Apple-interchange-newline"><div>Hi <span style="color:rgb(0,0,0);font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px">Zhen,</span><br></div><div><font color="#000000" face="Tahoma, Arial, STHeiti, SimSun"><span style="font-size:14px"><br></span></font>I've recently tested your example with the "postgis/postgis:15-master" Docker image</div><div><i>[GEOS version: 3.13.0dev-CAPI-1.18.0 + PostGIS version: 3.5.0dev 3.4.0rc1-21-g7faeed1d4], </i></div><div>and it appears that it crashes as well [1].</div><div><br></div><div>However, I found that the CGAL-based alternative ST_AlphaShape is working without issues. [1]+[2] </div><div><br></div><div><font face="monospace">postgres=# select ST_AlphaShape('MULTIPOINT ((113.56577197798602 22.80081530883069),(113.565723279387 22.800815316487014),(113.56571548761124 22.80081531771092),(113.56571548780202 22.800815317674463),(113.56577197817877 22.8008153088047),(113.56577197798602 22.80081530883069))'::geometry, 0.75 );</font></div><div><font face="monospace"><br> st_alphashape <br>---------------------------------------------------<br> 010300000001000000070000006288BBAE34645C404AB48F3B02CD364065E369CF34645C4097728A3B02CD36405D9CAB9B35645C405F90693B02CD364059D1AB9B35645C40CC73693B02CD364065E369CF34645C4097728A3B02CD3640D3B<br>CBBAE34645C40348C8F3B02CD36406288BBAE34645C404AB48F3B02CD3640</font><div><font face="monospace">(1 row)</font><br></div><div><br></div><div><br></div><div>[1]<br>tested with "postgis/postgis:15-master" <a href="https://github.com/postgis/docker-postgis">https://github.com/postgis/docker-postgis</a><div><font face="monospace"> POSTGIS="3.5.0dev 3.4.0rc1-21-g7faeed1d4" [EXTENSION] PGSQL="150"</font></div><div><font face="monospace"> <b><font color="#0000ff">GEOS="3.13.0dev-CAPI-1.18.0" SFCGAL="SFCGAL 1.5.0, CGAL 5.6.1,</font></b> BOOST 1.74.0" PROJ="9.3.0 NETWORK_ENABLED=OFF</font></div><div><font face="monospace"> URL_ENDPOINT=<a href="https://cdn.proj.org">https://cdn.proj.org</a> USER_WRITABLE_DIRECTORY=/var/lib/postgresql/.local/share/proj </font></div><div><font face="monospace"> DATABASE_PATH=/usr/local/share/proj/proj.db" LIBXML="2.9.10" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0<br> (Internal)" TOPOLOGY</font><br><br></div><div>[2] <a href="https://postgis.net/docs/en/ST_AlphaShape.html">https://postgis.net/docs/en/ST_AlphaShape.html</a></div><div><i>This function effectively computes a concave hull of a geometry in a similar way to ST_ConcaveHull, but uses CGAL and a different algorithm.<br></i></div><div><i>Availability: 3.3.0 - requires SFCGAL >= 1.4.1. ; This method needs SFCGAL backend.</i><br></div><div><br></div><div>Regards,</div><div> Imre</div><div><br></div><div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">耳辰 <<a href="mailto:erchen.cz@alibaba-inc.com">erchen.cz@alibaba-inc.com</a>> ezt írta (időpont: 2023. aug. 18., P, 15:05):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="line-height:1.7;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)"><div style="clear:both"><br></div><div style="line-height:1.7;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)"><div style="clear:both"><div style="margin:0px;padding:0px;border:0px;outline:0px;color:rgb(0,0,0);font-family:Helvetica,Tahoma,Arial;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both">Hi guys,<br></div><div style="margin:0px;padding:0px;border:0px;outline:0px;color:rgb(0,0,0);font-family:Helvetica,Tahoma,Arial;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><br></div><div style="margin:0px;padding:0px;border:0px;outline:0px;color:rgb(0,0,0);font-family:Helvetica,Tahoma,Arial;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both">I met a postgis crash when tried to use ST_ConvaveHull function with a multipoint, in postgis 3.3.2 and Geos 3.11.2 :</div><div style="margin:0px;padding:0px;border:0px;outline:0px;color:rgb(0,0,0);font-family:Helvetica,Tahoma,Arial;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><br></div><div style="margin:0px;padding:0px;border:0px;outline:0px;color:rgb(0,0,0);font-family:Helvetica,Tahoma,Arial;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span>select ST_ConcaveHull('MULTIPOINT ((113.56577197798602 22.80081530883069),(113.565723279387 22.800815316487014),(113.56571548761124 22.80081531771092),(113.56571548780202 22.800815317674463),(113.56577197817877 22.8008153088047),(113.56577197798602 22.80081530883069))', 0.75);</span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;color:rgb(0,0,0);font-family:Helvetica,Tahoma,Arial;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span><br></span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial">The crash stack are listed:</span><br></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial">#0 0x0000ffff84e02210 in geos::triangulate::tri::Tri::getIndex(geos::triangulate::tri::Tri const*) const () from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos.so.3.11.2" target="_blank">erchen.cz/pgsql15/lib/libgeos.so.3.11.2</a></span><div style="clear:both">#1 0x0000ffff84ce74c0 in geos::algorithm::hull::HullTriangulation::nextBorderTri(geos::algorithm::hull::HullTri*) ()</div><div style="clear:both"> from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos.so.3.11.2" target="_blank">erchen.cz/pgsql15/lib/libgeos.so.3.11.2</a></div><div style="clear:both">#2 0x0000ffff84ce7698 in geos::algorithm::hull::HullTriangulation::traceBoundary(geos::triangulate::tri::TriList<geos::algorithm::hull::HullTri>&) ()</div><div style="clear:both"> from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos.so.3.11.2" target="_blank">erchen.cz/pgsql15/lib/libgeos.so.3.11.2</a></div><div style="clear:both">#3 0x0000ffff84ce79d4 in geos::algorithm::hull::HullTriangulation::traceBoundaryPolygon(geos::triangulate::tri::TriList<geos::algorithm::hull::HullTri>&, geos::geom::GeometryFactory const*) ()</div><div style="clear:both"> from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos.so.3.11.2" target="_blank">erchen.cz/pgsql15/lib/libgeos.so.3.11.2</a></div><div style="clear:both">#4 0x0000ffff84ce1f28 in geos::algorithm::hull::ConcaveHull::toGeometry(geos::triangulate::tri::TriList<geos::algorithm::hull::HullTri>&, geos::geom::GeometryFactory const*) () from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos.so.3.11.2" target="_blank">erchen.cz/pgsql15/lib/libgeos.so.3.11.2</a></div><div style="clear:both">#5 0x0000ffff84ce29d4 in geos::algorithm::hull::ConcaveHull::getHull() ()</div><div style="clear:both"> from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos.so.3.11.2" target="_blank">erchen.cz/pgsql15/lib/libgeos.so.3.11.2</a></div><div style="clear:both">#6 0x0000ffff8e54818c in GEOSConcaveHull_r ()</div><div><span> from /home/<a href="http://erchen.cz/pgsql15/lib/libgeos_c.so.1" target="_blank">erchen.cz/pgsql15/lib/libgeos_c.so.1</a></span></div><span style="font-family:Helvetica,Tahoma,Arial">….</span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial"><br></span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial">It seemed that geos was failed to triangulate the multipoint and then crashed … Is this a bug of geos?</span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial"><br></span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial">Any comment is welcomed.</span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><span style="font-family:Helvetica,Tahoma,Arial">Regards,</span></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both"><br></div><div style="margin:0px;padding:0px;border:0px;outline:0px;font-variant-ligatures:normal;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;clear:both">Zhen</div></div></div><div style="line-height:20px;clear:both"><br></div></div></div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div>