[postgis-users] Is there a better way for Finding Gaps/Sliver Holes?

Shaozhong SHI shishaozhong at gmail.com
Mon May 2 11:33:52 PDT 2022


On Mon, 2 May 2022 at 19:05, Martin Davis <mtnclimb at gmail.com> wrote:

> That blog post does provide useful queries for finding polygon overlaps
> and gaps.
>
> Overlaps are found via testing if polygon interiors intersect, using the
> DE-9IM relate mask 2********.
>
> Gaps are found by identifying holes in the union of the set of polygons.
> One issue with this is that computing the union of large datasets can be
> slow.  Lars' solution provides some ideas for dealing with this.
>
>
> I think that matters are rather more complex than this.

For instance, I found 2 lines meet with each other at both ends.  In this
case, 2 intersections are both a point.  One will find two lines form an
enclosed area.

When 2 lines intersect or meet/touch more than 2 times, intersection will
return more than 2 points.   For instance, when two lines meet at 3 points,
one would get 2 gap polygons.

Given 2 zigzagging lines, how to write a function to return overlaps and
gaps is an interesting matter.

Regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220502/e15aa73d/attachment.htm>


More information about the postgis-users mailing list