[Proj4j] Aitoff projection

Fred Pospeschil f.w.pospeschil.t.r at charter.net
Sun Jun 6 09:40:43 EDT 2010


Martin,

Jerry's initialization code has the following code:

 public void initialize() {
  super.initialize();
  if (winkel) {
//FIXME
//   if (pj_param(P->params, "tlat_1").i)
//    if ((cosphi1 = Math.cos(pj_param(P->params, "rlat_1").f)) == 0.)
//     throw new IllegalArgumentException("-22")
//   else /* 50d28' or acos(2/pi) */
    cosphi1 = 0.636619772367581343;
  }
 }

Based on my reading of the Proj4 manuals I changed it to read:

 public void initialize() {
  super.initialize();
  if (winkel) {
/*
Winkel Tripel is the arithmetic mean of the Aitoff and
Equidistant Cylindrical projections with the latter's phi_ts
(latitude of true scale) becoming phi_1. If lat_1=phi_1 is
not specified, Winkel's value ofphi _1 = cos-1(2/pi) or
50 27 35. is used. For Bartholomew's variant, use lat_1=40.
Proj4 Manual pg 17 fwp
 */
    cosphi1 = Math.cos(projectionLatitude);
  }
 }

In addition, I added :

projectionLatitude = 0.0;

to the constructor.

With these changes the code appears to generate graticules/maps which match those in Synders Album.

How  do these changes look to you?

Fred

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/proj4j/attachments/20100606/3e54285c/attachment.html


More information about the Proj4j mailing list