struct coord {
float l; /* lat or lon in radians*/
float s; /* sin */
float c; /* cos */
};
struct place {
struct coord nlat;
struct coord wlon;
};
typedef int (*proj)(struct place *, float *, float *);
struct index { /* index of known projections */
char *name; /* name of projection */
proj (*prog)(float, float);
/* pointer to projection function */
int npar; /* number of params */
int (*cut)(struct place *, struct place *, float *);
/* function that handles cuts--eg longitude 180 */
int poles; /*1 S pole is a line, 2 N pole is, 3 both*/
int spheroid; /* poles must be at 90 deg if nonzero */
};
proj aitoff(void);
proj albers(float, float);
int Xazequalarea(struct place *, float *, float *);
proj azequalarea(void);
int Xazequidistant(struct place *, float *, float *);
proj azequidistant(void);
proj bicentric(float);
proj bonne(float);
proj conic(float);
proj cylequalarea(float);
int Xcylindrical(struct place *, float *, float *);
proj cylindrical(void);
proj elliptic(float);
proj fisheye(float);
proj gall(float);
proj globular(void);
proj gnomonic(void);
int guycut(struct place *, struct place *, float *);
int Xguyou(struct place *, float *, float *);
proj guyou(void);
proj harrison(float, float);
int hexcut(struct place *, struct place *, float *);
proj hex(void);
proj homing(float);
proj lagrange(void);
proj lambert(float, float);
proj laue(void);
proj loxodromic(float); /* not in library */
proj mecca(float);
proj mercator(void);
proj mollweide(void);
proj newyorker(float);
proj ortelius(float, float); /* not in library */
int Xorthographic(struct place *place, float *x, float *y);
proj orthographic(void);
proj perspective(float);
int Xpolyconic(struct place *, float *, float *);
proj polyconic(void);
proj rectangular(float);
proj simpleconic(float, float);
int Xsinusoidal(struct place *, float *, float *);
proj sinusoidal(void);
proj sp_albers(float, float);
proj sp_mercator(void);
proj square(void);
int Xstereographic(struct place *, float *, float *);
proj stereographic(void);
int Xtetra(struct place *, float *, float *);
int tetracut(struct place *, struct place *, float *);
proj tetra(void);
proj trapezoidal(float, float);
proj vandergrinten(void);
proj wreath(float, float); /* not in library */
void orient(float, float, float);
void latlon(float, float, struct place *);
void deg2rad(float, struct coord *);
void sincos(struct coord *);
void normalize(struct place *);
void invert(struct place *);
void norm(struct place *, struct place *, struct coord *);
void printp(struct place *);
void copyplace(struct place *, struct place *);
int picut(struct place *, struct place *, float *);
int ckcut(struct place *, struct place *, float);
float reduce(float);
void getsyms(char *);
int putsym(struct place *, char *, double, int);
void filerror(char *s, char *f);
void error(char *s);
int doproj(struct place *, int *, int *);
int cpoint(int, int, int);
int plotpt(struct place *, int);
int nocut(struct place *, struct place *, float *);
extern int (*projection)(struct place *, float *, float *);