[postgis-users] ST_Subdivide creates nodes outside original polygon

Eduardo Ramos duda.ramos at gmail.com
Fri Nov 29 06:59:12 PST 2019


Hi, thanks for your responses.

I managed to improve the results by installing PostGIS 2.5.3 (many thanks
@Darafei). It solved almost all the cases.
But to completely remove the "error", I've created a 'tolerance' by
calculating the intersection area and checking that it was greater than a
0.00000001.
It solved the problem and the performance impact is little to none. It
hurted a little bit to do this, though...

Eduardo

On Wed, 27 Nov 2019 at 08:29, Darafei "Komяpa" Praliaskouski <me at komzpa.net>
wrote:

> Hi,
>
> Can you share a testcase?
> Are you running PostGIS 2.5+ so ST_Subdivide will try to reuse the
> original node?
>
> On Tue, Nov 26, 2019 at 7:24 PM Eduardo Ramos <duda.ramos at gmail.com>
> wrote:
>
>> Hello all.
>>
>> I'm exploring the function ST_Subdivide(with type geometry) and noticed
>> that the nodes that this function creates to divide the original polygon
>> are missing the polygon edges by ~6cm.
>>
>> Here is an example:
>>
>> [image: image.png]
>> This is originating some issues when using the ST_Intersects because the
>> new polygons generated by ST_Subdivide are intersecting polygons that were
>> not being intersected before.
>>
>> I guess this must be a matter of numeric precision but I we can't control
>> the precision or the tolerance in either of the two functions (ST_Subdivide
>> and ST_Intersects).
>>
>> Is there a way to configure the precision of ST_Subdivide or to play with
>> the ST_Intersects tolerance?
>>
>> Any ideas or suggestions?
>>
>> Thanks,
>> Eduardo
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
>
> --
> Darafei Praliaskouski
> Support me: http://patreon.com/komzpa
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20191129/5e9dfca7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 58922 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20191129/5e9dfca7/attachment.png>


More information about the postgis-users mailing list