[postgis-devel] Possible bug in intersection of polygons

Martin Davis mtnclimb at gmail.com
Thu Nov 3 10:17:54 PDT 2022


That certainly seems odd.  We'll need some data to investigate this further.


On Wed, Nov 2, 2022 at 4:37 AM Juan Pedro Pérez Alcántara <
jp.perez.alcantara at gmail.com> wrote:

>
> Hi, I may have found a bug in polygon intersection. I've carefully checked
> everything I could think of and updated all libraries to the latest
> version, to rule out the possibility of a GEOS error or something, but the
> error still persists.
>
> postgis_full_version() is:
>
> POSTGIS="3.3.1 3786b21" [EXTENSION] PGSQL="150" GEOS="3.11.0-CAPI-1.17.0"
> PROJ="9.1.0" LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3"
> WAGYU="0.5.0 (Internal)"
>
> The system is Linux.
>
> Here is a brief summary of the problem:
>
> [image: Screenshot from 2022-11-02 12-19-38.png]
>
> As you can see in the screenshot, I have several polygons with a clean
> topology. A st_intersection of them, isolating only LINESTRING and
> MULTILINESTRING solutions, returns the green lines. As you can see, the
> clean topology produces clean results: all frontiers are correctly
> identified but the segment in black. I've thoroughly analyzed this segment,
> studying the as_ewkt() representation of both polygons and identifying the
> common primitive, they are identical coordinate by coordinate, but I'm at a
> loss at why st_intersection is unable to compute this exactly common
> primitive.
>
> I've all assets available to reproduce this issue if developers think it
> is of interest, but I'm not going to dump them all here for brevity. Please
> ask me for further details if you think this is of any interest.
>
> Thanks for your attention and your time,
>
> ---
>
> Juan Pedro Pérez Alcántara
>
> jp.perez.alcantara at gmail.com
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20221103/ca9e61c1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2022-11-02 12-19-38.png
Type: image/png
Size: 42337 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20221103/ca9e61c1/attachment-0001.png>


More information about the postgis-devel mailing list