public static double inv_mlfn(double arg, double es, double[] en) { double s, t, phi, k = 1./(1.-es); phi = arg; for (int i = MAX_ITER; i != 0; i--) { s = Math.sin(phi); t = 1. - es * s * s; phi -= t = (mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k; if (Math.abs(t) < 1e-11) return phi; } return phi; }
public static double inv_mlfn(double arg, double es, double[] en) { double s, t, phi, k = 1./(1.-es); phi = arg; for (int i = MAX_ITER; i != 0; i--) { s = Math.sin(phi); t = 1. - es * s * s; phi -= t = (mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k; if (Math.abs(t) < 1e-11) return phi; } return phi; }
public static double inv_mlfn(double arg, double es, double[] en) { double s, t, phi, k = 1./(1.-es); phi = arg; for (int i = MAX_ITER; i != 0; i--) { s = Math.sin(phi); t = 1. - es * s * s; phi -= t = (mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k; if (Math.abs(t) < 1e-11) return phi; } return phi; }
public static double inv_mlfn(double arg, double es, double[] en) { double s, t, phi, k = 1./(1.-es); phi = arg; for (int i = MAX_ITER; i != 0; i--) { s = Math.sin(phi); t = 1. - es * s * s; phi -= t = (mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k; if (Math.abs(t) < 1e-11) return phi; } return phi; }
private void initialize() { if (!spherical) { en = MapMath.enfn(es); if (en == null) { throw new RuntimeException("E"); } ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); } else { ml0 = -projectionLatitude; } }
private void initialize() { if (!spherical) { en = MapMath.enfn(es); if (en == null) { throw new RuntimeException("E"); } ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); } else { ml0 = -projectionLatitude; } }
private void initialize() { if (!spherical) { en = MapMath.enfn(es); if (en == null) { throw new RuntimeException("E"); } ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); } else { ml0 = -projectionLatitude; } }
private Point2D.Double project(double lplam, double lpphi, Point2D.Double out) { if (spherical) { double cot, E; if (Math.abs(lpphi) <= TOL) { out.x = lplam; out.y = ml0; } else { cot = 1. / Math.tan(lpphi); out.x = Math.sin(E = lplam * Math.sin(lpphi)) * cot; out.y = lpphi - projectionLatitude + cot * (1. - Math.cos(E)); } } else { double ms, sp, cp; if (Math.abs(lpphi) <= TOL) { out.x = lplam; out.y = -ml0; } else { sp = Math.sin(lpphi); ms = Math.abs(cp = Math.cos(lpphi)) > TOL ? MapMath.msfn(sp, cp, es) / sp : 0.; out.x = ms * Math.sin(out.x *= sp); out.y = (MapMath.mlfn(lpphi, sp, cp, en) - ml0) + ms * (1. - Math.cos(lplam)); } } return out; }
+ FC7 * als * (61. + t * (t * (179. - t) - 479.)) ))); xy.y = scaleFactor * (MapMath.mlfn(lpphi, sinphi, cosphi, en) - ml0 + sinphi * al * lplam * FC2 * (1. + FC4 * als * (5. - t + n * (9. + 4. * n) +
+ FC7 * als * (61. + t * ( t * (179. - t) - 479. ) ) ))); xy.y = scaleFactor * (MapMath.mlfn(lpphi, sinphi, cosphi, en) - ml0 + sinphi * al * lplam * FC2 * ( 1. + FC4 * als * (5. - t + n * (9. + 4. * n) +
+ FC7 * als * (61. + t * (t * (179. - t) - 479.)) ))); double y = scaleFactor * (MapMath.mlfn(lpphi, sinphi, cosphi, en) - ml0 + sinphi * al * lplam * FC2 * (1. + FC4 * als * (5. - t + n * (9. + 4. * n) +
public void initialize() { this.e = ellipsoid.getEccentricity(); this.es = ellipsoid.getEccentricitySquared(); this.spherical = (e == 0.0); this.one_es = 1.0 - es; this.totalScale = ellipsoid.getMajor() * .001; // scale factor for cartesion coords in km. if (spherical) { esp = scaleFactor; ml0 = .5 * esp; } else { en = MapMath.enfn(es); ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); esp = es / (1. - es); } }
public void initialize() { this.e = ellipsoid.getEccentricity(); this.es = ellipsoid.getEccentricitySquared(); this.spherical = (e == 0.0); this.one_es = 1.0 - es; this.totalScale = ellipsoid.getMajor() * .001; // scale factor for cartesion coords in km. if (spherical) { esp = scaleFactor; ml0 = .5 * esp; } else { en = MapMath.enfn(es); ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); esp = es / (1. - es); } }
public void initialize() { this.e = ellipsoid.getEccentricity(); this.es = ellipsoid.getEccentricitySquared(); this.spherical = (e == 0.0); this.one_es = 1.0-es; this.totalScale = ellipsoid.getMajor(); // scale factor for cartesion coords in km. if (spherical) { esp = scaleFactor; ml0 = .5 * esp; } else { en = MapMath.enfn(es); ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); esp = es / (1. - es); } }
public void initialize() { this.e = ellipsoid.getEccentricity(); this.es = ellipsoid.getEccentricitySquared(); this.spherical = (e == 0.0); this.one_es = 1.0 - es; this.totalScale = ellipsoid.getMajor() * .001; // scale factor for cartesion coords in km. if (spherical) { esp = scaleFactor; ml0 = .5 * esp; } else { en = MapMath.enfn(es); ml0 = MapMath.mlfn(projectionLatitude, Math.sin(projectionLatitude), Math.cos(projectionLatitude), en); esp = es / (1. - es); } }
double y = (MapMath.mlfn(lpphi, sp, cp, en) - ml0) + ms * (1. - Math.cos(lplam)); out.setLocation(x, y);
double y = (MapMath.mlfn(lpphi, sp, cp, en) - ml0) + ms * (1. - Math.cos(lplam)); out.setLocation(x, y);