<div dir="ltr">Hope it works =)<br><br>Don't forget to use text paramter of buffers to reduce the number of segpoints (faster, more coherent with your data)<br>Try either 'endcap=square'<br>or quadseg = 1 (I can't test here)<br>
Cheers,<br><br>Rémi-C<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/14 Pierre Racine <span dir="ltr"><<a href="mailto:Pierre.Racine@sbf.ulaval.ca" target="_blank">Pierre.Racine@sbf.ulaval.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try this:<br>
<br>
SELECT ST_Buffer(ST_Union(ST_Buffer(geom, 0.0001)), -0.00008) FROM points<br>
<div class="im HOEnZb"><br>
> -----Original Message-----<br>
> From: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>
> <a href="mailto:bounces@lists.osgeo.org">bounces@lists.osgeo.org</a>] On Behalf Of Ivan Price<br>
> Sent: Tuesday, January 14, 2014 8:36 AM<br>
> To: PostGIS Users Discussion<br>
> Subject: Re: [postgis-users] ST_ConcaveHull giving up too soon, aka too<br>
> convex<br>
><br>
</div><div class="HOEnZb"><div class="h5">> Thanks for your reply Remi,<br>
><br>
><br>
><br>
> for now we are going with simply a union of a buffer of the points (as you<br>
> suggested) as it makes sense in the context of the origin of the data<br>
> anyway.<br>
><br>
><br>
><br>
> cheers<br>
><br>
><br>
><br>
> -i<br>
><br>
><br>
><br>
><br>
><br>
> De : <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>
> <a href="mailto:bounces@lists.osgeo.org">bounces@lists.osgeo.org</a>] De la part de Rémi Cura<br>
> Envoyé : Tuesday, 14 January 2014 11:39<br>
> À : PostGIS Users Discussion<br>
> Objet : Re: [postgis-users] ST_ConcaveHull giving up too soon, aka too<br>
> convex<br>
><br>
><br>
><br>
> Hey,<br>
><br>
> sadly I can't answer your questions,<br>
><br>
> but it looks like you don't want concave hull but instead Alpha Shape (see<br>
> SFCGAL , maybe they have integrated it).<br>
><br>
><br>
> You have still a lot of workaround :<br>
> if you don't mind expending the bouyndary, a union of buffers of points<br>
> if you don't mind quantization (anyway your input looks quantized) :<br>
> convert to raster, then any classical image processing easily available<br>
> (watershed for example) (you can use out of the box QGIS 2.0 raster<br>
> processing tools)<br>
> if you want a sharp boudary : and assuming your points are regularly<br>
> spaced : maybe something liek this (untested)<br>
> create a segment for each point to his K nearest neighbours (K would be 2<br>
> or 3, and you would put a max distance before drawing a line)<br>
><br>
> Then pick the segments that have no  intersection with other segments, and<br>
> either use ST_Polygonyze, or cut the bounding box polygon with the<br>
> segments and remove the part outside<br>
> .<br>
><br>
> Maybe you can try to reduce your point precision for processing (snap to<br>
> grid) and/or put the points in an appropriate srid (not too much digits)<br>
><br>
><br>
><br>
> Cheers,<br>
><br>
> Rémi-C<br>
><br>
><br>
><br>
> 2014/1/14 Ivan Price <<a href="mailto:Ivan.Price@noveltis.fr">Ivan.Price@noveltis.fr</a>><br>
><br>
><br>
><br>
> Hi there,<br>
><br>
><br>
><br>
> I am experimenting with ST_ConcaveHull, am using Postgres 9.2.2 on<br>
> windows with postgis 2.1.1 r12113<br>
><br>
><br>
><br>
> i have a table of 218 points forming roughly an arc (something like the nike<br>
> swoosh)<br>
><br>
><br>
><br>
> when i ask for the concave hull i'm expecting a poly shrink-wrapped to<br>
> them, however this is not the case, even when i set a very low percentage<br>
> area parameter. for example:<br>
><br>
><br>
><br>
> SELECT ST_ConcaveHull(ST_Collect(geom), 0.000001) as geom FROM<br>
> points;<br>
><br>
><br>
><br>
> i attach a screenshot of the points and the convext hull, as well as an sql<br>
> dump of the points themselves.<br>
><br>
><br>
><br>
> also as a side note, in researching the problem i upgraded from postgis 2.01<br>
> to 2.1.1 and noticed a change in the processing time for the above<br>
> statement from 1 minute to ~ 5 minutes.<br>
><br>
><br>
><br>
> are there any pointers for making ConcaveHull more 'aggressive' ?<br>
><br>
><br>
><br>
> thanks and regards<br>
><br>
><br>
><br>
> -i<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
><br>
><br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></div></div></blockquote></div><br></div>