#include <u.h>
#include <libc.h>
#include "project.h"
static point
xytoλφ(point pt, elliptic*, projection*){
pt.x = pt.λ * PI/180;
pt.y = pt.φ * PI/180;
return pt;
}
static point
λφtoxy(point pt, elliptic*, projection*){
pt.λ = pt.x * 180/PI;
pt.φ = pt.y * 180/PI;
return pt;
}
char *
printλφ(point pt){
return smprint("%.12f %.12f", pt.x, pt.y);
};
int
λφin(projection *p, elliptic*, char*){
p->λφ=xytoλφ;
p->xy=λφtoxy;
p->scan=scanstd;
p->print=printλφ;
return 1;
};
|