mirror of
https://github.com/csharpee/Map-Projections.git
synced 2025-12-06 00:00:04 -05:00
fix Waterman projection bug
when I redefined the Waterman projection coordinates (I don't even remember when) to use four-times-larger units, I apparently missed *one* constant, and it was increasing the slope of this line between these two pieces of the Waterman face that was causing the projections at that interface to not line up. goodness, what an asinine bug. good on me for finding it in less than an our of its reporting, tho!
This commit is contained in:
parent
ce7ddeb028
commit
6b62a5ee0a
@ -86,7 +86,7 @@ public class Waterman {
|
||||
longitude = x/linInterp(y, yELD[i-1], yELD[i], dXdL[i-1], dXdL[i]);
|
||||
}
|
||||
else { //the well-behaved part of the last segment?
|
||||
longitude = x/linInterp(y, yELD[i-1], -2*sqrt(3), dXdL[i-1], dXdL[i]);
|
||||
longitude = x/linInterp(y, yELD[i-1], -sqrt(3)/2, dXdL[i-1], dXdL[i]);
|
||||
if (longitude > lonDiag) { //the diagonal part of the last segment?
|
||||
double a = dXdL[2]*dXdL[3]*sin15; //surprisingly, the equation becomes quadratic here
|
||||
double b = (dXdL[3]*cos15-dXdL[2])*(y-yELD[2]) - dXdL[3]*sin15*x - dXdL[2]*(dXdL[3]*lonDiag*sin15-yELD[1]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user