Skip to content

Commit

Permalink
Fix covered_by incorrect results for polygons with multiple defined p…
Browse files Browse the repository at this point in the history
…oints as a pole
  • Loading branch information
vissarion committed May 16, 2024
1 parent a7644cb commit 7fa6b8b
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2013-2017 Adam Wulkiewicz, Lodz, Poland.

// This file was modified by Oracle on 2013-2023.
// Modifications copyright (c) 2013-2023 Oracle and/or its affiliates.
// This file was modified by Oracle on 2013-2024.
// Modifications copyright (c) 2013-2024 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle

Expand Down Expand Up @@ -395,8 +395,13 @@ class spherical_winding_base
}

calc_t const p = get<0>(point);
calc_t const s1 = get<0>(seg1);
calc_t const s2 = get<0>(seg2);
calc_t s1 = get<0>(seg1);
calc_t s2 = get<0>(seg2);

// In case of a segment that contains a pole endpoint we need an arbitrary but consistant
// longitude for that endpoint different than p's longitude
if (s1_is_pole) s1 = (p != 0) ? 0 : 1;
if (s2_is_pole) s2 = (p != 0) ? 0 : 1;

calc_t const s1_p = math::longitude_distance_signed<units_t>(s1, p);

Expand Down

0 comments on commit 7fa6b8b

Please sign in to comment.