Go to the documentation of this file.
49 static void print_info
51 const TRANSFORMATION *trans
72 static int common_init
91 const GCTP_PROJECTION *proj = &trans->proj;
93 int spheroid = proj->spheroid;
102 "from DMS to degrees: %f", proj->parameters[4]);
110 "from DMS to degrees: %f", proj->parameters[5]);
122 trans->cache =
cache;
146 sincos(con1, &sinphi, &cosphi);
151 trans->print_info = print_info;
165 static int inverse_transform
167 const TRANSFORMATION *trans,
182 rh = sqrt(
x *
x +
y *
y);
183 if (cache_ptr->
ind != 0)
184 ts = rh * cache_ptr->
tcs/(cache_ptr->
r_major * cache_ptr->
mcs);
186 ts = rh * cache_ptr->
e4 / (cache_ptr->
r_major * 2.0);
190 *
lat = cache_ptr->
fac * phi2;
211 static int forward_transform
213 const TRANSFORMATION *trans,
229 con2 = cache_ptr->
fac *
lat;
232 if (cache_ptr->
ind != 0)
233 rh = cache_ptr->
r_major * cache_ptr->
mcs * ts / cache_ptr->
tcs;
235 rh = 2.0 * cache_ptr->
r_major * ts / cache_ptr->
e4;
254 TRANSFORMATION *trans
261 "Error initializing polar stereographic inverse projection");
265 trans->transform = inverse_transform;
281 TRANSFORMATION *trans
288 "Error initializing polar stereographic forward projection");
292 trans->transform = forward_transform;
void gctp_print_title(const char *proj_name)
void gctp_print_cenlon(double A)
#define GCTP_PRINT_ERROR(format,...)
double adjust_lon(double x)
def cache(filename, recache=False)
int gctp_calc_phi2(double eccent, double ts, double *phi2)
double gctp_calc_small_t(double eccent, double phi, double sinphi)
int gctp_ps_forward_init(TRANSFORMATION *trans)
void gctp_print_offsetp(double A, double B)
int gctp_dms2degrees(double angle, double *degrees)
#define gctp_get_spheroid
void gctp_print_radius2(double radius1, double radius2)
int gctp_ps_inverse_init(TRANSFORMATION *trans)
double gctp_calc_small_radius(double eccent, double sinphi, double cosphi)
double gctp_calc_e4(double x)