diff options
Diffstat (limited to 'src/3rdparty/proj/include')
-rw-r--r-- | src/3rdparty/proj/include/pj_list.h | 136 | ||||
-rw-r--r-- | src/3rdparty/proj/include/proj_api.h | 108 | ||||
-rw-r--r-- | src/3rdparty/proj/include/projects.h | 434 |
3 files changed, 678 insertions, 0 deletions
diff --git a/src/3rdparty/proj/include/pj_list.h b/src/3rdparty/proj/include/pj_list.h new file mode 100644 index 00000000..b965cc71 --- /dev/null +++ b/src/3rdparty/proj/include/pj_list.h @@ -0,0 +1,136 @@ +#ifdef DO_PJ_LIST_ID +static const char PJ_LIST_H_ID[] = "@(#)pj_list.h 4.5 95/08/09 GIE REL"; +#endif +/* Full list of current projections for Tue Jan 11 12:27:04 EST 1994 +** +** Copy this file and retain only appropriate lines for subset list +*/ +PROJ_HEAD(aea, "Albers Equal Area") +PROJ_HEAD(aeqd, "Azimuthal Equidistant") +PROJ_HEAD(airy, "Airy") +PROJ_HEAD(aitoff, "Aitoff") +PROJ_HEAD(alsk, "Mod. Stererographics of Alaska") +PROJ_HEAD(apian, "Apian Globular I") +PROJ_HEAD(august, "August Epicycloidal") +PROJ_HEAD(bacon, "Bacon Globular") +PROJ_HEAD(bipc, "Bipolar conic of western hemisphere") +PROJ_HEAD(boggs, "Boggs Eumorphic") +PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)") +PROJ_HEAD(cass, "Cassini") +PROJ_HEAD(cc, "Central Cylindrical") +PROJ_HEAD(cea, "Equal Area Cylindrical") +PROJ_HEAD(chamb, "Chamberlin Trimetric") +PROJ_HEAD(collg, "Collignon") +PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)") +PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") +PROJ_HEAD(eck1, "Eckert I") +PROJ_HEAD(eck2, "Eckert II") +PROJ_HEAD(eck3, "Eckert III") +PROJ_HEAD(eck4, "Eckert IV") +PROJ_HEAD(eck5, "Eckert V") +PROJ_HEAD(eck6, "Eckert VI") +PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Caree)") +PROJ_HEAD(eqdc, "Equidistant Conic") +PROJ_HEAD(euler, "Euler") +PROJ_HEAD(fahey, "Fahey") +PROJ_HEAD(fouc, "Foucaut") +PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") +PROJ_HEAD(gall, "Gall (Gall Stereographic)") +PROJ_HEAD(geocent, "Geocentric") +PROJ_HEAD(geos, "Geostationary Satellite View") +PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)") +PROJ_HEAD(gn_sinu, "General Sinusoidal Series") +PROJ_HEAD(gnom, "Gnomonic") +PROJ_HEAD(goode, "Goode Homolosine") +PROJ_HEAD(gs48, "Mod. Stererographics of 48 U.S.") +PROJ_HEAD(gs50, "Mod. Stererographics of 50 U.S.") +PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff") +PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") +PROJ_HEAD(imw_p, "Internation Map of the World Polyconic") +PROJ_HEAD(kav5, "Kavraisky V") +PROJ_HEAD(kav7, "Kavraisky VII") +PROJ_HEAD(krovak, "Krovak") +PROJ_HEAD(labrd, "Laborde") +PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") +PROJ_HEAD(lagrng, "Lagrange") +PROJ_HEAD(larr, "Larrivee") +PROJ_HEAD(lask, "Laskowski") +PROJ_HEAD(lonlat, "Lat/long (Geodetic)") +PROJ_HEAD(latlon, "Lat/long (Geodetic alias)") +PROJ_HEAD(latlong, "Lat/long (Geodetic alias)") +PROJ_HEAD(longlat, "Lat/long (Geodetic alias)") +PROJ_HEAD(lcc, "Lambert Conformal Conic") +PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative") +PROJ_HEAD(leac, "Lambert Equal Area Conic") +PROJ_HEAD(lee_os, "Lee Oblated Stereographic") +PROJ_HEAD(loxim, "Loximuthal") +PROJ_HEAD(lsat, "Space oblique for LANDSAT") +PROJ_HEAD(mbt_s, "McBryde-Thomas Flat-Polar Sine") +PROJ_HEAD(mbt_fps, "McBryde-Thomas Flat-Pole Sine (No. 2)") +PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") +PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") +PROJ_HEAD(mbtfps, "McBryde-Thomas Flat-Polar Sinusoidal") +PROJ_HEAD(merc, "Mercator") +PROJ_HEAD(mil_os, "Miller Oblated Stereographic") +PROJ_HEAD(mill, "Miller Cylindrical") +PROJ_HEAD(moll, "Mollweide") +PROJ_HEAD(murd1, "Murdoch I") +PROJ_HEAD(murd2, "Murdoch II") +PROJ_HEAD(murd3, "Murdoch III") +PROJ_HEAD(nell, "Nell") +PROJ_HEAD(nell_h, "Nell-Hammer") +PROJ_HEAD(nicol, "Nicolosi Globular") +PROJ_HEAD(nsper, "Near-sided perspective") +PROJ_HEAD(nzmg, "New Zealand Map Grid") +PROJ_HEAD(ob_tran, "General Oblique Transformation") +PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area") +PROJ_HEAD(oea, "Oblated Equal Area") +PROJ_HEAD(omerc, "Oblique Mercator") +PROJ_HEAD(ortel, "Ortelius Oval") +PROJ_HEAD(ortho, "Orthographic") +PROJ_HEAD(pconic, "Perspective Conic") +PROJ_HEAD(poly, "Polyconic (American)") +PROJ_HEAD(putp1, "Putnins P1") +PROJ_HEAD(putp2, "Putnins P2") +PROJ_HEAD(putp3, "Putnins P3") +PROJ_HEAD(putp3p, "Putnins P3'") +PROJ_HEAD(putp4p, "Putnins P4'") +PROJ_HEAD(putp5, "Putnins P5") +PROJ_HEAD(putp5p, "Putnins P5'") +PROJ_HEAD(putp6, "Putnins P6") +PROJ_HEAD(putp6p, "Putnins P6'") +PROJ_HEAD(qua_aut, "Quartic Authalic") +PROJ_HEAD(robin, "Robinson") +PROJ_HEAD(rouss, "Roussilhe Stereographic") +PROJ_HEAD(rpoly, "Rectangular Polyconic") +PROJ_HEAD(sinu, "Sinusoidal (Sanson-Flamsteed)") +PROJ_HEAD(somerc, "Swiss. Obl. Mercator") +PROJ_HEAD(stere, "Stereographic") +PROJ_HEAD(sterea, "Oblique Stereographic Alternative") +PROJ_HEAD(gstmerc, "Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)") +PROJ_HEAD(tcc, "Transverse Central Cylindrical") +PROJ_HEAD(tcea, "Transverse Cylindrical Equal Area") +PROJ_HEAD(tissot, "Tissot Conic") +PROJ_HEAD(tmerc, "Transverse Mercator") +PROJ_HEAD(tpeqd, "Two Point Equidistant") +PROJ_HEAD(tpers, "Tilted perspective") +PROJ_HEAD(ups, "Universal Polar Stereographic") +PROJ_HEAD(urm5, "Urmaev V") +PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") +PROJ_HEAD(utm, "Universal Transverse Mercator (UTM)") +PROJ_HEAD(vandg, "van der Grinten (I)") +PROJ_HEAD(vandg2, "van der Grinten II") +PROJ_HEAD(vandg3, "van der Grinten III") +PROJ_HEAD(vandg4, "van der Grinten IV") +PROJ_HEAD(vitk1, "Vitkovsky I") +PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)") +PROJ_HEAD(wag2, "Wagner II") +PROJ_HEAD(wag3, "Wagner III") +PROJ_HEAD(wag4, "Wagner IV") +PROJ_HEAD(wag5, "Wagner V") +PROJ_HEAD(wag6, "Wagner VI") +PROJ_HEAD(wag7, "Wagner VII") +PROJ_HEAD(weren, "Werenskiold I") +PROJ_HEAD(wink1, "Winkel I") +PROJ_HEAD(wink2, "Winkel II") +PROJ_HEAD(wintri, "Winkel Tripel") diff --git a/src/3rdparty/proj/include/proj_api.h b/src/3rdparty/proj/include/proj_api.h new file mode 100644 index 00000000..f4ee46bd --- /dev/null +++ b/src/3rdparty/proj/include/proj_api.h @@ -0,0 +1,108 @@ +/****************************************************************************** + * $Id: proj_api.h 1631 2009-09-24 02:26:05Z warmerdam $ + * + * Project: PROJ.4 + * Purpose: Public (application) include file for PROJ.4 API, and constants. + * Author: Frank Warmerdam, <warmerdam@pobox.com> + * + ****************************************************************************** + * Copyright (c) 2001, Frank Warmerdam <warmerdam@pobox.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +/* General projections header file */ +#ifndef PROJ_API_H +#define PROJ_API_H + +/* standard inclusions */ +#include <math.h> +#include <stdlib.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Try to update this every version! */ +#define PJ_VERSION 470 + +extern char const pj_release[]; /* global release id string */ + +#define RAD_TO_DEG 57.29577951308232 +#define DEG_TO_RAD .0174532925199432958 + + +extern int pj_errno; /* global error return code */ + +#if !defined(PROJECTS_H) + typedef struct { double u, v; } projUV; + typedef void *projPJ; + #define projXY projUV + #define projLP projUV +#else + typedef PJ *projPJ; +# define projXY XY +# define projLP LP +#endif + +/* procedure prototypes */ + +projXY pj_fwd(projLP, projPJ); +projLP pj_inv(projXY, projPJ); + +int pj_transform( projPJ src, projPJ dst, long point_count, int point_offset, + double *x, double *y, double *z ); +int pj_datum_transform( projPJ src, projPJ dst, long point_count, int point_offset, + double *x, double *y, double *z ); +int pj_geocentric_to_geodetic( double a, double es, + long point_count, int point_offset, + double *x, double *y, double *z ); +int pj_geodetic_to_geocentric( double a, double es, + long point_count, int point_offset, + double *x, double *y, double *z ); +int pj_compare_datums( projPJ srcdefn, projPJ dstdefn ); +int pj_apply_gridshift( const char *, int, + long point_count, int point_offset, + double *x, double *y, double *z ); +void pj_deallocate_grids(void); +int pj_is_latlong(projPJ); +int pj_is_geocent(projPJ); +void pj_pr_list(projPJ); +void pj_free(projPJ); +void pj_set_finder( const char *(*)(const char *) ); +void pj_set_searchpath ( int count, const char **path ); +projPJ pj_init(int, char **); +projPJ pj_init_plus(const char *); +char *pj_get_def(projPJ, int); +projPJ pj_latlong_from_proj( projPJ ); +void *pj_malloc(size_t); +void pj_dalloc(void *); +char *pj_strerrno(int); +int *pj_get_errno_ref(void); +const char *pj_get_release(void); +void pj_acquire_lock(void); +void pj_release_lock(void); +void pj_cleanup_lock(void); + +#ifdef __cplusplus +} +#endif + +#endif /* ndef PROJ_API_H */ + diff --git a/src/3rdparty/proj/include/projects.h b/src/3rdparty/proj/include/projects.h new file mode 100644 index 00000000..098a3605 --- /dev/null +++ b/src/3rdparty/proj/include/projects.h @@ -0,0 +1,434 @@ +/****************************************************************************** + * $Id: projects.h 1625 2009-09-23 18:58:15Z warmerdam $ + * + * Project: PROJ.4 + * Purpose: Primary (private) include file for PROJ.4 library. + * Author: Gerald Evenden + * + ****************************************************************************** + * Copyright (c) 2000, Frank Warmerdam + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +/* General projections header file */ +#ifndef PROJECTS_H +#define PROJECTS_H + +#ifdef _MSC_VER +# ifndef _CRT_SECURE_NO_DEPRECATE +# define _CRT_SECURE_NO_DEPRECATE +# endif +# ifndef _CRT_NONSTDC_NO_DEPRECATE +# define _CRT_NONSTDC_NO_DEPRECATE +# endif +#endif + +#ifdef __cplusplus +#define C_NAMESPACE extern "C" +#define C_NAMESPACE_VAR extern "C" +extern "C" { +#else +#define C_NAMESPACE extern +#define C_NAMESPACE_VAR +#endif + +/* standard inclusions */ +#include <stdio.h> +#include <stdlib.h> +#include <math.h> + +#ifndef NULL +# define NULL 0 +#endif + +#ifndef FALSE +# define FALSE 0 +#endif + +#ifndef TRUE +# define TRUE 1 +#endif + +#ifndef MAX +# define MIN(a,b) ((a<b) ? a : b) +# define MAX(a,b) ((a>b) ? a : b) +#endif + +#ifndef ABS +# define ABS(x) ((x<0) ? (-1*(x)) : x) +#endif + + /* maximum path/filename */ +#ifndef MAX_PATH_FILENAME +#define MAX_PATH_FILENAME 1024 +#endif + /* prototype hypot for systems where absent */ +// Causes trouble on Symbian, can't find a platform where this is needed. +//#ifndef _WIN32 +//extern double hypot(double, double); +//#endif + +#ifdef _WIN32_WCE +# include <wce_stdlib.h> +# include <wce_stdio.h> +# define rewind wceex_rewind +# define getenv wceex_getenv +# define strdup _strdup +# define hypot _hypot +#endif + + /* some useful constants */ +#define HALFPI 1.5707963267948966 +#define FORTPI 0.78539816339744833 +#define PI 3.14159265358979323846 +#define TWOPI 6.2831853071795864769 + +/* environment parameter name */ +#ifndef PROJ_LIB +#define PROJ_LIB "PROJ_LIB" +#endif +/* maximum tag id length for +init and default files */ +#ifndef ID_TAG_MAX +#define ID_TAG_MAX 50 +#endif + +/* Use WIN32 as a standard windows 32 bit declaration */ +#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) +# define WIN32 +#endif + +#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE) +# define WIN32 +#endif + +/* directory delimiter for DOS support */ +#ifdef WIN32 +#define DIR_CHAR '\\' +#else +#define DIR_CHAR '/' +#endif + +/* datum_type values */ +#define PJD_UNKNOWN 0 +#define PJD_3PARAM 1 +#define PJD_7PARAM 2 +#define PJD_GRIDSHIFT 3 +#define PJD_WGS84 4 /* WGS84 (or anything considered equivelent) */ + +/* datum system errors */ +#define PJD_ERR_GEOCENTRIC -45 + +#define USE_PROJUV + +typedef struct { double u, v; } projUV; +typedef struct { double r, i; } COMPLEX; + +#ifndef PJ_LIB__ +#define XY projUV +#define LP projUV +#else +typedef struct { double x, y; } XY; +typedef struct { double lam, phi; } LP; +#endif + +typedef union { double f; int i; char *s; } PVALUE; +struct PJconsts; + +struct PJ_LIST { + char *id; /* projection keyword */ + struct PJconsts *(*proj)(struct PJconsts*);/* projection entry point */ + char * const *descr; /* description text */ +}; +struct PJ_ELLPS { + char *id; /* ellipse keyword name */ + char *major; /* a= value */ + char *ell; /* elliptical parameter */ + char *name; /* comments */ +}; +struct PJ_UNITS { + char *id; /* units keyword */ + char *to_meter; /* multiply by value to get meters */ + char *name; /* comments */ +}; + +struct PJ_DATUMS { + char *id; /* datum keyword */ + char *defn; /* ie. "to_wgs84=..." */ + char *ellipse_id; /* ie from ellipse table */ + char *comments; /* EPSG code, etc */ +}; + +struct PJ_PRIME_MERIDIANS { + char *id; /* prime meridian keyword */ + char *defn; /* offset from greenwich in DMS format. */ +}; + +struct DERIVS { + double x_l, x_p; /* derivatives of x for lambda-phi */ + double y_l, y_p; /* derivatives of y for lambda-phi */ +}; + +struct FACTORS { + struct DERIVS der; + double h, k; /* meridinal, parallel scales */ + double omega, thetap; /* angular distortion, theta prime */ + double conv; /* convergence */ + double s; /* areal scale factor */ + double a, b; /* max-min scale error */ + int code; /* info as to analytics, see following */ +}; +#define IS_ANAL_XL_YL 01 /* derivatives of lon analytic */ +#define IS_ANAL_XP_YP 02 /* derivatives of lat analytic */ +#define IS_ANAL_HK 04 /* h and k analytic */ +#define IS_ANAL_CONV 010 /* convergence analytic */ + /* parameter list struct */ +typedef struct ARG_list { + struct ARG_list *next; + char used; + char param[1]; } paralist; + /* base projection data structure */ + + +typedef struct PJconsts { + XY (*fwd)(LP, struct PJconsts *); + LP (*inv)(XY, struct PJconsts *); + void (*spc)(LP, struct PJconsts *, struct FACTORS *); + void (*pfree)(struct PJconsts *); + const char *descr; + paralist *params; /* parameter list */ + int over; /* over-range flag */ + int geoc; /* geocentric latitude flag */ + int is_latlong; /* proj=latlong ... not really a projection at all */ + int is_geocent; /* proj=geocent ... not really a projection at all */ + double + a, /* major axis or radius if es==0 */ + a_orig, /* major axis before any +proj related adjustment */ + es, /* e ^ 2 */ + es_orig, /* es before any +proj related adjustment */ + e, /* eccentricity */ + ra, /* 1/A */ + one_es, /* 1 - e^2 */ + rone_es, /* 1/one_es */ + lam0, phi0, /* central longitude, latitude */ + x0, y0, /* easting and northing */ + k0, /* general scaling factor */ + to_meter, fr_meter; /* cartesian scaling */ + + int datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */ + double datum_params[7]; + double from_greenwich; /* prime meridian offset (in radians) */ + double long_wrap_center; /* 0.0 for -180 to 180, actually in radians*/ + +#ifdef PROJ_PARMS__ +PROJ_PARMS__ +#endif /* end of optional extensions */ +} PJ; + +/* public API */ +#include "proj_api.h" + +/* Generate pj_list external or make list from include file */ +#ifndef PJ_LIST_H +extern struct PJ_LIST pj_list[]; +#else +#define PROJ_HEAD(id, name) \ + struct PJconsts *pj_##id(struct PJconsts*); extern char * const pj_s_##id; + +#ifndef lint +#define DO_PJ_LIST_ID +#endif +#include PJ_LIST_H +#ifndef lint +#undef DO_PJ_LIST_ID +#endif +#undef PROJ_HEAD +#define PROJ_HEAD(id, name) {#id, pj_##id, &pj_s_##id}, + struct PJ_LIST +pj_list[] = { +#include PJ_LIST_H + {0, 0, 0}, + }; +#undef PROJ_HEAD +#endif + +#ifndef PJ_ELLPS__ +extern struct PJ_ELLPS pj_ellps[]; +#endif + +#ifndef PJ_UNITS__ +extern struct PJ_UNITS pj_units[]; +#endif + +#ifndef PJ_DATUMS__ +extern struct PJ_DATUMS pj_datums[]; +extern struct PJ_PRIME_MERIDIANS pj_prime_meridians[]; +#endif + +#ifdef PJ_LIB__ + /* repeatative projection code */ +#define PROJ_HEAD(id, name) static const char des_##id [] = name +#define ENTRYA(name) \ + C_NAMESPACE_VAR const char * const pj_s_##name = des_##name; \ + C_NAMESPACE PJ *pj_##name(PJ *P) { if (!P) { \ + if( (P = (PJ*) pj_malloc(sizeof(PJ))) != NULL) { \ + P->pfree = freeup; P->fwd = 0; P->inv = 0; \ + P->spc = 0; P->descr = des_##name; +#define ENTRYX } return P; } else { +#define ENTRY0(name) ENTRYA(name) ENTRYX +#define ENTRY1(name, a) ENTRYA(name) P->a = 0; ENTRYX +#define ENTRY2(name, a, b) ENTRYA(name) P->a = 0; P->b = 0; ENTRYX +#define ENDENTRY(p) } return (p); } +#define E_ERROR(err) { pj_errno = err; freeup(P); return(0); } +#define E_ERROR_0 { freeup(P); return(0); } +#define F_ERROR { pj_errno = -20; return(xy); } +#define I_ERROR { pj_errno = -20; return(lp); } +#define FORWARD(name) static XY name(LP lp, PJ *P) { XY xy = {0.0,0.0} +#define INVERSE(name) static LP name(XY xy, PJ *P) { LP lp = {0.0,0.0} +#define FREEUP static void freeup(PJ *P) { +#define SPECIAL(name) static void name(LP lp, PJ *P, struct FACTORS *fac) +#endif +#define MAX_TAB_ID 80 +typedef struct { float lam, phi; } FLP; +typedef struct { int lam, phi; } ILP; + +struct CTABLE { + char id[MAX_TAB_ID]; /* ascii info */ + LP ll; /* lower left corner coordinates */ + LP del; /* size of cells */ + ILP lim; /* limits of conversion matrix */ + FLP *cvs; /* conversion matrix */ +}; + +typedef struct _pj_gi { + char *gridname; /* identifying name of grid, eg "conus" or ntv2_0.gsb */ + char *filename; /* full path to filename */ + + const char *format; /* format of this grid, ie "ctable", "ntv1", + "ntv2" or "missing". */ + + int grid_offset; /* offset in file, for delayed loading */ + + struct CTABLE *ct; + + struct _pj_gi *next; + struct _pj_gi *child; +} PJ_GRIDINFO; + +/* procedure prototypes */ +double dmstor(const char *, char **); +void set_rtodms(int, int); +char *rtodms(char *, double, int, int); +double adjlon(double); +double aacos(double), aasin(double), asqrt(double), aatan2(double, double); +PVALUE pj_param(paralist *, char *); +paralist *pj_mkparam(char *); +int pj_ell_set(paralist *, double *, double *); +int pj_datum_set(paralist *, PJ *); +int pj_prime_meridian_set(paralist *, PJ *); +int pj_angular_units_set(paralist *, PJ *); + +paralist *pj_clone_paralist( const paralist* ); +void pj_clear_initcache(void); +paralist*pj_search_initcache( const char *filekey ); +void pj_insert_initcache( const char *filekey, const paralist *list); + +double *pj_enfn(double); +double pj_mlfn(double, double, double, double *); +double pj_inv_mlfn(double, double, double *); +double pj_qsfn(double, double, double); +double pj_tsfn(double, double, double); +double pj_msfn(double, double, double); +double pj_phi2(double, double); +double pj_qsfn_(double, PJ *); +double *pj_authset(double); +double pj_authlat(double, double *); +COMPLEX pj_zpoly1(COMPLEX, COMPLEX *, int); +COMPLEX pj_zpolyd1(COMPLEX, COMPLEX *, int, COMPLEX *); +FILE *pj_open_lib(char *, char *); + +int pj_deriv(LP, double, PJ *, struct DERIVS *); +int pj_factors(LP, PJ *, double, struct FACTORS *); + +struct PW_COEF {/* row coefficient structure */ + int m; /* number of c coefficients (=0 for none) */ + double *c; /* power coefficients */ +}; + +/* Approximation structures and procedures */ +typedef struct { /* Chebyshev or Power series structure */ + projUV a, b; /* power series range for evaluation */ + /* or Chebyshev argument shift/scaling */ + struct PW_COEF *cu, *cv; + int mu, mv; /* maximum cu and cv index (+1 for count) */ + int power; /* != 0 if power series, else Chebyshev */ +} Tseries; +Tseries *mk_cheby(projUV, projUV, double, projUV *, projUV (*)(projUV), int, int, int); +projUV bpseval(projUV, Tseries *); +projUV bcheval(projUV, Tseries *); +projUV biveval(projUV, Tseries *); +void *vector1(int, int); +void **vector2(int, int, int); +void freev2(void **v, int nrows); +int bchgen(projUV, projUV, int, int, projUV **, projUV(*)(projUV)); +int bch2bps(projUV, projUV, projUV **, int, int); +/* nadcon related protos */ +LP nad_intr(LP, struct CTABLE *); +LP nad_cvt(LP, int, struct CTABLE *); +struct CTABLE *nad_init(char *); +struct CTABLE *nad_ctable_init( FILE * fid ); +int nad_ctable_load( struct CTABLE *, FILE * fid ); +void nad_free(struct CTABLE *); + +/* higher level handling of datum grid shift files */ + +PJ_GRIDINFO **pj_gridlist_from_nadgrids( const char *, int * ); +void pj_deallocate_grids(); + +PJ_GRIDINFO *pj_gridinfo_init( const char * ); +int pj_gridinfo_load( PJ_GRIDINFO * ); +void pj_gridinfo_free( PJ_GRIDINFO * ); + +void *proj_mdist_ini(double); +double proj_mdist(double, double, double, const void *); +double proj_inv_mdist(double, const void *); +void *pj_gauss_ini(double, double, double *,double *); +LP pj_gauss(LP, const void *); +LP pj_inv_gauss(LP, const void *); + +extern char const pj_release[]; + +struct PJ_ELLPS *pj_get_ellps_ref( void ); +struct PJ_DATUMS *pj_get_datums_ref( void ); +struct PJ_UNITS *pj_get_units_ref( void ); +struct PJ_LIST *pj_get_list_ref( void ); +struct PJ_PRIME_MERIDIANS *pj_get_prime_meridians_ref( void ); + +#ifndef DISABLE_CVSID +# define PJ_CVSID(string) static char pj_cvsid[] = string; \ +static char *cvsid_aw() { return( cvsid_aw() ? ((char *) NULL) : pj_cvsid ); } +#else +# define PJ_CVSID(string) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* end of basic projections header */ |