<div dir="ltr">It seems this was recently proposed by Dan Baston in his post:<div><br></div><div><a href="http://www.danbaston.com/posts/2018/02/15/optimizing-postgis-geometries.html">http://www.danbaston.com/posts/2018/02/15/optimizing-postgis-geometries.html</a></div><div><br></div><div>How about we bitset the tail up to EPSILON_SQLMM on Voronoi failure and try again?</div><div><br></div><div>J.J.Green, can you share your geometry as binary representation so we can see if this workaround helps?</div><div><br></div><div>select ST_AsEWKB(ST_Collect(point)) from cell_point_tmp;</div><div><br><div class="gmail_quote"><div dir="ltr">вс, 25 февр. 2018 г. в 19:04, J.J. Green <<a href="mailto:j.j.green@gmx.co.uk" target="_blank">j.j.green@gmx.co.uk</a>>:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Darafei,<br>
<br>
Many thanks for your reply<br>
<br>
> Please post your points to <a href="https://trac.osgeo.org/geos/" rel="noreferrer" target="_blank">https://trac.osgeo.org/geos/</a> as a bug report.<br>
<br>
I'll do that<br>
<br>
> In my experience two things help with Voronoi issues:<br>
>   - ST_SnapToGrid;<br>
>   - falling back to non-geos voronoi implementation,<br>
<br>
In fact the first of those works beautifully -- I tried several<br>
values and found that dyadic fractions (as in 1/2^n) work best,<br>
this kind-of makes sense since it "zeros-out" the bottom-end of<br>
the floats, and then calculations with them should be exact<br>
(provided the input numbers are of the same order, and they are).<br>
<br>
For the sake of others happening across this issue, my<br>
working Voronoi call is now<br>
<br>
   CREATE TEMPORARY TABLE cell_poly_tmp ON COMMIT DROP AS<br>
     SELECT<br>
       Geometry(<br>
         (<br>
           ST_Dump(<br>
             ST_CollectionExtract(<br>
               ST_VoronoiPolygons(<br>
                 ST_SnapToGrid(<br>
                   ST_Collect(point),<br>
                   pow(2.0, -8)<br>
                 ),<br>
                 0.0<br>
               ),<br>
               3<br>
             )<br>
           )<br>
         ).geom<br>
       ) AS poly<br>
     FROM cell_point_tmp;<br>
<br>
Thanks again!<br>
<br>
Jim<br>
--<br>
J.J. Green<br>
<a href="http://soliton.vm.bytemark.co.uk/pub/jjg/en/" rel="noreferrer" target="_blank">http://soliton.vm.bytemark.co.uk/pub/jjg/en/</a><br>
_______________________________________________<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></blockquote></div></div></div>