Skip to content

Commit

Permalink
fix: when squaring a very circular / spiky object it is deleted opens…
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaitanyaKadu03 committed Jan 20, 2025
1 parent 2373f5d commit cab0fa8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/geo/ortho.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function geoOrthoFilterDotProduct(dotp, epsilon, lowerThreshold, upperThreshold,
return 0; // already orthogonal
} else if (allowStraightAngles && Math.abs(val-1) < epsilon) {
return 0; // straight angle, which is okay in this case
} else if (val > 0.98 && dotp > -1) {
return 0; // circular / spiky object [https://github.com/openstreetmap/iD/issues/10641]
} else if (val < lowerThreshold || val > upperThreshold) {
return dotp; // can be adjusted
} else {
Expand Down

0 comments on commit cab0fa8

Please sign in to comment.