Skip to content

Commit

Permalink
Do full ring check always in line/poly maxdist mode, references #5639
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Jan 23, 2024
1 parent 96b7863 commit a2b355a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -10,6 +10,7 @@ xxxx/xx/xx
- #5635, Handle NaN points in ST_Split (Regina Obe)
- #5646, Crash on collections with empty members (Paul Ramsey)
- #5580, Handle empty collection components in 3d distance (Paul Ramsey)
- #5639, ST_DFullyWithin line/poly error case (Paul Ramsey)


PostGIS 3.0.10
Expand Down
2 changes: 1 addition & 1 deletion liblwgeom/measures.c
Expand Up @@ -742,7 +742,7 @@ lw_dist2d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS *dl)
const POINT2D *pt = getPoint2d_cp(pa, 0);

/* Line has a pount outside poly. Check distance to outer ring only. */
if (ptarray_contains_point(poly->rings[0], pt) == LW_OUTSIDE)
if (ptarray_contains_point(poly->rings[0], pt) == LW_OUTSIDE || dl->mode == DIST_MAX)
return lw_dist2d_ptarray_ptarray(pa, poly->rings[0], dl);

for (uint32_t i = 1; i < poly->nrings; i++)
Expand Down

0 comments on commit a2b355a

Please sign in to comment.