|
|
1.1 ! root 1: #include "map.h" ! 2: ! 3: static int ! 4: Xmollweide(struct place *place, double *x, double *y) ! 5: { ! 6: double z; ! 7: double w; ! 8: z = place->nlat.l; ! 9: if(fabs(z)<89.9*RAD) ! 10: do { /*newton for 2z+sin2z=pi*sin(lat)*/ ! 11: w = (2*z+sin(2*z)-PI*place->nlat.s)/(2+2*cos(2*z)); ! 12: z -= w; ! 13: } while(fabs(w)>=.00001); ! 14: *y = sin(z); ! 15: *x = - (2/PI)*cos(z)*place->wlon.l; ! 16: return(1); ! 17: } ! 18: ! 19: proj ! 20: mollweide(void) ! 21: { ! 22: return(Xmollweide); ! 23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.