libgctp-1.0.orig/0000755000000000000000000000000011236644461010632 5ustar libgctp-1.0.orig/.pure0000644000000000000000000000000011236644451011573 0ustar libgctp-1.0.orig/README0000644000000000000000000000217511236644451011516 0ustar January 1995 This directory contains the source code for the new C version of the GCTP. The files nad27sp and nad83sp are used for State Plane. If there seems to be a problem with these, the files nad1927.dat and nad1983.dat can be converted from ASCII to the proper binary format by using SPLOAD. The following is a list containing the files in the geolib/source directory. Makefile README alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c aziminv.c br_gctp.c cproj.c cproj.h eqconfor.c eqconinv.c equifor.c equiinv.c for_init.c gctp.c gnomfor.c gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c haminv.c imolwfor.c imolwinv.c inv_init.c lamazfor.c lamazinv.c lamccfor.c lamccinv.c make.com merfor.c merinv.c millfor.c millinv.c molwfor.c molwinv.c nad1927.dat nad1983.dat nad27sp nad83sp obleqfor.c obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c paksz.c polyfor.c polyinv.c proj.h psfor.c psinv.c report.c robfor.c robinv.c sinfor.c sininv.c somfor.c sominv.c sphdz.c spload.f sterfor.c sterinv.c stplnfor.c stplninv.c tmfor.c tminv.c untfz.c utmfor.c utminv.c vandgfor.c vandginv.c wivfor.c wivinv.c wviifor.c wviiinv.c libgctp-1.0.orig/alberfor.c0000644000000000000000000000773011236644451012600 0ustar /******************************************************************************* NAME ALBERS CONICAL EQUAL AREA PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Albers Conical Equal Area projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan, Feb, 1992 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double c; /* constant c */ static double e3; /* eccentricity */ static double rh; /* heigth above elipsoid */ static double ns0; /* ratio between meridians */ static double lon_center; /* center longitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Albers projection -------------------------------*/ int alberforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double lat1, /* first standard parallel */ double lat2, /* second standard parallel */ double lon0, /* center longitude */ double lat0, /* center lattitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double sin_po,cos_po; /* sin and cos values */ double con; /* temporary variable */ double es,temp; /* eccentricity squared and temp var */ double ms1; /* small m 1 */ double ms2; /* small m 2 */ double qs0; /* small q 0 */ double qs1; /* small q 1 */ double qs2; /* small q 2 */ false_easting = false_east; false_northing = false_north; lon_center = lon0; if (fabs(lat1 + lat2) < EPSLN) { p_error("Equal latitudes for St. Parallels on opposite sides of equator", "alber-forinit"); return(31); } r_major = r_maj; r_minor = r_min; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e3 = sqrt(es); tsincos(lat1, &sin_po, &cos_po); con = sin_po; ms1 = msfnz(e3,sin_po,cos_po); qs1 = qsfnz(e3,sin_po,cos_po); tsincos(lat2,&sin_po,&cos_po); ms2 = msfnz(e3,sin_po,cos_po); qs2 = qsfnz(e3,sin_po,cos_po); tsincos(lat0,&sin_po,&cos_po); qs0 = qsfnz(e3,sin_po,cos_po); if (fabs(lat1 - lat2) > EPSLN) ns0 = (ms1 * ms1 - ms2 *ms2)/ (qs2 - qs1); else ns0 = con; c = ms1 * ms1 + ns0 * qs1; rh = r_major * sqrt(c - ns0 * qs0)/ns0; /* Report parameters to the user -----------------------------*/ ptitle("ALBERS CONICAL EQUAL-AREA"); radius2(r_major, r_minor); stanparl(lat1,lat2); cenlonmer(lon_center); origin(lat0); offsetp(false_easting,false_northing); return(OK); } /* Albers Conical Equal Area forward equations--mapping lat,long to x,y -------------------------------------------------------------------*/ int alberfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double sin_phi,cos_phi; /* sine and cos values */ double qs; /* small q */ double theta; /* angle */ double rh1; /* height above ellipsoid */ tsincos(lat,&sin_phi,&cos_phi); qs = qsfnz(e3,sin_phi,cos_phi); rh1 = r_major * sqrt(c - ns0 * qs)/ns0; theta = ns0 * adjust_lon(lon - lon_center); *x = rh1 * sin(theta) + false_easting; *y = rh - rh1 * cos(theta) + false_northing; return(OK); } libgctp-1.0.orig/alberinv.c0000644000000000000000000001251411236644451012602 0ustar /******************************************************************************* NAME ALBERS CONICAL EQUAL-AREA PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Albers Conical Equal Area projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan, Feb, 1992 S. Nelson Feb, 1996 Made a modification to the assignment to "con" enclosing the section 1.0 - e3 in parenthesis. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double c; /* constant c */ static double e3; /* eccentricity */ static double es; /* eccentricity squared */ static double rh; /* heigth above elipsoid */ static double ns0; /* ratio between meridians */ static double lon_center; /* center longitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Albers projection -------------------------------*/ int alberinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double lat1, /* first standard parallel */ double lat2, /* second standard parallel */ double lon0, /* center longitude */ double lat0, /* center lattitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double sin_po,cos_po; /* sine and cos values */ double con; /* temporary variable */ double temp; /* temporary variable */ double ms1; /* small m 1 */ double ms2; /* small m 2 */ double qs0; /* small q 0 */ double qs1; /* small q 1 */ double qs2; /* small q 2 */ false_easting = false_east; false_northing = false_north; lon_center = lon0; if (fabs(lat1 + lat2) < EPSLN) { p_error("Equal latitudes for Standard Parallels on opposite sides of equator" ,"alber-invinit"); return(31); } r_major = r_maj; r_minor = r_min; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e3 = sqrt(es); tsincos(lat1, &sin_po, &cos_po); con = sin_po; ms1 = msfnz(e3,sin_po,cos_po); qs1 = qsfnz(e3,sin_po,cos_po); tsincos(lat2,&sin_po,&cos_po); ms2 = msfnz(e3,sin_po,cos_po); qs2 = qsfnz(e3,sin_po,cos_po); tsincos(lat0,&sin_po,&cos_po); qs0 = qsfnz(e3,sin_po,cos_po); if (fabs(lat1 - lat2) > EPSLN) ns0 = (ms1 * ms1 - ms2 *ms2)/ (qs2 - qs1); else ns0 = con; c = ms1 * ms1 + ns0 * qs1; rh = r_major * sqrt(c - ns0 * qs0)/ns0; /* Report parameters to the user -----------------------------*/ ptitle("ALBERS CONICAL EQUAL-AREA"); radius2(r_major, r_minor); stanparl(lat1,lat2); cenlonmer(lon_center); origin(lat0); offsetp(false_easting,false_northing); return(OK); } /* Albers Conical Equal Area inverse equations--mapping x,y to lat/long -------------------------------------------------------------------*/ int alberinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh1; /* height above ellipsoid */ double qs; /* function q */ double con; /* temporary sign value */ double theta; /* angle */ long flag; /* error flag; */ flag = 0; x -= false_easting; y = rh - y + false_northing;; if (ns0 >= 0) { rh1 = sqrt(x * x + y * y); con = 1.0; } else { rh1 = -sqrt(x * x + y * y); con = -1.0; } theta = 0.0; if (rh1 != 0.0) theta = atan2(con * x, con * y); con = rh1 * ns0 / r_major; qs = (c - con * con) / ns0; if (e3 >= 1e-10) { con = 1 - .5 * (1.0 - es) * log((1.0 - e3) / (1.0 + e3))/e3; if (fabs(fabs(con) - fabs(qs)) > .0000000001 ) { *lat = phi1z(e3,qs,&flag); if (flag != 0) return(flag); } else { if (qs >= 0) *lat = .5 * PI; else *lat = -.5 * PI; } } else { *lat = phi1z(e3,qs,&flag); if (flag != 0) return(flag); } *lon = adjust_lon(theta/ns0 + lon_center); return(OK); } libgctp-1.0.orig/alconfor.c0000644000000000000000000001170211236644451012601 0ustar /******************************************************************************* NAME ALASKA CONFORMAL PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Alaska Conformal projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Alaska Conformal projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_center; /* center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ static double acoef[7]; static double bcoef[7]; static double sin_p26; static double cos_p26; static double e; static long n; /* Initialize the ALASKA CONFORMAL projection -----------------------------------------*/ int alconforint( double r_maj, /* Major axis */ double r_min, /* Minor axis */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double es; double chi; double esphi; /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; false_easting = false_east; false_northing = false_north; lon_center = -152.0 * D2R; lat_center = 64.0 * D2R; n = 6; es = .006768657997291094; e = sqrt(es); acoef[1]= 0.9945303; acoef[2]= 0.0052083; acoef[3]= 0.0072721; acoef[4]= -0.0151089; acoef[5]= 0.0642675; acoef[6]= 0.3582802; bcoef[1]= 0.0; bcoef[2]= -.0027404; bcoef[3]= 0.0048181; bcoef[4]= -0.1932526; bcoef[5]= -0.1381226; bcoef[6]= -0.2884586; esphi = e * sin(lat_center); chi = 2.0 * atan(tan((HALF_PI + lat_center)/2.0) * pow(((1.0 - esphi)/(1.0 + esphi)),(e/2.0))) - HALF_PI; tsincos(chi,&sin_p26,&cos_p26); /* Report parameters to the user -----------------------------*/ ptitle("ALASKA CONFORMAL"); radius2(r_major,r_minor); cenlon(lon_center); cenlat(lat_center); offsetp(false_easting,false_northing); return(OK); } /* ALASKA CONFORMAL forward equations--mapping lat,long to x,y ----------------------------------------------------------*/ int alconfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; double sinlon,coslon; double sinphi,cosphi; double esphi; double g; double s; double xp; double yp; double ar; double ai; double br; double bi; double arn; double ain; double chi; double r; long j; /* Forward equations -----------------*/ dlon = adjust_lon( lon - lon_center); /* caluclate x' and y' for Oblique Stereographic Proj for LAT/LONG ----------------------------------------------------------------*/ tsincos(dlon,&sinlon,&coslon); esphi = e * sin(lat); chi = 2.0 * atan(tan((HALF_PI + lat) / 2.0) * pow(((1.0 - esphi) / (1.0 + esphi)),(e/2.0))) - HALF_PI; tsincos(chi,&sinphi,&cosphi); g = sin_p26 * sinphi + cos_p26 * cosphi * coslon; s = 2.0 / (1.0 + g); xp = s * cosphi * sinlon; yp = s * (cos_p26 * sinphi - sin_p26 * cosphi * coslon); /* Use Knuth algorithm for summing complex terms, to convert Oblique Stereographic to Modified-Stereographic coord ----------------------------------------------------------*/ r = xp + xp; s = xp*xp + yp*yp; ar = acoef[n]; ai = bcoef[n]; br = acoef[n -1]; bi = bcoef[n -1]; for (j =2; j <= n; j++) { arn = br + r * ar; ain = bi + r * ai; if (j < n) { br = acoef[n - j] - s * ar; bi = bcoef[n - j] - s * ai; ar = arn; ai = ain; } } br = -s * ar; bi = -s * ai; ar = arn; ai = ain; *x = (xp * ar - yp * ai + br) * r_major + false_easting; *y = (yp * ar + xp * ai + bi) * r_major + false_northing; return(OK); } libgctp-1.0.orig/alconinv.c0000644000000000000000000001434511236644451012615 0ustar /******************************************************************************* NAME ALASKA CONFORMAL PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Alaska Conformal projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Alaska Conformal projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_center; /* center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ static double acoef[7]; static double bcoef[7]; static double sin_p26; static double cos_p26; static double e; static long n; /* Initialize the ALASKA CONFORMAL projection -----------------------------------------*/ int alconinvint( double r_maj, /* Major axis */ double r_min, /* Minor axis */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double es; double chi; double esphi; /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; false_easting = false_east; false_northing = false_north; lon_center = -152.0 * D2R; lat_center = 64.0 * D2R; n = 6; es = .006768657997291094; e = sqrt(es); acoef[1]= 0.9945303; acoef[2]= 0.0052083; acoef[3]= 0.0072721; acoef[4]= -0.0151089; acoef[5]= 0.0642675; acoef[6]= 0.3582802; bcoef[1]= 0.0; bcoef[2]= -.0027404; bcoef[3]= 0.0048181; bcoef[4]= -0.1932526; bcoef[5]= -0.1381226; bcoef[6]= -0.2884586; esphi = e * sin(lat_center); chi = 2.0 * atan(tan((HALF_PI + lat_center)/2.0) * pow(((1.0 - esphi)/(1.0 + esphi)),(e/2.0))) - HALF_PI; tsincos(chi,&sin_p26,&cos_p26); /* Report parameters to the user -----------------------------*/ ptitle("ALASKA CONFORMAL"); radius2(r_major,r_minor); cenlon(lon_center); cenlat(lat_center); offsetp(false_easting,false_northing); return(OK); } /* ALASKA CONFORMAL inverse equations--mapping x,y to lat/long ----------------------------------------------------------*/ int alconinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double esphi; double r; double s; double br; double bi; double ai; double ar; double ci; double cr; double di; double dr; double arn; double ain; double crn; double cin; double fxyr; double fxyi; double fpxyr; double fpxyi; double xp,yp; double den; double dxp; double dyp; double ds; double z; double cosz; double sinz; double rh; double chi; double dphi; double phi; long j; long nn; /* Inverse equations -----------------*/ x = (x - false_easting) / r_major; y = (y - false_northing) / r_major; xp = x; yp = y; nn = 0; /* Use Knuth algorithm for summing complex terms, to convert Modified- Stereographic conformal to Oblique Stereographic coordinates. --------------------------------------------------------------------*/ do { r = xp + xp; s = xp * xp + yp * yp; ar = acoef[n]; ai = bcoef[n]; br = acoef[n -1]; bi = bcoef[n - 1]; cr = (double) (n) * ar; ci = (double) (n) * ai; dr = (double) (n -1) * br; di = (double) (n -1) * bi; for (j = 2; j <= n; j++) { arn = br + r * ar; ain = bi + r * ai; if (j < n) { br = acoef[n -j] - s * ar; bi = bcoef[n - j] - s * ai; ar = arn; ai = ain; crn = dr + r * cr; cin = di + r * ci; dr = (double) (n - j) * acoef[n -j] - s * cr; di = (double) (n - j) * bcoef[n -j] - s * ci; cr = crn; ci = cin; } } br = -s * ar; bi = -s * ai; ar = arn; ai = ain; fxyr = xp * ar - yp * ai + br - x; fxyi = yp * ar + xp * ai + bi - y; fpxyr = xp * cr - yp * ci + dr; fpxyi = yp * cr + xp * ci + ci; den = fpxyr * fpxyr + fpxyi * fpxyi; dxp = -(fxyr * fpxyr + fxyi * fpxyi) / den; dyp = -(fxyi * fpxyr - fxyr * fpxyi) / den; xp = xp + dxp; yp = yp + dyp; ds = fabs(dxp) + fabs(dyp); nn++; if (nn > 20) { p_error("Too many iterations in inverse","alcon-inv"); return(235); } } while (ds > EPSLN); /* convert Oblique Stereographic coordinates to LAT/LONG ------------------------------------------------------*/ rh = sqrt(xp * xp + yp * yp); z = 2.0 * atan(rh / 2.0); tsincos(z,&sinz,&cosz); *lon = lon_center; if (fabs(rh) <= EPSLN) { *lat = lat_center; return(OK); } chi = asinz(cosz * sin_p26 + (yp * sinz * cos_p26) / rh); nn = 0; phi = chi; do { esphi = e * sin(phi); dphi = 2.0 * atan(tan((HALF_PI + chi) / 2.0) * pow(((1.0 + esphi) / (1.0 - esphi)),(e / 2.0))) - HALF_PI - phi; phi += dphi; nn++; if (nn > 20) { p_error("Too many iterations in inverse","alcon-inv"); return(236); } } while(fabs(dphi) > EPSLN); *lat = phi; *lon = adjust_lon (lon_center + atan2((xp * sinz), (rh * cos_p26 * cosz - yp * sin_p26 * sinz))); return(OK); } libgctp-1.0.orig/azimfor.c0000644000000000000000000000672111236644451012452 0ustar /******************************************************************************* NAME AZIMUTHAL EQUIDISTANT PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Azimuthal Equidistant projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p12; /* sin of center latitude */ static double cos_p12; /* cos of center latitude */ /* Initialize the Azimuthal projection ----------------------------------*/ int azimforint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; tsincos(center_lat,&sin_p12,&cos_p12); /* Report parameters to the user -----------------------------*/ ptitle("AZIMUTHAL EQUIDISTANT"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Azimuthal forward equations--mapping lat,long to x,y ---------------------------------------------------*/ int azimfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double sinphi, cosphi; /* sin and cos value */ double dlon; /* delta longitude value */ double coslon; /* cos of longitude */ double ksp; /* scale factor */ double g; double con; /* radius of circle */ double z; /* angle */ char mess[80]; /* error message buffer */ /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); tsincos(lat,&sinphi,&cosphi); coslon = cos(dlon); g = sin_p12 * sinphi + cos_p12 * cosphi * coslon; if (fabs(fabs(g) - 1.0) < EPSLN) { ksp = 1.0; if (g < 0.0) { con = 2.0 * HALF_PI * r_major; sprintf(mess,"Point projects into a circle of radius = %12.2lf",con); p_error(mess,"azim-for"); return(123); } } else { z = acos(g); ksp = z/ sin(z); } *x = false_easting + r_major * ksp * cosphi * sin(dlon); *y = false_northing + r_major * ksp * (cos_p12 * sinphi - sin_p12 * cosphi * coslon); return(OK); } libgctp-1.0.orig/aziminv.c0000644000000000000000000000700411236644451012453 0ustar /******************************************************************************* NAME AZIMUTHAL EQUIDISTANT PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Azimuthal Equidistant projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p12; /* sin of center latitude */ static double cos_p12; /* cos of center latitude */ /* Initialize the Azimuthal projection ----------------------------------*/ int aziminvint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; tsincos(center_lat,&sin_p12,&cos_p12); /* Report parameters to the user -----------------------------*/ ptitle("AZIMUTHAL EQUIDISTANT"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Azimuthal inverse equations--mapping x,y to lat/long ---------------------------------------------------*/ int aziminv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh; /* height above ellipsoid */ double z; /* angle */ double sinz,cosz; /* sin of z and cos of z */ double con; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; rh = sqrt(x * x + y * y); if (rh > (2.0 * HALF_PI * r_major)) { p_error("Input data error","azim-inv"); return(125); } z = rh / r_major; tsincos(z,&sinz,&cosz); *lon = lon_center; if (fabs(rh) <= EPSLN) { *lat = lat_origin; return(OK); } *lat = asinz(cosz * sin_p12 + (y * sinz * cos_p12) / rh); con = fabs(lat_origin) - HALF_PI; if (fabs(con) <= EPSLN) { if (lat_origin >= 0.0) { *lon = adjust_lon(lon_center + atan2(x , -y)); return(OK); } else { *lon = adjust_lon(lon_center - atan2(-x , y)); return(OK); } } con = cosz - sin_p12 * sin(*lat); if ((fabs(con) < EPSLN) && (fabs(x) < EPSLN)) return(OK); *lon = adjust_lon(lon_center + atan2((x * sinz * cos_p12), (con * rh))); return(OK); } libgctp-1.0.orig/bcea.h0000755000000000000000000000047511236644451011705 0ustar /* 27-June-00 AT added default radius and Ltruscale for BCEA projection */ #ifdef __cplusplus extern "C" { #endif #define PGSd_BCEA 98 #define PGSd_DEFAULT_BCEA_RADIUS 6371228.0 /*Earth radius for BCEA projection*/ #define PGSd_DEFAULT_BCEA_LTRUESCALE 30.0 /*Latitude of true scale */ #ifdef __cplusplus } #endif libgctp-1.0.orig/bceafor.c0000755000000000000000000001052311236644451012402 0ustar /******************************************************************************* NAME Cylinderical Equal Area PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Cylinderical Equal Area projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 Abe Taaheri/Emergent Info. Tech., Inc. June, 2000 Abe Taaheri/L3 Comm. Analyrics Corp. Oct. 2002 Modified to support both spherical and ellipsoid models of earth for Cylinderical Equal Area projection. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double e; /* eccentricity */ static double es; /* eccentricity squared */ static double lon_center; /* Center longitude (projection center) */ static double lat_truesc; /* Latitude of true scale */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double cosphi1; /* cos of latitude of true scale */ static double sinphi1; /* sin of latitude of true scale */ static double kz; /* K_0 for Cylinderical Equal Area proj.*/ static long ind; /* spherical flag */ /* Initialize the Cylinderical Equal Area projection -------------------------------------------------*/ int bceaforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_truesc = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); if(es < 0.00001) { ind = 1; } else { ind = 0; } cosphi1 = cos(lat_truesc); sinphi1 = sin(lat_truesc); kz = cosphi1/(sqrt(1.0 - (es*sinphi1*sinphi1))); /* Report parameters to the user -----------------------------*/ ptitle("Cylinderical Equal Area"); radius2(r_major, r_minor); cenlonmer(lon_center); true_scale(lat_truesc); offsetp(false_easting,false_northing); return(OK); } /* Cylinderical Equal Area forward equations--mapping lat,long to x,y --------------------------------------------------*/ int bceafor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; /* delta longitude value */ double sinphi; /* sin value */ double q; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); sinphi = sin(lat); if( ind != 0) /* sphere */ { *x = false_easting + r_major * dlon * cosphi1; *y = false_northing + r_major * sinphi / cosphi1; } else /* ellipsoid */ { q = (1.0 - es) * ((sinphi / (1.0 - es * sinphi * sinphi)) - (1.0 / (2.0 * e)) * log((1.0 - e * sinphi)/(1.0 + e * sinphi))); *x = false_easting + (r_major * kz * dlon); *y = false_northing + (r_major * q) / (2.0 * kz); } return(OK); } libgctp-1.0.orig/bceainv.c0000755000000000000000000001133411236644451012411 0ustar /******************************************************************************* NAME Cylinderical Equal Area PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Cylinderical Equal Area projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 Abe Taaheri/Emergent Info Tech, Inc. June, 2000 Abe Taaheri/L3 Comm. Analyrics Corp. Oct. 2002 Modified to support both spherical and ellipsoid models of earth for Cylinderical Equal Area projection. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double e; /* eccentricity */ static double es; /* eccentricity squared */ static double e_p4; /* eccentricity's 4th power */ static double e_p6; /* eccentricity's 6th power */ static double lon_center; /* Center longitude (projection center) */ static double lat_truesc; /* latitude of true scale */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double cosphi1; /* cos of latitude of true scale */ static double sinphi1; /* sin of latitude of true scale */ static double kz; /* K_0 for Cylinderical Equal Area proj.*/ static double qp; /* qp for Cylinderical Equal Area proj.*/ static long ind; /* spherical flag */ /* Initialize the Cylinderical Equal Area projection -----------------------------------*/ int bceainvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_truesc = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e_p4 = es * es; e_p6 = e_p4 *es; if(e < 0.00001) { ind = 1; qp = 2.0; } else { ind = 0; qp = (1.0 - es)*((1.0/(1.0 - es))-(1.0/(2.0*e))*log((1.0 - e)/(1.0 + e))); } cosphi1 = cos(lat_truesc); sinphi1 = sin(lat_truesc); kz = cosphi1/(sqrt(1.0 - (es*sinphi1*sinphi1))); /* Report parameters to the user -----------------------------*/ ptitle("Cylinderical Equal Area"); radius2(r_major, r_minor); cenlonmer(lon_center); true_scale(lat_truesc); offsetp(false_easting,false_northing); return(OK); } /* Cylinderical Equal Area inverse equations--mapping x,y to lat/long --------------------------------------------------*/ int bceainv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double beta; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; if( ind != 0) /* sphere */ { *lat = asin( y * cosphi1 / r_major); /* we may need to use asinz dfined in cproj.c instead of asin */ *lon = adjust_lon(lon_center + x/(r_major * cosphi1)); } else /* ellipsoid */ { beta = asin(2.0 * y * kz/(r_major * qp)); *lat = beta +(((es / 3.0) + ((31.0/180.0) * e_p4)+ ((517.0/5040.0) * e_p6)) * sin(2.0*beta))+ ((((23.0/360.0) * e_p4)+ ((251.0/3780.0) * e_p6)) * sin(4.0*beta))+ (((761.0/45360.0) * e_p6) * sin(6.0*beta)); *lon = adjust_lon(lon_center + x/(r_major * kz)); } return(OK); } libgctp-1.0.orig/br_gctp.c0000755000000000000000000000127511236644451012425 0ustar #ifdef unix /* Fortran bridge routine for the UNIX */ void gctp_(incoor,insys,inzone,inparm,inunit,indatum,ipr,efile,jpr,pfile, outcoor, outsys,outzone,outparm,outunit,fn27,fn83,iflg) double *incoor; long *insys; long *inzone; double *inparm; long *inunit; long *indatum; long *ipr; /* printout flag for error messages. 0=yes, 1=no*/ char *efile; long *jpr; /* printout flag for projection parameters 0=yes, 1=no*/ char *pfile; double *outcoor; long *outsys; long *outzone; double *outparm; long *outunit; long *iflg; { gctp(incoor,insys,inzone,inparm,inunit,indatum,ipr,efile,jpr,pfile,outcoor, outsys,outzone,outparm,outunit,fn27,fn83,iflg); return; } #endif libgctp-1.0.orig/ceafor.c0000755000000000000000000001050011236644451012233 0ustar /******************************************************************************* NAME Cylinderical Equal Area PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Cylinderical Equal Area projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE REASON ---------- ---- ------ Abe Taaheri/Emergent Info. Tech., Inc. 6/15/00 Initial version. Abe Taaheri/L3 Comm. Analyrics Corp. 1/15/03 Modified to support both spherical and ellipsoid models of earth for Cylinderical Equal Area projection. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double e; /* eccentricity */ static double es; /* eccentricity squared */ static double lon_center; /* Center longitude (projection center) */ static double lat_truesc; /* Latitude of true scale */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double cosphi1; /* cos of latitude of true scale */ static double sinphi1; /* sin of latitude of true scale */ static double kz; /* K_0 for Cylinderical Equal Area proj.*/ static long ind; /* spherical flag */ /* Initialize the Cylinderical Equal Area projection -------------------------------------------------*/ int ceaforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_truesc = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); if(es < 0.00001) { ind = 1; } else { ind = 0; } cosphi1 = cos(lat_truesc); sinphi1 = sin(lat_truesc); kz = cosphi1/(sqrt(1.0 - (es*sinphi1*sinphi1))); /* Report parameters to the user -----------------------------*/ ptitle("Cylinderical Equal Area"); radius2(r_major, r_minor); cenlonmer(lon_center); true_scale(lat_truesc); offsetp(false_easting,false_northing); return(OK); } /* Cylinderical Equal Area forward equations--mapping lat,long to x,y --------------------------------------------------*/ int ceafor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; /* delta longitude value */ double sinphi; /* sin value */ double q; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); sinphi = sin(lat); if( ind != 0) /* sphere */ { *x = false_easting + r_major * dlon * cosphi1; *y = false_northing + r_major * sinphi / cosphi1; } else /* ellipsoid */ { q = (1.0 - es) * ((sinphi / (1.0 - es * sinphi * sinphi)) - (1.0 / (2.0 * e)) * log((1.0 - e * sinphi)/(1.0 + e * sinphi))); *x = false_easting + (r_major * kz * dlon); *y = false_northing + (r_major * q) / (2.0 * kz); } return(OK); } libgctp-1.0.orig/ceainv.c0000755000000000000000000001126311236644451012250 0ustar /******************************************************************************* NAME Cylinderical Equal Area PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Cylinderical Equal Area projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE REASON ---------- ---- ------ Abe Taaheri/Emergent Info. Tech., Inc. 6/15/00 Initial version. Abe Taaheri/L3 Comm. Analyrics Corp. 1/15/03 Modified to support both spherical and ellipsoid models of earth for Cylinderical Equal Area projection. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double e; /* eccentricity */ static double es; /* eccentricity squared */ static double e_p4; /* eccentricity's 4th power */ static double e_p6; /* eccentricity's 6th power */ static double lon_center; /* Center longitude (projection center) */ static double lat_truesc; /* latitude of true scale */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double cosphi1; /* cos of latitude of true scale */ static double sinphi1; /* sin of latitude of true scale */ static double kz; /* K_0 for Cylinderical Equal Area proj.*/ static double qp; /* qp for Cylinderical Equal Area proj.*/ static long ind; /* spherical flag */ /* Initialize the Cylinderical Equal Area projection -----------------------------------*/ int ceainvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_truesc = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e_p4 = es * es; e_p6 = e_p4 *es; if(e < 0.00001) { ind = 1; qp = 2.0; } else { ind = 0; qp = (1.0 - es)*((1.0/(1.0 - es))-(1.0/(2.0*e))*log((1.0 - e)/(1.0 + e))); } cosphi1 = cos(lat_truesc); sinphi1 = sin(lat_truesc); kz = cosphi1/(sqrt(1.0 - (es*sinphi1*sinphi1))); /* Report parameters to the user -----------------------------*/ ptitle("Cylinderical Equal Area"); radius2(r_major, r_minor); cenlonmer(lon_center); true_scale(lat_truesc); offsetp(false_easting,false_northing); return(OK); } /* Cylinderical Equal Area inverse equations--mapping x,y to lat/long --------------------------------------------------*/ int ceainv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double beta; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; if( ind != 0) /* sphere */ { *lat = asinz( y * cosphi1 / r_major); /*we may need to use asinz dfined in cproj.c instead of asin */ *lon = adjust_lon(lon_center + x/(r_major * cosphi1)); } else /* ellipsoid */ { beta = asinz(2.0 * y * kz/(r_major * qp)); *lat = beta +(((es / 3.0) + ((31.0/180.0) * e_p4)+ ((517.0/5040.0) * e_p6)) * sin(2.0*beta))+ ((((23.0/360.0) * e_p4)+ ((251.0/3780.0) * e_p6)) * sin(4.0*beta))+ (((761.0/45360.0) * e_p6) * sin(6.0*beta)); *lon = adjust_lon(lon_center + x/(r_major * kz)); } return(OK); } libgctp-1.0.orig/cproj.c0000644000000000000000000002702011236644451012113 0ustar /******************************************************************************* NAME Projection support routines listed below. PURPOSE: The following functions are included in CPROJ.C. SINCOS: Calculates the sine and cosine. ASINZ: Eliminates roundoff errors. MSFNZ: Computes the constant small m for Oblique Equal Area. QSFNZ: Computes the constant small q for Oblique Equal Area. PHI1Z: Computes phi1 for Albers Conical Equal-Area. PHI2Z: Computes the latitude angle, phi2, for Lambert Conformal Conic and Polar Stereographic. PHI3Z: Computes the latitude, phi3, for Equidistant Conic. PHI4Z: Computes the latitude, phi4, for Polyconic. PAKCZ: Converts a 2 digit alternate packed DMS format to standard packed DMS format. PAKR2DM: Converts radians to 3 digit packed DMS format. TSFNZ: Computes the small t for Lambert Conformal Conic and Polar Stereographic. SIGN: Returns the sign of an argument. ADJUST_LON: Adjusts a longitude angle to range -180 to 180. E0FN, E1FN, E2FN, E3FN: Computes the constants e0,e1,e2,and e3 for calculating the distance along a meridian. E4FN: Computes e4 used for Polar Stereographic. MLFN: Computes M, the distance along a meridian. CALC_UTM_ZONE: Calculates the UTM zone number. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS July, 1991 Initial development T. Mittan, EROS May, 1993 Modified from Fortran GCTP for C GCTP S. Nelson, EROS June, 1993 Added inline comments S. Nelson, EROS Nov, 1993 Added loop counter in ADJUST_LON *******************************************************************************/ #include #include "cproj.h" #define MAX_VAL 4 #define MAXLONG 2147483647. #define DBLLONG 4.61168601e18 /* Function to calculate the sine and cosine in one call. Some computer systems have implemented this function, resulting in a faster implementation than calling each function separately. It is provided here for those computer systems which don`t implement this function ----------------------------------------------------*/ /*#ifndef sun */ void tsincos(double val, double *sin_val, double *cos_val) { *sin_val = sin(val); *cos_val = cos(val); return; } /* #endif */ /* Function to eliminate roundoff errors in asin ----------------------------------------------*/ double asinz (double con) { if (fabs(con) > 1.0) { if (con > 1.0) con = 1.0; else con = -1.0; } return(asin(con)); } /* Function to compute the constant small m which is the radius of a parallel of latitude, phi, divided by the semimajor axis. ---------------------------------------------------------------*/ double msfnz ( double eccent, double sinphi, double cosphi) { double con; con = eccent * sinphi; return((cosphi / (sqrt (1.0 - con * con)))); } /* Function to compute constant small q which is the radius of a parallel of latitude, phi, divided by the semimajor axis. ------------------------------------------------------------*/ double qsfnz ( double eccent, double sinphi, double cosphi) { double con; if (eccent > 1.0e-7) { con = eccent * sinphi; return (( 1.0- eccent * eccent) * (sinphi /(1.0 - con * con) - (.5/eccent)* log((1.0 - con)/(1.0 + con)))); } else return(2.0 * sinphi); } /* Function to compute phi1, the latitude for the inverse of the Albers Conical Equal-Area projection. -------------------------------------------*/ double phi1z ( double eccent, /* Eccentricity angle in radians */ double qs, /* Angle in radians */ long *flag) /* Error flag number */ { double eccnts; double dphi; double con; double com; double sinpi; double cospi; double phi; long i; phi = asinz(.5 * qs); if (eccent < EPSLN) return(phi); eccnts = eccent * eccent; for (i = 1; i <= 25; i++) { tsincos(phi,&sinpi,&cospi); con = eccent * sinpi; com = 1.0 - con * con; dphi = .5 * com * com / cospi * (qs / (1.0 - eccnts) - sinpi / com + .5 / eccent * log ((1.0 - con) / (1.0 + con))); phi = phi + dphi; if (fabs(dphi) <= 1e-7) return(phi); } p_error ("Convergence error","phi1z-conv"); *flag = 001; return(ERROR); } /* Function to compute the latitude angle, phi2, for the inverse of the Lambert Conformal Conic and Polar Stereographic projections. ----------------------------------------------------------------*/ double phi2z( double eccent, /* Spheroid eccentricity */ double ts, /* Constant value t */ long *flag) /* Error flag number */ { double eccnth; double phi; double con; double dphi; double sinpi; long i; *flag = 0; eccnth = .5 * eccent; phi = HALF_PI - 2 * atan(ts); for (i = 0; i <= 15; i++) { sinpi = sin(phi); con = eccent * sinpi; dphi = HALF_PI - 2 * atan(ts *(pow(((1.0 - con)/(1.0 + con)),eccnth))) - phi; phi += dphi; if (fabs(dphi) <= .0000000001) return(phi); } p_error ("Convergence error","phi2z-conv"); *flag = 002; return(002); } /* Function to compute latitude, phi3, for the inverse of the Equidistant Conic projection. -----------------------------------------------------------------*/ double phi3z( double ml, /* Constant */ double e0, /* Constant */ double e1, /* Constant */ double e2, /* Constant */ double e3, /* Constant */ long *flag) /* Error flag number */ { double phi; double dphi; long i; phi = ml; for (i = 0; i < 15; i++) { dphi = (ml + e1 * sin(2.0 * phi) - e2 * sin(4.0 * phi) + e3 * sin(6.0 * phi)) / e0 - phi; phi += dphi; if (fabs(dphi) <= .0000000001) { *flag = 0; return(phi); } } p_error("Latitude failed to converge after 15 iterations","PHI3Z-CONV"); *flag = 3; return(3); } /* Function to compute, phi4, the latitude for the inverse of the Polyconic projection. ------------------------------------------------------------*/ double phi4z ( double eccent, /* Spheroid eccentricity squared */ double e0, double e1, double e2, double e3, double a, double b, double *c, double *phi) { double sinphi; double sin2ph; double tanphi; double ml; double mlp; double con1; double con2; double con3; double dphi; long i; *phi = a; for (i = 1; i <= 15; i++) { sinphi = sin(*phi); tanphi = tan(*phi); *c = tanphi * sqrt (1.0 - eccent * sinphi * sinphi); sin2ph = sin (2.0 * *phi); /* ml = e0 * *phi - e1 * sin2ph + e2 * sin (4.0 * *phi); mlp = e0 - 2.0 * e1 * cos (2.0 * *phi) + 4.0 * e2 * cos (4.0 * *phi); */ ml = e0 * *phi - e1 * sin2ph + e2 * sin (4.0 * *phi) - e3 * sin (6.0 * *phi); mlp = e0 - 2.0 * e1 * cos (2.0 * *phi) + 4.0 * e2 * cos (4.0 * *phi) - 6.0 * e3 * cos (6.0 * *phi); con1 = 2.0 * ml + *c * (ml * ml + b) - 2.0 * a * (*c * ml + 1.0); con2 = eccent * sin2ph * (ml * ml + b - 2.0 * a * ml) / (2.0 * *c); con3 = 2.0 * (a - ml) * (*c * mlp - 2.0 / sin2ph) - 2.0 * mlp; dphi = con1 / (con2 + con3); *phi += dphi; if (fabs(dphi) <= .0000000001 ) return(OK); } p_error("Lattitude failed to converge","phi4z-conv"); return(004); } /* Function to convert 2 digit alternate packed DMS format (+/-)DDDMMSS.SSS to 3 digit standard packed DMS format (+/-)DDDMMMSSS.SSS. -----------------------------------------------------------------*/ double pakcz( double pak) /* Angle in alternate packed DMS format */ { double con; double secs; long degs,mins; char sgna; sgna = ' '; if (pak < 0.0) sgna = '-'; con = fabs (pak); degs = (long) ((con / 10000.0) + .001); con = con - degs * 10000; mins = (long) ((con / 100.0) + .001); secs = con - mins * 100; con = (double) (degs) * 1000000.0 + (double) (mins) * 1000.0 + secs; if (sgna == '-') con = - con; return(con); } /* Function to convert radians to 3 digit packed DMS format (+/-)DDDMMMSSS.SSS ----------------------------------------------------------------------------*/ double pakr2dm( double pak) /* Angle in radians */ { double con; double secs; long degs,mins; char sgna; sgna = ' '; pak *= R2D; if (pak < 0.0) sgna = '-'; con = fabs (pak); degs = (long) (con); con = (con - degs) * 60; mins = (long) con; secs = (con - mins) * 60; con = (double) (degs) * 1000000.0 + (double) (mins) * 1000.0 + secs; if (sgna == '-') con = - con; return(con); } /* Function to compute the constant small t for use in the forward computations in the Lambert Conformal Conic and the Polar Stereographic projections. --------------------------------------------------------------*/ double tsfnz( double eccent, /* Eccentricity of the spheroid */ double phi, /* Latitude phi */ double sinphi) /* Sine of the latitude */ { double con; double com; con = eccent * sinphi; com = .5 * eccent; con = pow(((1.0 - con) / (1.0 + con)),com); return (tan(.5 * (HALF_PI - phi))/con); } /* Function to return the sign of an argument ------------------------------------------*/ int sign(double x) { if (x < 0.0) return(-1); else return(1);} /* Function to adjust a longitude angle to range from -180 to 180 radians added if statments -----------------------------------------------------------------------*/ double adjust_lon( double x) /* Angle in radians */ { long count = 0; for(;;) { if (fabs(x)<=PI) break; else if (((long) fabs(x / PI)) < 2) x = x-(sign(x) *TWO_PI); else if (((long) fabs(x / TWO_PI)) < MAXLONG) { x = x-(((long)(x / TWO_PI))*TWO_PI); } else if (((long) fabs(x / (MAXLONG * TWO_PI))) < MAXLONG) { x = x-(((long)(x / (MAXLONG * TWO_PI))) * (TWO_PI * MAXLONG)); } else if (((long) fabs(x / (DBLLONG * TWO_PI))) < MAXLONG) { x = x-(((long)(x / (DBLLONG * TWO_PI))) * (TWO_PI * DBLLONG)); } else x = x-(sign(x) *TWO_PI); count++; if (count > MAX_VAL) break; } return(x); } /* Functions to compute the constants e0, e1, e2, and e3 which are used in a series for calculating the distance along a meridian. The input x represents the eccentricity squared. ----------------------------------------------------------------*/ double e0fn(double x){return(1.0-0.25*x*(1.0+x/16.0*(3.0+1.25*x)));} double e1fn(double x){return(0.375*x*(1.0+0.25*x*(1.0+0.46875*x)));} double e2fn(double x){return(0.05859375*x*x*(1.0+0.75*x));} double e3fn(double x){return(x*x*x*(35.0/3072.0));} /* Function to compute the constant e4 from the input of the eccentricity of the spheroid, x. This constant is used in the Polar Stereographic projection. --------------------------------------------------------------------*/ double e4fn(double x) { double con; double com; con = 1.0 + x; com = 1.0 - x; return (sqrt((pow(con,con))*(pow(com,com)))); } /* Function computes the value of M which is the distance along a meridian from the Equator to latitude phi. ------------------------------------------------*/ double mlfn(double e0, double e1, double e2, double e3, double phi){ return(e0*phi-e1*sin(2.0*phi)+e2*sin(4.0*phi)-e3*sin(6.0*phi));} /* Function to calculate UTM zone number--NOTE Longitude entered in DEGREES!!! ---------------------------------------------------------------------------*/ long calc_utm_zone(double lon) { return((long)(((lon + 180.0) / 6.0) + 1.0)); } libgctp-1.0.orig/cproj.h0000644000000000000000000000151411236644451012120 0ustar #include #ifdef __cplusplus extern "C" { #endif #define PI 3.141592653589793238 #define HALF_PI (PI*0.5) #define TWO_PI (PI*2.0) #define EPSLN 1.0e-10 #define R2D 57.2957795131 /* #define D2R 0.0174532925199 */ #define D2R 1.745329251994328e-2 #define S2R 4.848136811095359e-6 #define OK 0 #define ERROR -1 #define IN_BREAK -2 /* Misc macros -----------*/ #define SQUARE(x) ((x) * (x)) /* x**2 */ #define CUBE(x) ((x) * (x) * (x)) /* x**3 */ #define QUAD(x) ((x) * (x) * (x) * (x)) /* x**4 */ #define GMAX(A, B) ((A) > (B) ? (A) : (B)) /* assign maximum of a and b */ #define GMIN(A, B) ((A) < (B) ? (A) : (B)) /* assign minimum of a and b */ #define IMOD(A, B) (A) - (((A) / (B)) * (B)) /* Integer mod function */ #include "cproj_prototypes.h" #ifdef __cplusplus } #endif libgctp-1.0.orig/cproj_prototypes.h0000755000000000000000000000477211236644451014444 0ustar /*-------------------------------------------------------------------------*/ /* */ /* COPYRIGHT[copyright mark] 1999, Raytheon Systems Company, its vendors, */ /* and suppliers. ALL RIGHTS RESERVED. */ /* */ /*-------------------------------------------------------------------------*/ /***************************************************************************** BEGIN_FILE_PROLOG: FILENAME: cproj_prototypes.h DESCRIPTION: This file contains function prototypes that are specific to the GCT Tools AUTHOR: Ray Milburn / Steven Myers & Associates HISTORY: 28-Jan-99 RM Initial version 02-Jul-03 Abe Taaheri Modified END_FILE_PROLOG: *****************************************************************************/ #ifndef cproj_prototypes_h #define cproj_prototypes_h #include "gctp_prototypes.h" /***************************************************************** Function prototypes. *****************************************************************/ void p_error(char *what, char *where); void ptitle(char *A); void tsincos(double val, double *sin_val, double *cos_val); double msfnz(double eccent, double sinphi, double cosphi); double qsfnz(double eccent, double sinphi, double cosphi); double tsfnz(double eccent, double phi, double sinphi); void radius2(double A, double B); void radius(double A); void stanparl(double A, double B); void cenlonmer(double A); void cenlon(double A); void cenlat(double A); void true_scale(double A); void origin(double A); void offsetp(double A, double B); double adjust_lon(double x); double phi1z(double eccent, double qs, long *flag); double phi2z(double eccent, double ts, long *flag); double phi3z(double ml, double e0, double e1, double e2, double e3, long *flag); double phi4z(double eccent, double e0, double e1, double e2, double e3, double a, double b, double *c, double *phi); double asinz(double con); int sign(double x); double e0fn(double x); double e1fn(double x); double e2fn(double x); double e3fn(double x); double e4fn(double x); double mlfn(double e0, double e1, double e2, double e3, double phi); double paksz(double ang, long *iflg); double pakcz(double pak); void stparl1(double A); void genrpt(double A, char *S); void genrpt_long(long A, char *S); void pblank(); int sphdz(long isph,double *parm,double *r_major,double *r_minor,double *radius); #endif libgctp-1.0.orig/eqconfor.c0000644000000000000000000001022111236644451012605 0ustar /******************************************************************************* NAME EQUIDISTANT CONIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Equidistant Conic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double e0,e1,e2,e3; /* eccentricity constants */ static double e,es; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double ns; static double g; static double rh; /* Initialize the Equidistant Conic projection ------------------------------------------*/ int eqconforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double lat1, /* latitude of standard parallel*/ double lat2, /* latitude of standard parallel*/ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north, /* y offset in meters */ long mode) /* which format is present A B */ { double temp; /* temporary variable */ double sinphi,cosphi; /* sin and cos values */ double ms1,ms2; double ml1,ml2; /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); tsincos(lat1,&sinphi,&cosphi); ms1 = msfnz(e,sinphi,cosphi); ml1 = mlfn(e0, e1, e2, e3, lat1); /* format B ---------*/ if (mode != 0) { if (fabs(lat1 + lat2) < EPSLN) { p_error("Standard Parallels on opposite sides of equator","eqcon_for"); return(81); } tsincos(lat2,&sinphi,&cosphi); ms2 = msfnz(e,sinphi,cosphi); ml2 = mlfn(e0, e1, e2, e3, lat2); if (fabs(lat1 - lat2) >= EPSLN) ns = (ms1 - ms2) / (ml2 - ml1); else ns = sinphi; } else ns = sinphi; g = ml1 + ms1/ns; ml0 = mlfn(e0, e1, e2, e3, center_lat); rh = r_major * (g - ml0); /* Report parameters to the user -----------------------------*/ if (mode != 0) { ptitle("EQUIDISTANT CONIC"); radius2(r_major, r_minor); stanparl(lat1,lat2); cenlonmer(lon_center); origin(center_lat); offsetp(false_easting,false_northing); } else { ptitle("EQUIDISTANT CONIC"); radius2(r_major, r_minor); stparl1(lat1); cenlonmer(lon_center); origin(center_lat); offsetp(false_easting,false_northing); } return(OK); } /* Equidistant Conic forward equations--mapping lat,long to x,y -----------------------------------------------------------*/ int eqconfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double ml; double theta; double rh1; /* Forward equations -----------------*/ ml = mlfn(e0, e1, e2, e3, lat); rh1 = r_major * (g - ml); theta = ns * adjust_lon(lon - lon_center); *x = false_easting + rh1 * sin(theta); *y = false_northing + rh - rh1 * cos(theta); return(OK); } libgctp-1.0.orig/eqconinv.c0000644000000000000000000001060111236644451012615 0ustar /******************************************************************************* NAME EQUIDISTANT CONIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Equidistant Conic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double e0,e1,e2,e3; /* eccentricity constants */ static double e,es; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double ns; static double g; static double rh; /* Initialize the Equidistant Conic projection ------------------------------------------*/ int eqconinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double lat1, /* latitude of standard parallel*/ double lat2, /* latitude of standard parallel*/ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north, /* y offset in meters */ long mode) /* which format is present A B */ { double temp; /* temporary variable */ double sinphi,cosphi; /* sin and cos values */ double ms1,ms2; double ml1,ml2; /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); tsincos(lat1,&sinphi,&cosphi); ms1 = msfnz(e,sinphi,cosphi); ml1 = mlfn(e0, e1, e2, e3, lat1); /* format B ---------*/ if (mode != 0) { if (fabs(lat1 + lat2) < EPSLN) { p_error("Standard Parallels on opposite sides of equator","eqcon-for"); return(81); } tsincos(lat2,&sinphi,&cosphi); ms2 = msfnz(e,sinphi,cosphi); ml2 = mlfn(e0, e1, e2, e3, lat2); if (fabs(lat1 - lat2) >= EPSLN) ns = (ms1 - ms2) / (ml2 - ml1); else ns = sinphi; } else ns = sinphi; g = ml1 + ms1/ns; ml0 = mlfn(e0, e1, e2, e3, center_lat); rh = r_major * (g - ml0); /* Report parameters to the user -----------------------------*/ if (mode != 0) { ptitle("EQUIDISTANT CONIC"); radius2(r_major, r_minor); stanparl(lat1,lat2); cenlonmer(lon_center); origin(center_lat); offsetp(false_easting,false_northing); } else { ptitle("EQUIDISTANT CONIC"); radius2(r_major, r_minor); stparl1(lat1); cenlonmer(lon_center); origin(center_lat); offsetp(false_easting,false_northing); } return(OK); } /* Equidistant Conic inverse equations--mapping x,y to lat/long -----------------------------------------------------------*/ int eqconinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh1; double ml; double con; double theta; long flag; /* Inverse equations -----------------*/ flag = 0; x -= false_easting; y = rh - y + false_northing; if (ns >= 0) { rh1 = sqrt(x * x + y * y); con = 1.0; } else { rh1 = -sqrt(x * x + y * y); con = -1.0; } theta = 0.0; if (rh1 != 0.0) theta = atan2(con * x, con * y); ml = g - rh1 / r_major; *lat = phi3z(ml,e0,e1,e2,e3,&flag); *lon = adjust_lon(lon_center + theta / ns); if (flag != 0) return(flag); else return(OK); } libgctp-1.0.orig/equifor.c0000644000000000000000000000516711236644451012460 0ustar /******************************************************************************* NAME EQUIRECTANGULAR PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Equirectangular projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the Equirectangular projection ----------------------------------------*/ int equiforint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double lat1, /* latitude of true scale */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = lat1; false_northing = false_north; false_easting = false_east; /* Report parameters to the user -----------------------------*/ ptitle("EQUIRECTANGULAR"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Equirectangular forward equations--mapping lat,long to x,y ---------------------------------------------------------*/ int equifor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; /* delta longitude value */ /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); *x = false_easting + r_major * dlon * cos(lat_origin); *y = false_northing + r_major * lat; return(OK); } libgctp-1.0.orig/equiinv.c0000644000000000000000000000524711236644451012465 0ustar /******************************************************************************* NAME EQUIRECTANGULAR PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Equirectangular projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the Equirectangular projection ----------------------------------------*/ int equiinvint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double lat1, /* latitude of true scale */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = lat1; false_northing = false_north; false_easting = false_east; /* Report parameters to the user -----------------------------*/ ptitle("EQUIRECTANGULAR"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Equirectangular inverse equations--mapping x,y to lat/long ---------------------------------------------------------*/ int equiinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; *lat = y / r_major; if (fabs(*lat) > HALF_PI) { p_error("Input data error","equi-inv"); return(174); } *lon = adjust_lon(lon_center + x / (r_major * cos(lat_origin))); return(OK); } libgctp-1.0.orig/for_init.c0000644000000000000000000006024411236644451012614 0ustar /******************************************************************************* NAME FOR_INIT PURPOSE: Initializes forward projection transformation parameters PROGRAMMER DATE REASON ---------- ---- ------ T. Mittan 3-09-93 Initial Development S. Nelson 11-94 Added Clarke spheroid default to UTM Raj Gejjagaraguppe(ARC) 8-30-96 Landsat Ratio is removed as hard coded value. Now this ratio can be an input from the user through the projection parameter array element number 9. Raj Gejjagaraguppe(ARC) 1-07-97 Added a new projection type called Integerized Sinusoidal Grid to support MODIS level 3 datasets. D. Wynne(ARC) 3-24-97 Added Support for Power Challenge (R10000 Processor Chip Revision: 2.5) Long is 8 bytes, on all other currently supported platforms Long is 4 bytes. Abe Taaheri 06-27-00 Added a new projection type called Behrmann Cylinderical Equal Area to support EASE grid. Abe Taaheri 10-23-00 Updated for ISINUS projection, so that both codes 31 and 99 (i.e. ISINUS and ISINUS1) can be used for this projection. Abe Taaheri 1-15-03 Modified to support both spherical and ellipsoid models of earth for Normal Cylinderical Equal Area projection. Abe Taaheri 8-15-03 Added CEA projection. This is used by generalized EASE grid, when the EASE grid corners are specified in meters (Note that BCEA is similar projection and used when EASE grid corners are set in packed DMS degrees. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" #include "proj.h" int for_init( int outsys, /* output system code */ int outzone, /* output zone number */ double *outparm, /* output array of projection parameters */ int outdatum, /* output datum */ char *fn27, /* NAD 1927 parameter file */ char *fn83, /* NAD 1983 parameter file */ int *iflg, /* status flag */ int (*for_trans[])(double, double, double *, double *)) /* forward function pointer */ { long zone; /* zone number */ double azimuth; /* azimuth */ double alf; /* SOM angle */ double angle; /* rotation anlge */ double lon1; /* longitude point in utm scene */ double lon2; /* 2nd longitude */ double lat1; /* 1st standard parallel */ double lat2; /* 2nd standard parallel */ double center_long; /* center longitude */ double center_lat; /* center latitude */ double h; /* height above sphere */ double lon_origin; /* longitude at origin */ double lat_origin; /* latitude at origin */ double r_major; /* major axis in meters */ double r_minor; /* minor axis in meters */ double scale_factor; /* scale factor */ double false_easting; /* false easting in meters */ double false_northing; /* false northing in meters */ double shape_m; /* constant used for Oblated Equal Area */ double shape_n; /* constant used for Oblated Equal Area */ long start; /* where SOM starts beginning or end */ double time; /* SOM time */ double radius; /* radius of sphere */ long tmpdatum; /* temporary datum for UTM */ long path; /* SOM path number */ long satnum; /* SOM satellite number */ long mode; /* which initialization method to use A or B */ double sat_ratio; /* satellite ratio which specify the start point*/ double dzone; /* number of longitudinal zones in ISG */ double djustify; /* justify flag in ISG projection */ long thing; /* used to initialize 8 byte pointer, added */ /* for Power Challenge */ long *iflg64; /* 8 byte status flag, for Power Challenge */ thing = 0; /* These lines are to initialize the */ iflg64 = &thing; /* the 8-byte pointer address */ /* Initialize forward transformations -----------------------------------*/ /* find the correct major and minor axis --------------------------------------*/ if(outsys == CEA) { if(outparm[0] > 0.0 || outparm[0] < 0.0 || outparm[1] > 0.0 || outparm[1] < 0.0) { outdatum = -20; } sphdz(outdatum,outparm,&r_major,&r_minor,&radius); } else if(outsys == BCEA) { if(outparm[0] > 0.0 || outparm[0] < 0.0 || outparm[1] > 0.0 || outparm[1] < 0.0) { outdatum = -20; } else /* for BCEA use 6371228.0 m as default for r_maj and r_min, i.e. use spherical earth model with radius 6371228.0 m instead of Clarke 1866 spheroid */ { outdatum = 20; } sphdz(outdatum,outparm,&r_major,&r_minor,&radius); } else { sphdz(outdatum,outparm,&r_major,&r_minor,&radius); } false_easting = outparm[6]; false_northing = outparm[7]; if (outsys == CEA)/* Cylindrical Equal-Area, used for EASE grid wghen grid corners are specified in meters */ { /* this is the call to initialize CEA ----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR;; *iflg64 = ceaforint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = ceafor; } else if (outsys == BCEA)/* Cylindrical Equal-Area, used for EASE grid wghen grid corners are specified in DMS degrees */ { /* this is the call to initialize BCEA ----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR;; *iflg64 = bceaforint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = bceafor; } else if (outsys == UTM) { /* this is the call to initialize U T M -------------------------------------*/ /* set Clarke 1866 spheroid if negative datum code ----------------------------------------------*/ if (outdatum < 0) { tmpdatum = 0; sphdz(tmpdatum,outparm,&r_major,&r_minor,&radius); } zone = outzone; if (zone == 0) { lon1 = paksz(outparm[0],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[1],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; zone = calc_utm_zone(lon1 * R2D); if (lat1 < 0) zone = -zone; } scale_factor = .9996; *iflg64 = utmforint(r_major,r_minor,scale_factor,zone); *iflg = *iflg64; for_trans[outsys] = utmfor; } else if (outsys == SPCS) { /* this is the call to initialize STATE PLANE -------------------------------------------*/ *iflg64 = stplnforint(outzone,outdatum,fn27,fn83); *iflg = *iflg64; if (*iflg64 != 0) return ERROR; for_trans[outsys] = stplnfor; } else if (outsys == ALBERS) { /* this is the call to initialize ALBERS CONICAL EQUAL AREA ----------------------------------------------------------*/ lat1 = paksz(outparm[2],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(outparm[3],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = alberforint(r_major,r_minor,lat1,lat2,center_long,lat_origin, false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = alberfor; } else if (outsys == LAMCC) { /* this is the call to initialize LAMBERT CONFORMAL CONIC --------------------------------------------------------*/ lat1 = paksz(outparm[2],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(outparm[3],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = lamccforint(r_major,r_minor,lat1,lat2,center_long,lat_origin, false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = lamccfor; } else if (outsys == MERCAT) { /* this is the call to initialize MERCATOR ----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = merforint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = merfor; } else if (outsys == PS) { /* this is the call to initialize POLAR STEREOGRAPHIC ----------------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = (int) *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = psforint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = psfor; } else if (outsys == POLYC) { /* this is the call to initialize POLYCONIC -----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = polyforint(r_major,r_minor,center_long,lat_origin,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = polyfor; } else if (outsys == EQUIDC) { /* this is the call to initialize EQUIDISTANT CONIC -------------------------------------------------*/ lat1 = paksz(outparm[2],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(outparm[3],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; if (outparm[8] == 0) mode = 0; else mode = 1; *iflg64 = eqconforint(r_major,r_minor,lat1,lat2,center_long,lat_origin, false_easting,false_northing,mode); *iflg = *iflg64; for_trans[outsys] = eqconfor; } else if (outsys == TM) { /* this is the call to initialize TRANSVERSE MECTAR -------------------------------------------------*/ scale_factor = outparm[2]; center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = tmforint(r_major,r_minor,scale_factor,center_long,lat_origin, false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = tmfor; } else if (outsys == STEREO) { /* this is the call to initialize STEREOGRAPHIC ---------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = sterforint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = sterfor; } else if (outsys == LAMAZ) { /* this is the call to initialize LAMBERT AZIMUTHAL -------------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = lamazforint(radius,center_long, center_lat,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = lamazfor; } else if (outsys == AZMEQD) { /* this is the call to initialize AZIMUTHAL EQUIDISTANT -----------------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = azimforint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = azimfor; } else if (outsys == GNOMON) { /* this is the call to initialize GNOMONIC ----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = gnomforint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = gnomfor; } else if (outsys == ORTHO) { /* this is the call to initalize ORTHOGRAPHIC -------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = orthforint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = orthfor; } else if (outsys == GVNSP) { /* this is the call to initalize GENERAL VERTICAL NEAR-SIDE PERSPECTIVE ----------------------------------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; h = outparm[2]; *iflg64 = gvnspforint(radius,h,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; for_trans[outsys] = gvnspfor; } else if (outsys == SNSOID) { /* this is the call to initialize SINUSOIDAL -------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = sinforint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = sinfor; } else if (outsys == EQRECT) { /* this is the call to initialize EQUIRECTANGULAR -----------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = equiforint(radius,center_long,lat1,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = equifor; } else if (outsys == MILLER) { /* this is the call to initialize MILLER CYLINDRICAL --------------------------------------------------*/ center_long = paksz(outparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = millforint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = millfor; } else if (outsys == VGRINT) { /* this is the call to initialize VAN DER GRINTEN -----------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = vandgforint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = vandgfor; } else if (outsys == HOM) { /* this is the call to initialize HOTLINE OBLIQUE MERCATOR ---------------------------------------------------------*/ scale_factor = outparm[2]; lat_origin = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; if (outparm[12] != 0) { mode = 1; azimuth = paksz(outparm[3],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lon_origin = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; } else { mode = 0; lon1 = paksz(outparm[8],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(outparm[9],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lon2 = paksz(outparm[10],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(outparm[11],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; } *iflg64 = omerforint(r_major,r_minor,scale_factor,azimuth,lon_origin, lat_origin,false_easting, false_northing,lon1,lat1, lon2,lat2,mode); *iflg = *iflg64; for_trans[outsys] = omerfor; } else if (outsys == SOM) { /* this is the call to initialize SOM -----------------------------------*/ path = (long) outparm[3]; satnum = (long) outparm[2]; if (outparm[12] == 0) { mode = 1; alf = paksz(outparm[3],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lon1 = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; time = outparm[8]; sat_ratio = outparm[9]; start = (long) outparm[10]; } else mode = 0; /* *iflg64 = somforint(r_major,r_minor,satnum,path,false_easting,false_northing); *iflg = *iflg64; */ *iflg64 = somforint(r_major,r_minor,satnum,path,alf,lon1,false_easting, false_northing,time,start,mode,sat_ratio); *iflg = *iflg64; for_trans[outsys] = somfor; } else if (outsys == HAMMER) { /* this is the call to initialize HAMMER --------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = hamforint(radius,center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = hamfor; } else if (outsys == ROBIN) { /* this is the call to initialize ROBINSON ----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = robforint(radius,center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = robfor; } else if (outsys == GOODE) { /* this is the call to initialize GOODE'S HOMOLOSINE ---------------------------------------------------*/ *iflg64 = goodforint(radius); *iflg = *iflg64; for_trans[outsys] = goodfor; } else if (outsys == MOLL) { /* this is the call to initialize MOLLWEIDE ------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = molwforint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = molwfor; } else if (outsys == IMOLL) { /* this is the call to initialize INTERRUPTED MOLLWEIDE -----------------------------------------------------*/ *iflg64 = imolwforint(radius); *iflg = *iflg64; for_trans[outsys] = imolwfor; } else if (outsys == ALASKA) { /* this is the call to initialize ALASKA CONFORMAL ------------------------------------------------*/ *iflg64 = alconforint(r_major,r_minor,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = alconfor; } else if (outsys == WAGIV) { /* this is the call to initialize WAGNER IV -----------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = wivforint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = wivfor; } else if (outsys == WAGVII) { /* this is the call to initialize WAGNER VII ------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = wviiforint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = wviifor; } else if (outsys == OBEQA) { /* this is the call to initialize OBLATED EQUAL AREA ---------------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(outparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; shape_m = outparm[2]; shape_n = outparm[3]; angle = paksz(outparm[8],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = obleqforint(radius,center_long,center_lat,shape_m, shape_n, angle,false_easting,false_northing); *iflg = *iflg64; for_trans[outsys] = obleqfor; } else if ((outsys == ISINUS) || (outsys == ISINUS1)) { /* this is the call to initialize INTEGERIZED SINUSOIDAL GRID ------------------------------------------------------------*/ center_long = paksz(outparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; dzone = outparm[8]; djustify = outparm[10]; *iflg64 = isinusforinit(radius, center_long, false_easting, false_northing, dzone, djustify); *iflg = *iflg64; for_trans[outsys] = isinusfor; } return OK; } libgctp-1.0.orig/gctp.c0000644000000000000000000002432711236644451011742 0ustar /******************************************************************************* NAME GCTP VERSION PROGRAMMER DATE ------- ---------- ---- T. Mittan 2-26-93 Conversion from FORTRAN to C S. Nelson 12-14-93 Added assignments to inunit and outunit for State Plane purposes. c.1.0 S. Nelson 9-15-94 Added outdatum parameter call. c.1.1 S. Nelson 11-94 Modified code so that UTM can accept any spheroid code. Changed State Plane legislated distance units, for NAD83, to be consistant with FORTRAN version of GCTP. Unit codes are specified by state laws as of 2/1/92. DaW 22-10-97 Changed all "return;" to "return(0);". The SGI 64-bit platform complained about no return values. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include "cproj.h" #include "proj.h" #define TRUE 1 #define FALSE 0 static long iter = 0; /* First time flag */ static long inpj[MAXPROJ + 1]; /* input projection array */ static long indat[MAXPROJ + 1]; /* input dataum array */ static long inzn[MAXPROJ + 1]; /* input zone array */ static double pdin[MAXPROJ + 1][15]; /* input projection parm array */ static long outpj[MAXPROJ + 1]; /* output projection array */ static long outdat[MAXPROJ + 1]; /* output dataum array */ static long outzn[MAXPROJ + 1]; /* output zone array */ static double pdout[MAXPROJ + 1][15]; /* output projection parm array */ static long (*for_trans[MAXPROJ + 1])();/* forward function pointer array*/ static long (*inv_trans[MAXPROJ + 1])();/* inverse function pointer array*/ /* Table of unit codes as specified by state laws as of 2/1/92 for NAD 1983 State Plane projection, 1 = U.S. Survey Feet, 2 = Meters, 5 = International Feet */ static long NADUT[134] = {1, 5, 1, 1, 5, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 5, 2, 1, 2, 5, 1, 2, 2, 2, 1, 1, 1, 5, 2, 1, 5, 2, 2, 5, 2, 1, 1, 5, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2}; /* static long NAD83[134] = {101,102,5010,5300,201,202,203,301,302,401,402,403, 404,405,406,0000,501,502,503,600,700,901,902,903,1001,1002, 5101,5102,5103,5104,5105,1101,1102,1103,1201,1202,1301,1302, 1401,1402,1501,1502,1601,1602,1701,1702,1703,1801,1802,1900, 2001,2002,2101,2102,2103,2111,2112,2113,2201,2202,2203,2301, 2302,2401,2402,2403,2500,0000,0000,2600,0000,2701,2702,2703, 2800,2900,3001,3002,3003,3101,3102,3103,3104,3200,3301,3302, 3401,3402,3501,3502,3601,3602,3701,3702,3800,3900,0000,4001, 4002,4100,4201,4202,4203,4204,4205,4301,4302,4303,4400,4501, 4502,4601,4602,4701,4702,4801,4802,4803,4901,4902,4903,4904, 5001,5002,5003,5004,5005,5006,5007,5008,5009,5200,0000,5400}; */ gctp(incoor,insys,inzone,inparm,inunit,indatum,ipr,efile,jpr,pfile,outcoor, outsys,outzone,outparm,outunit,outdatum,fn27,fn83,iflg) double *incoor; /* input coordinates */ long *insys; /* input projection code */ long *inzone; /* input zone number */ double *inparm; /* input projection parameter array */ long *inunit; /* input units */ long *indatum; /* input datum */ long *ipr; /* printout flag for error messages. 0=screen, 1=file, 2=both*/ char *efile; /* error file name */ long *jpr; /* printout flag for projection parameters 0=screen, 1=file, 2 = both*/ char *pfile; /* error file name */ double *outcoor; /* output coordinates */ long *outdatum; /* output datum */ long *outsys; /* output projection code */ long *outzone; /* output zone */ double *outparm; /* output projection array */ long *outunit; /* output units */ char fn27[]; /* file name of NAD 1927 parameter file */ char fn83[]; /* file name of NAD 1983 parameter file */ long *iflg; /* error flag */ { double x; /* x coordinate */ double y; /* y coordinate */ double factor; /* conversion factor */ double lon; /* longitude */ double lat; /* latitude */ /*double temp; */ /* dummy variable */ double pakr2dm(); long i,j; /* loop counters */ long ininit_flag; /* input initilization flag */ long outinit_flag; /* output initilization flag */ /*long ind;*/ /* temporary var used to find state plane zone */ long unit; /* temporary unit variable */ double dummy[15]; /* temporary projection array */ /* setup initilization flags and output message flags ---------------------------------------------------*/ ininit_flag = FALSE; outinit_flag = FALSE; *iflg = 0; *iflg = init(*ipr,*jpr,efile,pfile); if (*iflg != 0) return(0); /* check to see if initilization is required only the first 13 projection parameters are currently used. If more are added the loop should be increased. ---------------------------------------------------------*/ if (iter == 0) { for (i = 0; i < MAXPROJ + 1; i++) { inpj[i] = 0; indat[i] = 0; inzn[i] = 0; outpj[i] = 0; outdat[i] = 0; outzn[i] = 0; for (j = 0; j < 15; j++) { pdin[i][j] = 0.0; pdout[i][j] = 0.0; } } ininit_flag = TRUE; outinit_flag = TRUE; iter = 1; } else { if (*insys != GEO) { if ((inzn[*insys] != *inzone) || (indat[*insys] != *indatum) || (inpj[*insys] != *insys) || (*insys == 2)) { ininit_flag = TRUE; } else for (i = 0; i < 13; i++) if (pdin[*insys][i] != inparm[i]) { ininit_flag = TRUE; break; } } if (*outsys != GEO) { if ((outzn[*outsys] != *outzone) || (outdat[*outsys] != *outdatum) || (outpj[*outsys] != *outsys) || (*outsys == 2)) { outinit_flag = TRUE; } else for (i = 0; i < 13; i++) if (pdout[*outsys][i] != outparm[i]) { outinit_flag = TRUE; break; } } } /* Check input and output projection numbers ------------------------------------------*/ if ((*insys < 0) || (*insys > MAXPROJ)) { p_error("Insys is illegal","GCTP-INPUT"); *iflg = 1; return(0); } if ((*outsys < 0) || (*outsys > MAXPROJ)) { p_error("Outsys is illegal","GCTP-OUTPUT"); *iflg = 2; return(0); } /* find the correct conversion factor for units ---------------------------------------------*/ unit = *inunit; /* use legislated unit table for State Plane -------------------------------------------*/ if ((*indatum == 0) && (*insys == 2) && (*inunit == 6)) unit = 1; if ((*indatum == 8) && (*insys == 2) && (*inunit == 6)) unit = NADUT[(*inzone)/100]; /* find the factor unit conversions --------------------------------*/ if (*insys == GEO) *iflg = untfz(unit,0,&factor); else *iflg = untfz(unit,2,&factor); if (*insys == SPCS) *inunit = unit; if (*iflg != 0) { close_file(); return(0); } x = incoor[0] * factor; y = incoor[1] * factor; /* Initialize inverse transformation ----------------------------------*/ if (ininit_flag) { inpj[*insys] = *insys; indat[*insys] = *indatum; inzn[*insys] = *inzone; for (i = 0;i < 15; i++) pdin[*insys][i] = inparm[i]; if (*insys == 1) { for( i = 2; i < 15; i++) dummy[i] = inparm[i]; dummy[0] = 0; dummy[1] = 0; if ((*inzone != 0) || (inparm[0] == 0.0)) { dummy[0] = 1.0e6 * (double)(6 * *inzone -183); if ( *inzone >= 0) dummy[1] = 4.0e7; else dummy[1] = -4.0e7; } else { dummy[0] = inparm[0]; dummy[1] = inparm[1]; } inv_init(*insys,*inzone,dummy,*indatum,fn27,fn83,iflg,inv_trans); } else inv_init(*insys,*inzone,inparm,*indatum,fn27,fn83,iflg,inv_trans); if (*iflg != 0) { close_file(); return(0); } } /* Do actual transformations --------------------------*/ /* Inverse transformations ------------------------*/ if (*insys == GEO) { lon = x; lat = y; } else if ((*iflg = inv_trans[*insys](x, y, &lon, &lat)) != 0) { close_file(); return(0); } /* DATUM conversion should go here --------------------------------*/ /* The datum conversion facilities should go here */ /* Initialize forward transformation ----------------------------------*/ if (outinit_flag) { outpj[*outsys] = *outsys; outdat[*outsys] = *outdatum; outzn[*outsys] = *outzone; for (i = 0;i < 15; i++) pdout[*outsys][i] = outparm[i]; if (*outsys == 1) { for (i = 2; i < 15; i++) dummy[i] = outparm[i]; dummy[0] = 0; dummy[1] = 0; if (outparm[0] == 0.0) { dummy[0] = pakr2dm(lon); dummy[1] = pakr2dm(lat); } else { dummy[0] = outparm[0]; dummy[1] = outparm[1]; } for_init(*outsys,*outzone,dummy,*outdatum,fn27,fn83,iflg,for_trans); } else for_init(*outsys,*outzone,outparm,*outdatum,fn27,fn83,iflg,for_trans); if (*iflg != 0) { close_file(); return(0); } } /* Forward transformations ------------------------*/ if (*outsys == GEO) { outcoor[0] = lon; outcoor[1] = lat; } else if ((*iflg = for_trans[*outsys](lon, lat, &outcoor[0], &outcoor[1])) != 0) { close_file(); return(0); } /* find the correct conversion factor for units ---------------------------------------------*/ unit = *outunit; /* use legislated unit table ----------------------------*/ if ((*outdatum == 0) && (*outsys == 2) && (*outunit == 6)) unit = 1; if ((*outdatum == 8) && (*outsys == 2) && (*outunit == 6)) unit = NADUT[(*outzone)/100]; if (*outsys == GEO) *iflg = untfz(0,unit,&factor); else *iflg = untfz(2,unit,&factor); if (*outsys == SPCS) *outunit = unit; outcoor[0] *= factor; outcoor[1] *= factor; close_file(); return(0); } libgctp-1.0.orig/gctp_prototypes.h0000755000000000000000000003234411236644451014260 0ustar /*-------------------------------------------------------------------------*/ /* */ /* COPYRIGHT[copyright mark] 1999, Raytheon Systems Company, its vendors, */ /* and suppliers. ALL RIGHTS RESERVED. */ /* */ /*-------------------------------------------------------------------------*/ /***************************************************************************** BEGIN_FILE_PROLOG: FILENAME: gctp_prototypes.H DESCRIPTION: This file contains function prototypes that are specific to the GCT Tools AUTHOR: Ray Milburn / Steven Myers & Associates Abe Taaheri / Emergent Information Tecnologies, Inc. HISTORY: 28-Jan-99 RM Initial version 27-June-00 AT added function prototypes for CEA projection END_FILE_PROLOG: *****************************************************************************/ #ifndef gctp_prototypes_h #define gctp_prototypes_h #ifndef PGS_GCT_Prototypes_h /***************************************************************** Function prototypes. *****************************************************************/ int stplnfor(double lon, double lat, double *x, double *y); int stplninv(double x, double y, double *lon, double *lat); int stplnforint(long zone, long sphere, char *fn27, char *fn83); int stplninvint(long zone, long sphere, char *fn27, char *fn83); int alberfor(double lon, double lat, double *x, double *y); int alberinv(double x, double y, double *lon, double *lat); int alberforint(double r_maj, double r_min, double lat1, double lat2, double lon0, double lat0, double false_east, double false_north); int alberinvint(double r_maj, double r_min, double lat1, double lat2, double lon0, double lat0, double false_east, double false_north); int lamccfor(double lon, double lat, double *x, double *y); int lamccinv(double x, double y, double *lon, double *lat); int lamccforint(double r_maj, double r_min, double lat1, double lat2, double c_lon, double c_lat, double false_east, double false_north); int lamccinvint(double r_maj, double r_min, double lat1, double lat2, double c_lon, double c_lat, double false_east, double false_north); int merfor(double lon, double lat, double *x, double *y); int merinv(double x, double y, double *lon, double *lat); int merforint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int merinvint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int psfor(double lon, double lat, double *x, double *y); int psinv(double x, double y, double *lon, double *lat); int psforint(double r_maj, double r_min, double c_lon, double c_lat, double false_east, double false_north); int psinvint(double r_maj, double r_min, double c_lon, double c_lat, double false_east, double false_north); int polyfor(double lon, double lat, double *x, double *y); int polyinv(double x, double y, double *lon, double *lat); int polyforint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int polyinvint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int eqconfor(double lon, double lat, double *x, double *y); int eqconinv(double x, double y, double *lon, double *lat); int eqconforint(double r_maj, double r_min, double lat1, double lat2, double center_lon, double center_lat, double false_east, double false_north, long mode); int eqconinvint(double r_maj, double r_min, double lat1, double lat2, double center_lon, double center_lat, double false_east, double false_north, long mode); int tmfor(double lon, double lat, double *x, double *y); int tminv(double x, double y, double *lon, double *lat); int tmforint(double r_maj, double r_min, double scale_fact, double center_lon, double center_lat, double false_east, double false_north); int tminvint(double r_maj, double r_min, double scale_fact, double center_lon, double center_lat, double false_east, double false_north); int sterfor(double lon, double lat, double *x, double *y); int sterinv(double x, double y, double *lon, double *lat); int sterforint(double r_maj, double center_lon, double center_lat, double false_east, double false_north); int sterinvint(double r_maj, double center_lon, double center_lat, double false_east, double false_north); int lamazfor(double lon, double lat, double *x, double *y); int lamazinv(double x, double y, double *lon, double *lat); int lamazforint(double r, double center_long, double center_lat, double false_east, double false_north); int lamazinvint(double r, double center_long, double center_lat, double false_east, double false_north); int azimfor(double lon, double lat, double *x, double *y); int aziminv(double x, double y, double *lon, double *lat); int azimforint(double r_maj, double center_lon, double center_lat, double false_east, double false_north); int aziminvint(double r_maj, double center_lon, double center_lat, double false_east, double false_north); int gnomfor(double lon, double lat, double *x, double *y); int gnominv(double x, double y, double *lon, double *lat); int gnomforint(double r, double center_long, double center_lat, double false_east, double false_north); int gnominvint(double r, double center_long, double center_lat, double false_east, double false_north); int orthfor(double lon, double lat, double *x, double *y); int orthinv(double x, double y, double *lon, double *lat); int orthforint(double r_maj, double center_lon, double center_lat, double false_east, double false_north); int orthinvint(double r_maj, double center_lon, double center_lat, double false_east, double false_north); int gvnspfor(double lon, double lat, double *x, double *y); int gvnspinv(double x, double y, double *lon, double *lat); int gvnspforint(double r, double h, double center_long, double center_lat, double false_east, double false_north); int gvnspinvint(double r, double h, double center_long, double center_lat, double false_east, double false_north); int sinfor(double lon, double lat, double *x, double *y); int sininv(double x, double y, double *lon, double *lat); int sinforint(double r, double center_long, double false_east, double false_north); int sininvint(double r, double center_long, double false_east, double false_north); int equifor(double lon, double lat, double *x, double *y); int equiinv(double x, double y, double *lon, double *lat); int equiforint(double r_maj, double center_lon, double lat1, double false_east, double false_north); int equiinvint(double r_maj, double center_lon, double lat1, double false_east, double false_north); int millfor(double lon, double lat, double *x, double *y); int millinv(double x, double y, double *lon, double *lat); int millforint(double r, double center_long, double false_east, double false_north); int millinvint(double r, double center_long, double false_east, double false_north); int vandgfor(double lon, double lat, double *x, double *y); int vandginv(double x, double y, double *lon, double *lat); int vandgforint(double r, double center_long, double false_east, double false_north); int vandginvint(double r, double center_long, double false_east, double false_north); int omerfor(double lon, double lat, double *x, double *y); int omerinv(double x, double y, double *lon, double *lat); int omerforint(double r_maj, double r_min, double scale_fact, double azimuth, double lon_orig, double lat_orig, double false_east, double false_north, double lon1, double lat1, double lon2, double lat2, long mode); int omerinvint(double r_maj, double r_min, double scale_fact, double azimuth, double lon_orig, double lat_orig, double false_east, double false_north, double lon1, double lat1, double lon2, double lat2, long mode); int somfor(double lon, double lat, double *x, double *y); int sominv(double x, double y, double *lon, double *lat); int somforint(double r_major, double r_minor, long satnum, long path, double alf_in, double lon, double false_east, double false_north, double time, long start1, long flag, double sat_ratio); int sominvint(double r_major, double r_minor, long satnum, long path, double alf_in, double lon, double false_east, double false_north, double time, long flag, double sat_ratio); int hamfor(double lon, double lat, double *x, double *y); int haminv(double x, double y, double *lon, double *lat); int hamforint(double r, double center_long, double false_east, double false_north); int haminvint(double r, double center_long, double false_east, double false_north); int robfor(double lon, double lat, double *x, double *y); int robinv(double x, double y, double *lon, double *lat); int robforint(double r, double center_long, double false_east, double false_north); int robinvint(double r, double center_long, double false_east, double false_north); int goodfor(double lon, double lat, double *x, double *y); int goodinv(double x, double y, double *lon, double *lat); int goodforint(double r); int goodinvint(double r); int molwfor(double lon, double lat, double *x, double *y); int molwinv(double x, double y, double *lon, double *lat); int molwforint(double r, double center_long, double false_east, double false_north); int molwinvint(double r, double center_long, double false_east, double false_north); int imolwfor(double lon, double lat, double *x, double *y); int imolwinv(double x, double y, double *lon, double *lat); int imolwforint(double r); int imolwinvint(double r); int alconfor(double lon, double lat, double *x, double *y); int alconinv(double x, double y, double *lon, double *lat); int alconforint(double r_maj, double r_min, double false_east, double false_north); int alconinvint(double r_maj, double r_min, double false_east, double false_north); int wivfor(double lon, double lat, double *x, double *y); int wivinv(double x, double y, double *lon, double *lat); int wivforint(double r, double center_long, double false_east, double false_north); int wivinvint(double r, double center_long, double false_east, double false_north); int wviifor(double lon, double lat, double *x, double *y); int wviiinv(double x, double y, double *lon, double *lat); int wviiforint(double r, double center_long, double false_east, double false_north); int wviiinvint(double r, double center_long, double false_east, double false_north); int obleqfor(double lon, double lat, double *x, double *y); int obleqinv(double x, double y, double *lon, double *lat); int obleqforint(double r, double center_long, double center_lat, double shape_m, double shape_n, double angle, double false_east, double false_north); int obleqinvint(double r, double center_long, double center_lat, double shape_m, double shape_n, double angle, double false_east, double false_north); int isinusfor(double lon, double lat, double *x, double *y); int isinusinv(double x, double y, double *lon, double *lat); int isinusforinit(double sphere, double lon_cen_mer, double false_east, double false_north, double dzone, double djustify); int isinusinvinit(double sphere, double lon_cen_mer, double false_east, double false_north, double dzone, double djustify); int utmfor(double lon, double lat, double *x, double *y); int utminv(double x, double y, double *lon, double *lat); int utmforint(double r_maj, double r_min, double scale_fact, long zone); int utminvint(double r_maj, double r_min, double scale_fact, long zone); long calc_utm_zone(double lon); int ceaforint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int ceafor(double lon, double lat, double *x, double *y); int ceainvint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int ceainv(double x, double y, double *lon, double *lat); int bceaforint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int bceafor(double lon, double lat, double *x, double *y); int bceainvint(double r_maj, double r_min, double center_lon, double center_lat, double false_east, double false_north); int bceainv(double x, double y, double *lon, double *lat); #endif #endif libgctp-1.0.orig/gnomfor.c0000644000000000000000000000644111236644451012451 0ustar /******************************************************************************* NAME GNOMONIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Gnomonic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 This function was adapted from the Gnomonic projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double sin_p13; /* Sine of the center latitude */ static double cos_p13; /* Cosine of the center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Gnomonic projection ---------------------------------*/ int gnomforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double center_lat, /* (I) Center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; tsincos(center_lat, &sin_p13, &cos_p13); /* Report parameters to the user -----------------------------*/ ptitle("GNOMONIC"); radius(r); cenlon(center_long); cenlat(center_lat); offsetp(false_easting,false_northing); return(OK); } /* Gnomonic forward equations--mapping lat,long to x,y --------------------------------------------------*/ int gnomfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; double sinphi,cosphi; double coslon; double g; double ksp; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); tsincos(lat,&sinphi,&cosphi); coslon = cos(dlon); g = sin_p13 * sinphi + cos_p13 * cosphi * coslon; if (g <= 0.0) { p_error("Point projects into infinity","gnomfor-conv"); return(133); } ksp = 1.0 / g; *x = false_easting + R * ksp * cosphi * sin(dlon); *y = false_northing + R * ksp * (cos_p13 * sinphi - sin_p13 * cosphi * coslon); return(OK); } libgctp-1.0.orig/gnominv.c0000644000000000000000000000723111236644451012455 0ustar /******************************************************************************* NAME GNOMONIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Gnomonic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 This function was adapted from the Gnomonic projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double lat_center; /* Center latitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double sin_p13; /* Sine of the center latitude */ static double cos_p13; /* Cosine of the center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Gnomonic projection ---------------------------------*/ int gnominvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double center_lat, /* (I) Center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; lat_center = center_lat; false_easting = false_east; false_northing = false_north; tsincos(center_lat, &sin_p13, &cos_p13); /* Report parameters to the user -----------------------------*/ ptitle("GNOMONIC"); radius(r); cenlon(center_long); cenlat(center_lat); offsetp(false_easting,false_northing); return(OK); } /* Gnomonic inverse equations--mapping x,y to lat/long --------------------------------------------------*/ int gnominv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh; double z,sinz,cosz; double con; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; rh = sqrt(x * x + y * y); z = atan(rh / R); tsincos(z,&sinz,&cosz); *lon = lon_center; if (fabs(rh) <= EPSLN) { *lat = lat_center; return(OK); } *lat = asinz(cosz * sin_p13 + (y * sinz * cos_p13) / rh); con = fabs(lat_center) - HALF_PI; if (fabs(con) <= EPSLN) { if (lat_center >= 0.0) { *lon = adjust_lon(lon_center + atan2(x, -y)); return(OK); } else { *lon = adjust_lon(lon_center - atan2(-x, y)); return(OK); } } con = cosz - sin_p13 * sin(*lat); if ((fabs(con) < EPSLN) && (fabs(x) < EPSLN)) return(OK); *lon = adjust_lon(lon_center + atan2((x * sinz * cos_p13), (con * rh))); return(OK); } libgctp-1.0.orig/goodfor.c0000644000000000000000000001360011236644451012434 0ustar /******************************************************************************* NAME GOODE'S HOMOLOSINE PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Goode's Homolosine projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991; Updated Sept, 1992; Updated Feb 1993 S. Nelson, EDC Jun, 1993 Make changes in precision and number of iterations. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. Goode, J.P., 1925, The Homolosine projection: a new device for portraying the Earth's surface entire: Assoc. Am. Geographers, Annals, v. 15, p. 119-125 *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double R; /* Radius of the earth (sphere) */ static double lon_center[12]; /* Central meridians, one for each region */ static double feast[12]; /* False easting, one for each region */ /* Initialize the Goode`s Homolosine projection --------------------------------------------*/ int goodforint( double r) /* (I) Radius of the earth (sphere) */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; /* Initialize central meridians for each of the 12 regions -------------------------------------------------------*/ lon_center[0] = -1.74532925199; /* -100.0 degrees */ lon_center[1] = -1.74532925199; /* -100.0 degrees */ lon_center[2] = 0.523598775598; /* 30.0 degrees */ lon_center[3] = 0.523598775598; /* 30.0 degrees */ lon_center[4] = -2.79252680319; /* -160.0 degrees */ lon_center[5] = -1.0471975512; /* -60.0 degrees */ lon_center[6] = -2.79252680319; /* -160.0 degrees */ lon_center[7] = -1.0471975512; /* -60.0 degrees */ lon_center[8] = 0.349065850399; /* 20.0 degrees */ lon_center[9] = 2.44346095279; /* 140.0 degrees */ lon_center[10] = 0.349065850399; /* 20.0 degrees */ lon_center[11] = 2.44346095279; /* 140.0 degrees */ /* Initialize false eastings for each of the 12 regions ----------------------------------------------------*/ feast[0] = R * -1.74532925199; feast[1] = R * -1.74532925199; feast[2] = R * 0.523598775598; feast[3] = R * 0.523598775598; feast[4] = R * -2.79252680319; feast[5] = R * -1.0471975512; feast[6] = R * -2.79252680319; feast[7] = R * -1.0471975512; feast[8] = R * 0.349065850399; feast[9] = R * 2.44346095279; feast[10] = R * 0.349065850399; feast[11] = R * 2.44346095279; /* Report parameters to the user -----------------------------*/ ptitle("GOODE'S HOMOLOSINE EQUAL-AREA"); radius(r); return(OK); } /* Goode`s Homolosine forward equations--mapping lat,long to x,y -------------------------------------------------------------*/ int goodfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double theta; double delta_theta; double constant; long i; long region; /* Forward equations -----------------*/ if (lat >= 0.710987989993) /* if on or above 40 44' 11.8" */ { if (lon <= -0.698131700798) region = 0; /* If to the left of -40 */ else region = 2; } else if (lat >= 0.0) /* Between 0.0 and 40 44' 11.8" */ { if (lon <= -0.698131700798) region = 1; /* If to the left of -40 */ else region = 3; } else if (lat >= -0.710987989993) /* Between 0.0 & -40 44' 11.8" */ { if (lon <= -1.74532925199) region = 4; /* If between -180 and -100 */ else if (lon <= -0.349065850399) region = 5; /* If between -100 and -20 */ else if (lon <= 1.3962634016) region = 8; /* If between -20 and 80 */ else region = 9; /* If between 80 and 180 */ } else /* Below -40 44' */ { if (lon <= -1.74532925199) region = 6; /* If between -180 and -100 */ else if (lon <= -0.349065850399) region = 7; /* If between -100 and -20 */ else if (lon <= 1.3962634016) region = 10; /* If between -20 and 80 */ else region = 11; /* If between 80 and 180 */ } if (region==1||region==3||region==4||region==5||region==8||region==9) { delta_lon = adjust_lon(lon - lon_center[region]); *x = feast[region] + R * delta_lon * cos(lat); *y = R * lat; } else { delta_lon = adjust_lon(lon - lon_center[region]); theta = lat; constant = PI * sin(lat); /* Iterate using the Newton-Raphson method to find theta -----------------------------------------------------*/ for (i=0;;i++) { delta_theta = -(theta + sin(theta) - constant) / (1.0 + cos(theta)); theta += delta_theta; if (fabs(delta_theta) < EPSLN) break; if (i >= 50) { p_error("Iteration failed to converge","goode-forward"); return(251); } } theta /= 2.0; /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting" this is done here because of precision problems with "cos(theta)" ------------------------------------------------------------------*/ if (PI / 2 - fabs(lat) < EPSLN) delta_lon = 0; *x = feast[region] + 0.900316316158 * R * delta_lon * cos(theta); *y = R * (1.4142135623731 * sin(theta) - 0.0528035274542 * sign(lat)); } return(OK); } libgctp-1.0.orig/goodinv.c0000644000000000000000000001572611236644451012455 0ustar /******************************************************************************* NAME GOODE'S HOMOLOSINE PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Goode's Homolosine projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991; Updated Sept, 1992; Updated Feb 1993 S. Nelson, EDC Jun, 1993 Made changes in precision. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. Goode, J.P., 1925, The Homolosine projection: a new device for portraying the Earth's surface entire: Assoc. Am. Geographers, Annals, v. 15, p. 119-125 *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double R; /* Radius of the earth (sphere) */ static double lon_center[12]; /* Central meridians, one for each region */ static double feast[12]; /* False easting, one for each region */ /* Initialize the Goode`s Homolosine projection --------------------------------------------*/ int goodinvint( double r) /* (I) Radius of the earth (sphere) */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; /* Initialize central meridians for each of the 12 regions -------------------------------------------------------*/ lon_center[0] = -1.74532925199; /* -100.0 degrees */ lon_center[1] = -1.74532925199; /* -100.0 degrees */ lon_center[2] = 0.523598775598; /* 30.0 degrees */ lon_center[3] = 0.523598775598; /* 30.0 degrees */ lon_center[4] = -2.79252680319; /* -160.0 degrees */ lon_center[5] = -1.0471975512; /* -60.0 degrees */ lon_center[6] = -2.79252680319; /* -160.0 degrees */ lon_center[7] = -1.0471975512; /* -60.0 degrees */ lon_center[8] = 0.349065850399; /* 20.0 degrees */ lon_center[9] = 2.44346095279; /* 140.0 degrees */ lon_center[10] = 0.349065850399; /* 20.0 degrees */ lon_center[11] = 2.44346095279; /* 140.0 degrees */ /* Initialize false eastings for each of the 12 regions ----------------------------------------------------*/ feast[0] = R * -1.74532925199; feast[1] = R * -1.74532925199; feast[2] = R * 0.523598775598; feast[3] = R * 0.523598775598; feast[4] = R * -2.79252680319; feast[5] = R * -1.0471975512; feast[6] = R * -2.79252680319; feast[7] = R * -1.0471975512; feast[8] = R * 0.349065850399; feast[9] = R * 2.44346095279; feast[10] = R * 0.349065850399; feast[11] = R * 2.44346095279; /* Report parameters to the user -----------------------------*/ ptitle("GOODE'S HOMOLOSINE EQUAL-AREA"); radius(r); return(OK); } /* Goode`s Homolosine inverse equations--mapping x,y to lat,long -------------------------------------------------------------*/ int goodinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double arg; double theta; double temp; long region; /* Inverse equations -----------------*/ if (y >= R * 0.710987989993) /* if on or above 40 44' 11.8" */ { if (x <= R * -0.698131700798) region = 0; /* If to the left of -40 */ else region = 2; } else if (y >= 0.0) /* Between 0.0 and 40 44' 11.8" */ { if (x <= R * -0.698131700798) region = 1; /* If to the left of -40 */ else region = 3; } else if (y >= R * -0.710987989993) /* Between 0.0 & -40 44' 11.8" */ { if (x <= R * -1.74532925199) region = 4; /* If between -180 and -100 */ else if (x <= R * -0.349065850399) region = 5; /* If between -100 and -20 */ else if (x <= R * 1.3962634016) region = 8; /* If between -20 and 80 */ else region = 9; /* If between 80 and 180 */ } else /* Below -40 44' 11.8" */ { if (x <= R * -1.74532925199) region = 6; /* If between -180 and -100 */ else if (x <= R * -0.349065850399) region = 7; /* If between -100 and -20 */ else if (x <= R * 1.3962634016) region = 10; /* If between -20 and 80 */ else region = 11; /* If between 80 and 180 */ } x = x - feast[region]; if (region==1||region==3||region==4||region==5||region==8||region==9) { *lat = y / R; if (fabs(*lat) > HALF_PI) { p_error("Input data error","goode-inverse"); return(252); } temp = fabs(*lat) - HALF_PI; if (fabs(temp) > EPSLN) { temp = lon_center[region] + x / (R * cos(*lat)); *lon = adjust_lon(temp); } else *lon = lon_center[region]; } else { arg = (y + 0.0528035274542 * R * sign(y)) / (1.4142135623731 * R); if (fabs(arg) > 1.0) return(IN_BREAK); theta = asin(arg); *lon = lon_center[region]+(x/(0.900316316158 * R * cos(theta))); if(*lon < -(PI + EPSLN)) return(IN_BREAK); arg = (2.0 * theta + sin(2.0 * theta)) / PI; if (fabs(arg) > 1.0) return(IN_BREAK); *lat = asin(arg); } /* because of precision problems, long values of 180 deg and -180 deg may be mixed. ----------------------------------------------------------------*/ if (((x < 0) && (PI - *lon < EPSLN)) || ((x > 0) && (PI + *lon < EPSLN))) *lon = -(*lon); /* Are we in a interrupted area? If so, return status code of IN_BREAK. ---------------------------------------------------------------------*/ if (region == 0 && (*lon < -(PI + EPSLN) || *lon > -0.698131700798)) return(IN_BREAK); if (region == 1 && (*lon < -(PI + EPSLN) || *lon > -0.698131700798)) return(IN_BREAK); if (region == 2 && (*lon < -0.698131700798 || *lon > PI + EPSLN)) return(IN_BREAK); if (region == 3 && (*lon < -0.698131700798 || *lon > PI + EPSLN)) return(IN_BREAK); if (region == 4 && (*lon < -(PI + EPSLN) || *lon > -1.74532925199)) return(IN_BREAK); if (region == 5 && (*lon < -1.74532925199 || *lon > -0.349065850399)) return(IN_BREAK); if (region == 6 && (*lon < -(PI + EPSLN) || *lon > -1.74532925199)) return(IN_BREAK); if (region == 7 && (*lon < -1.74532925199 || *lon > -0.349065850399)) return(IN_BREAK); if (region == 8 && (*lon < -0.349065850399 || *lon > 1.3962634016)) return(IN_BREAK); if (region == 9 && (*lon < 1.3962634016|| *lon > PI + EPSLN)) return(IN_BREAK); if (region ==10 && (*lon < -0.349065850399 || *lon > 1.3962634016)) return(IN_BREAK); if (region ==11 && (*lon < 1.3962634016 || *lon > PI + EPSLN)) return(IN_BREAK); return(OK); } libgctp-1.0.orig/gvnspfor.c0000644000000000000000000000724211236644451012646 0ustar /******************************************************************************* NAME GENERAL VERTICAL NEAR-SIDE PERSPECTIVE PURPOSE: Transforms input longitude and latitude to Easting and Northing for the General Vertical Near-Side Perspective projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 This function was adapted from the General Vertical Near-Side Perspective projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double p; /* Height above sphere */ static double sin_p15; /* Sine of the center latitude */ static double cos_p15; /* Cosine of the center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the General Vertical Near-Side Perspective projection ---------------------------------------------------------------*/ int gvnspforint( double r, /* (I) Radius of the earth (sphere) */ double h, /* height above sphere */ double center_long, /* (I) Center longitude */ double center_lat, /* (I) Center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; p = 1.0 + h / R; lon_center = center_long; false_easting = false_east; false_northing = false_north; tsincos(center_lat, &sin_p15, &cos_p15); /* Report parameters to the user -----------------------------*/ ptitle("GENERAL VERTICAL NEAR-SIDE PERSPECTIVE"); radius(r); genrpt(h,"Height of Point Above Surface of Sphere: "); cenlon(center_long); cenlat(center_lat); offsetp(false_easting,false_northing); return(OK); } /* General Vertical Near-Side Perspective forward equations--mapping lat,long to x,y ----------------------------------------------------------------*/ int gvnspfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; double sinphi,cosphi; double coslon; double g; double ksp; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); tsincos(lat,&sinphi,&cosphi); coslon = cos(dlon); g = sin_p15 * sinphi + cos_p15 * cosphi * coslon; if (g < (1.0/ p)) { p_error("Point cannot be projected","gvnsp-for"); return(153); } ksp = (p - 1.0)/(p - g); *x = false_easting + R * ksp * cosphi * sin(dlon); *y = false_northing + R * ksp * (cos_p15 * sinphi - sin_p15 * cosphi * coslon); return(OK); } libgctp-1.0.orig/gvnspinv.c0000644000000000000000000001035111236644451012647 0ustar /******************************************************************************* NAME GENERAL VERTICAL NEAR-SIDE PERSPECTIVE PURPOSE: Transforms input Easting and Northing to longitude and latitude for the General Vertical Near-Side Perspective projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 This function was adapted from the General Vertical Near-side projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double lat_center; /* Center latitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double p; /* Height above sphere */ static double sin_p15; /* Sine of the center latitude */ static double cos_p15; /* Cosine of the center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the General Vertical Near-Side Perspective projection ---------------------------------------------------------------*/ int gvnspinvint( double r, /* (I) Radius of the earth (sphere) */ double h, /* height above sphere */ double center_long, /* (I) Center longitude */ double center_lat, /* (I) Center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; p = 1.0 + h / R; lon_center = center_long; lat_center = center_lat; false_easting = false_east; false_northing = false_north; tsincos(center_lat, &sin_p15, &cos_p15); /* Report parameters to the user -----------------------------*/ ptitle("GENERAL VERTICAL NEAR-SIDE PERSPECTIVE"); radius(r); genrpt(h,"Height of Point Above Surface of Sphere: "); cenlon(center_long); cenlat(center_lat); offsetp(false_easting,false_northing); return(OK); } /* General Vertical Near-Side Perspective inverse equations--mapping x,y to lat/long ----------------------------------------------------------------*/ int gvnspinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh; double r; double con; double com; double z,sinz,cosz; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; rh = sqrt(x * x + y * y); r = rh / R; con = p - 1.0; com = p + 1.0; if (r > sqrt(con/com)) { p_error("Input data error","gvnsp-for"); return(155); } sinz = (p - sqrt(1.0 - (r * r * com) / con)) / (con / r + r/con); z = asinz(sinz); tsincos(z,&sinz,&cosz); *lon = lon_center; if (fabs(rh) <= EPSLN) { *lat = lat_center; return(OK); } *lat = asinz(cosz * sin_p15 + ( y * sinz * cos_p15)/rh); con = fabs(lat_center) - HALF_PI; if (fabs(con) <= EPSLN) { if (lat_center >= 0.0) { *lon = adjust_lon(lon_center + atan2(x, -y)); return(OK); } else { *lon = adjust_lon(lon_center - atan2(-x, y)); return(OK); } } con = cosz - sin_p15 * sin(*lat); if ((fabs(con) < EPSLN) && (fabs(x) < EPSLN)) return(OK); *lon = adjust_lon(lon_center + atan2((x * sinz * cos_p15), (con * rh))); return(OK); } libgctp-1.0.orig/hamfor.c0000644000000000000000000000555011236644451012256 0ustar /******************************************************************************* NAME HAMMER PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Hammer projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Lambert Azimuthal Equal Area projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the HAMMER projection -------------------------------*/ int hamforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("HAMMER"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* HAMMER forward equations--mapping lat,long to x,y ------------------------------------------------------------*/ int hamfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; double fac; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); fac = R * 1.414213562 / sqrt(1.0 + cos(lat) * cos(dlon / 2.0)); *x = false_easting + fac * 2.0 * cos(lat) * sin(dlon / 2.0); *y = false_northing + fac * sin(lat); return(OK); } libgctp-1.0.orig/haminv.c0000644000000000000000000000552611236644451012267 0ustar /******************************************************************************* NAME HAMMER PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Hammer projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Hammer projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the HAMMER projection -------------------------------*/ int haminvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("HAMMER"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* HAMMER inverse equations--mapping x,y to lat/long ------------------------------------------------*/ int haminv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double fac; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; fac = sqrt(4.0 * R * R - (x * x)/ 4.0 - y * y) / 2.0; *lon = adjust_lon(lon_center + 2.0 * atan2((x * fac), (2.0 * R * R - x * x/4 - y * y))); *lat = asinz(y * fac / R / R); return(OK); } libgctp-1.0.orig/imolwfor.c0000644000000000000000000001132311236644451012633 0ustar /******************************************************************************* NAME INTERRUPTED MOLLWEIDE PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Interrupted Mollweide projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS June, 1991 Initial development T. Mittan, EDC Feb, 1993 Adapted format to be used by the "C" version of GCTP. S. Nelson, EDC June, 1993 Changed precisian of radians in assigning the region, and in the conversion algorithm. S. Nelson, EDC Feb, 1994 changed perror to p_error. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double R; /* Radius of the earth (sphere) */ static double lon_center[6]; /* Central meridians, one for each region */ static double feast[6]; /* False easting, one for each region */ /* Initialize the Interrupted Mollweide projection --------------------------------------------*/ int imolwforint( double r) /* (I) Radius of the earth (sphere) */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; /* Initialize central meridians for each of the 6 regions ------------------------------------------------------*/ lon_center[0] = 1.0471975512; /* 60.0 degrees */ lon_center[1] = -2.96705972839; /* -170.0 degrees */ lon_center[2] = -0.523598776; /* -30.0 degrees */ lon_center[3] = 1.57079632679; /* 90.0 degrees */ lon_center[4] = -2.44346095279; /* -140.0 degrees */ lon_center[5] = -0.34906585; /* -20.0 degrees */ /* Initialize false eastings for each of the 6 regions ---------------------------------------------------*/ feast[0] = R * -2.19988776387; feast[1] = R * -0.15713484; feast[2] = R * 2.04275292359; feast[3] = R * -1.72848324304; feast[4] = R * 0.31426968; feast[5] = R * 2.19988776387; /* Report parameters to the user -----------------------------*/ ptitle("INTERRUPTED MOLLWEIDE EQUAL-AREA"); radius(r); return(OK); } /* Interrupted Mollweide forward equations--mapping lat,long to x,y -------------------------------------------------------------*/ int imolwfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double theta; double delta_theta; double con; long i; long region; /* Forward equations -----------------*/ /* Note: PI has been adjusted so that the correct region will be assigned when lon = 180 deg. ----------------------------------------------------------------------*/ if (lat >= 0.0) { if (lon >= 0.34906585 && lon < 1.91986217719) region = 0; else if ((lon >= 1.919862177 && lon <= (PI + 1.0E-14)) || (lon >= (-PI - 1.0E-14) && lon < -1.745329252)) region=1; else region = 2; } else { if (lon >= 0.34906585 && lon < 2.44346095279) region = 3; else if ((lon >= 2.44346095279 && lon <= (PI +1.0E-14)) || (lon >= (-PI - 1.0E-14) && lon<-1.2217304764)) region=4; else region = 5; } delta_lon = adjust_lon(lon - lon_center[region]); theta = lat; con = PI * sin(lat); /* Iterate using the Newton-Raphson method to find theta -----------------------------------------------------*/ for (i=0;;i++) { delta_theta = -(theta + sin(theta) - con) / (1.0 + cos(theta)); theta += delta_theta; if (fabs(delta_theta) < EPSLN) break; if (i >= 50) p_error("Iteration failed to converge","IntMoll-forward"); } theta /= 2.0; /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting" this is done here because of percision problems with "cos(theta)" --------------------------------------------------------------------------*/ if (PI / 2 - fabs(lat) < EPSLN) delta_lon = 0; *x = feast[region] + 0.900316316158 * R * delta_lon * cos(theta); *y = R * 1.4142135623731 * sin(theta); return(OK); } libgctp-1.0.orig/imolwinv.c0000644000000000000000000001015411236644451012642 0ustar /******************************************************************************* NAME INTERRUPTED MOLLWEIDE PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Interrupted Mollweide projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS June, 1991 Initial Development S. Nelson, EDC June, 1993 Changed precision for values to determine regions and if coordinates are in the break, and for the values in the conversion algorithm. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double R; /* Radius of the earth (sphere) */ static double lon_center[6]; /* Central meridians, one for each region */ static double feast[6]; /* False easting, one for each region */ /* Initialize the Interrupted Mollweide projection --------------------------------------------*/ int imolwinvint( double r) /* (I) Radius of the earth (sphere) */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; /* Initialize central meridians for each of the 6 regions ------------------------------------------------------*/ lon_center[0] = 1.0471975512; /* 60.0 degrees */ lon_center[1] = -2.96705972839; /* -170.0 degrees */ lon_center[2] = -0.523598776; /* -30.0 degrees */ lon_center[3] = 1.57079632679; /* 90.0 degrees */ lon_center[4] = -2.44346095279; /* -140.0 degrees */ lon_center[5] = -0.34906585; /* -20.0 degrees */ /* Initialize false eastings for each of the 6 regions ---------------------------------------------------*/ feast[0] = R * -2.19988776387; feast[1] = R * -0.15713484; feast[2] = R * 2.04275292359; feast[3] = R * -1.72848324304; feast[4] = R * 0.31426968; feast[5] = R * 2.19988776387; /* Report parameters to the user -----------------------------*/ ptitle("INTERRUPTED MOLLWEIDE EQUAL-AREA"); radius(r); return(OK); } int imolwinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double theta; long region; /* Inverse equations -----------------*/ if (y >= 0.0) { if (x <= R * -1.41421356248) region = 0; else if (x <= R * 0.942809042) region = 1; else region = 2; } else { if (x <= R * -0.942809042) region = 3; else if (x <= R * 1.41421356248) region = 4; else region = 5; } x = x - feast[region]; theta = asin(y / (1.4142135623731 * R)); *lon = adjust_lon(lon_center[region] + (x / (0.900316316158*R * cos(theta)))); *lat = asin((2.0 * theta + sin(2.0 * theta)) / PI); /* Are we in a interrupted area? If so, return status code of IN_BREAK. ---------------------------------------------------------------------*/ if (region == 0 && (*lon < 0.34906585 || *lon > 1.91986217719))return(IN_BREAK); if (region == 1 && ((*lon < 1.91986217719 && *lon > 0.34906585) || (*lon > -1.74532925199 && *lon < 0.34906585))) return(IN_BREAK); if (region == 2 && (*lon < -1.745329252 || *lon > 0.34906585)) return(IN_BREAK); if (region == 3 && (*lon < 0.34906585 || *lon > 2.44346095279))return(IN_BREAK); if (region == 4 && ((*lon < 2.44346095279 && *lon > 0.34906585) || (*lon > -1.2217304764 && *lon < 0.34906585))) return(IN_BREAK); if (region == 5 && (*lon < -1.2217304764 || *lon> 0.34906585))return(IN_BREAK); return(OK); } libgctp-1.0.orig/inv_init.c0000644000000000000000000006131111236644451012616 0ustar /******************************************************************************* NAME INV_INIT PURPOSE: Initializes inverse projection transformation parameters PROGRAMMER DATE REASON ---------- ---- ------ T. Mittan 3-09-93 Initial Development S. Nelson 11-94 Added Clarke spheroid default to UTM Raj Gejjagaraguppe(ARC) 08-30-96 Landsat Ratio is removed as hard coded value. Now this ratio can be an input from the user through the projection parameter array element number 9. Raj Gejjagaraguppe(ARC) 01-07-97 Added a new projection type called Integerized Sinusoidal Grid to support MODIS level 3 datasets. D. Wynne(ARC) 3-24-97 Added Support for Power Challenge (R10000 Processor Chip Revision: 2.5) Long is 8 bytes,on all other currently supported platforms Long is 4 bytes. Abe Taaheri 06-27-00 Added a new projection type called Behrmann Cylinderical Equal Area to support EASE grid. Abe Taaheri 10-23-00 Updated for ISINUS projection, so that both codes 31 and 99 (i.e. ISINUS and ISINUS1) can be used for this projection. Abe Taaheri 1-15-03 Modified to support both spherical and ellipsoid models of earth for Normal Cylinderical Equal Area projection. Abe Taaheri 8-15-03 Added CEA projection. This is used by generalized EASE grid, when the EASE grid corners are specified in meters (Note that BCEA is similar projection and used when EASE grid corners are set in packed DMS degrees. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" #include "proj.h" int inv_init( int insys, /* input system code */ int inzone, /* input zone number */ double *inparm, /* input array of projection parameters */ int indatum, /* input datum code */ char *fn27, /* NAD 1927 parameter file */ char *fn83, /* NAD 1983 parameter file */ int *iflg, /* status flag */ int (*inv_trans[])(double, double, double*, double*)) /* inverse function pointer */ { long zone; /* zone number */ double azimuth; /* azimuth */ double angle; /* rotation anlge */ double alf; /* SOM angle */ double lon1; /* longitude point in utm scene */ double lon2; /* 2nd longitude point */ double lat1; /* 1st standard parallel */ double lat2; /* 2nd standard parallel */ double center_long; /* center longitude */ double center_lat; /* center latitude */ double h; /* height above sphere */ double lat_origin; /* latitude at origin */ double lon_origin; /* longitude at origin */ double r_major; /* major axis in meters */ double r_minor; /* minor axis in meters */ double scale_factor; /* scale factor */ double false_easting; /* false easting in meters */ double false_northing; /* false northing in meters */ double radius; /* radius of sphere */ double shape_m; /* constant used for Oblated Equal Area */ double shape_n; /* constant used for Oblated Equal Area */ /*long start; */ /* start of SOM Beginning or end */ double time; /* SOM time */ long path; /* SOM path number */ long satnum; /* SOM satellite number */ long mode; /* which format is used A or B */ long tmpdatum; /* temporary datum for UTM */ double sat_ratio; /* satellite ratio which specify the start point*/ double dzone; /* number of longitudinal zones in ISG */ double djustify; /* justify flag in ISG projection */ long thing; /* used to initialize 8 byte pointer, added */ /* for Power Challenge */ long *iflg64; /* 8 byte status flag for Power Challenge */ thing = 0; /* These lines are to initialize the */ iflg64 = &thing; /* the 8-byte pointer address */ /* Initialize inverse transformations -----------------------------------*/ /* find the correct major and minor axis --------------------------------------*/ if(insys == CEA) { if(inparm[0] > 0.0 || inparm[0] < 0.0 || inparm[1] > 0.0 || inparm[1] < 0.0) { indatum = -20; } sphdz(indatum,inparm,&r_major,&r_minor,&radius); } else if(insys == BCEA) { if(inparm[0] > 0.0 || inparm[0] < 0.0 || inparm[1] > 0.0 || inparm[1] < 0.0) { indatum = -20; } else /* for BCEA use 6371228.0 m as default for r_maj and r_min, i.e. use spherical earth model with radius 6371228.0 m instead of Clarke 1866 spheroid */ { indatum = 20; } sphdz(indatum,inparm,&r_major,&r_minor,&radius); } else { sphdz(indatum,inparm,&r_major,&r_minor,&radius); } false_easting = inparm[6]; false_northing = inparm[7]; if (insys == CEA)/* Cylindrical Equal-Area, used for EASE grid wghen grid corners are specified in meters */ { /* this is the call to initialize CEA ----------------------------------------*/ center_long = paksz(inparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = ceainvint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = ceainv; } else if (insys == BCEA)/* Cylindrical Equal-Area, used for EASE grid wghen grid corners are specified in DMS degrees */ { /* this is the call to initialize BCEA ----------------------------------------*/ center_long = paksz(inparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[5],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = bceainvint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = bceainv; } else if (insys == UTM) { /* this is the call to initialize U T M -------------------------------------*/ /* set Clarke 1866 spheroid if negative datum code ----------------------------------------------*/ if (indatum < 0) { tmpdatum = 0; sphdz(tmpdatum,inparm,&r_major,&r_minor,&radius); } zone = inzone; if (zone == 0) { lon1 = paksz(inparm[0],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[1],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; zone = calc_utm_zone(lon1 * R2D); if (lat1 < 0) zone = -zone; } scale_factor = .9996; *iflg64 = utminvint(r_major,r_minor,scale_factor,zone); *iflg = *iflg64; inv_trans[insys] = utminv; } else if (insys == SPCS) { /* this is the call to initialize STATE PLANE --------------------------------------------*/ *iflg64 = stplninvint( inzone,indatum,fn27,fn83); *iflg = *iflg64; if (*iflg64 != 0) return ERROR; inv_trans[insys] = stplninv; } else if (insys == ALBERS) { /* this is the call to initialize ALBERS ---------------------------------------*/ lat1 = paksz(inparm[2],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(inparm[3],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = alberinvint(r_major,r_minor,lat1,lat2,center_long,lat_origin, false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = alberinv; } else if (insys == LAMCC) { /* this is the call to initialize LAMBERT CONFORMAL CONIC --------------------------------------------------------*/ lat1 = paksz(inparm[2],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(inparm[3],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = lamccinvint(r_major,r_minor,lat1,lat2,center_long,lat_origin, false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = lamccinv; } else if (insys == MERCAT) { /* this is the call to initialize MERCATOR ----------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = merinvint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = merinv; } else if (insys == PS) { /* this is the call to initialize POLAR STEREOGRAPHIC ----------------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = psinvint(r_major,r_minor,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = psinv; } else if (insys == POLYC) { /* this is the call to initialize POLYCONIC -----------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = polyinvint(r_major,r_minor,center_long,lat_origin,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = polyinv; } else if (insys == EQUIDC) { /* this is the call to initialize EQUIDISTANT CONIC ---------------------------------------------------*/ lat1 = paksz(inparm[2],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(inparm[3],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; if (inparm[8] == 0) mode = 0; else mode = 1; *iflg64 = eqconinvint(r_major,r_minor,lat1,lat2,center_long,lat_origin, false_easting,false_northing,mode); *iflg = *iflg64; inv_trans[insys] = eqconinv; } else if (insys == TM) { /* this is the call to initialize TRANSVERSE MERCATOR -------------------------------------------------*/ scale_factor = inparm[2]; center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat_origin = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = tminvint(r_major,r_minor,scale_factor,center_long,lat_origin, false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = tminv; } else if (insys == STEREO) { /* this is the call to initialize STEREOGRAPHIC ---------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = sterinvint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = sterinv; } else if (insys == LAMAZ) { /* this is the call to initialize LAMBERT AZIMUTHAL EQUAL-AREA -------------------------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = lamazinvint(radius, center_long, center_lat,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = lamazinv; } else if (insys == AZMEQD) { /* this is the call to initialize AZIMUTHAL EQUIDISTANT ------------------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = aziminvint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = aziminv; } else if (insys == GNOMON) { /* this is the call to initialize GNOMONIC ----------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = gnominvint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = gnominv; } else if (insys == ORTHO) { /* this is the call to initialize ORTHOGRAPHIC --------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = orthinvint(radius,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = orthinv; } else if (insys == GVNSP) { /* this is the call to initialize GENERAL VERTICAL NEAR SIDED PERSPECTIVE -----------------------------------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; h = inparm[2]; *iflg64 = gvnspinvint(radius,h,center_long,center_lat,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = gvnspinv; } else if (insys == SNSOID) { /* this is the call to initialize SINUSOIDAL --------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = sininvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = sininv; } else if (insys == EQRECT) { /* this is the call to initialize EQUIRECTANGULAR -----------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = equiinvint(radius,center_long,lat1,false_easting, false_northing); *iflg = *iflg64; inv_trans[insys] = equiinv; } else if (insys == MILLER) { /* this is the call to initialize MILLER CYLINDRICAL --------------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = millinvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = millinv; } else if (insys == VGRINT) { /* this is the call to initialize VAN DER GRINTEN -----------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = vandginvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = vandginv; } else if (insys == HOM) { /* this is the call to initialize HOTLINE OBLIQUE MERCATOR ---------------------------------------------------------*/ scale_factor = inparm[2]; lat_origin = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; if (inparm[12] != 0) { mode = 1; azimuth = paksz(inparm[3],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lon_origin = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; } else { mode = 0; lon1 = paksz(inparm[8],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat1 = paksz(inparm[9],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lon2 = paksz(inparm[10],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lat2 = paksz(inparm[11],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; } *iflg64 = omerinvint(r_major,r_minor,scale_factor,azimuth,lon_origin, lat_origin,false_easting, false_northing,lon1,lat1, lon2,lat2,mode); *iflg = *iflg64; inv_trans[insys] = omerinv; } else if (insys == SOM) { /* this is the call to initialize SOM -----------------------------------*/ path = (long) inparm[3]; satnum = (long) inparm[2]; if (inparm[12] == 0) { mode = 1; alf = paksz(inparm[3],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; lon1 = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; time = inparm[8]; sat_ratio = inparm[9]; /* start = (long) inparm[10];*/ } else mode = 0; /* *iflg64 = sominvint(r_major,r_minor,satnum,path,false_easting, false_northing); *iflg = *iflg64; */ *iflg64 = sominvint(r_major,r_minor,satnum,path,alf,lon1,false_easting, false_northing,time,mode,sat_ratio); *iflg = *iflg64; inv_trans[insys] = sominv; } else if (insys == HAMMER) { /* this is the call to initialize HAMMER --------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = haminvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = haminv; } else if (insys == ROBIN) { /* this is the call to initialize ROBINSON ----------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = robinvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = robinv; } else if (insys == GOODE) { /* this is the call to initialize GOODE'S HOMOLOSINE ---------------------------------------------------*/ *iflg64 = goodinvint(radius); *iflg = *iflg64; inv_trans[insys] = goodinv; } else if (insys == MOLL) { /* this is the call to initialize MOLLWEIDE -------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = molwinvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = molwinv; } else if (insys == IMOLL) { /* this is the call to initialize INTERRUPTED MOLLWEIDE -----------------------------------------------------*/ *iflg64 = imolwinvint(radius); *iflg = *iflg64; inv_trans[insys] = imolwinv; } else if (insys == ALASKA) { /* this is the call to initialize ALASKA CONFORMAL ------------------------------------------------*/ *iflg64 = alconinvint(r_major,r_minor,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = alconinv; } else if (insys == WAGIV) { /* this is the call to initialize WAGNER IV -----------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = wivinvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = wivinv; } else if (insys == WAGVII) { /* this is the call to initialize WAGNER VII ------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = wviiinvint(radius, center_long,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = wviiinv; } else if (insys == OBEQA) { /* this is the call to initialize OBLATED EQUAL AREA ---------------------------------------------------*/ center_long = paksz(inparm[4],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; center_lat = paksz(inparm[5],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; shape_m = inparm[2]; shape_n = inparm[3]; angle = paksz(inparm[8],iflg64) * 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; *iflg64 = obleqinvint(radius,center_long,center_lat,shape_m, shape_n, angle,false_easting,false_northing); *iflg = *iflg64; inv_trans[insys] = obleqinv; } else if ((insys == ISINUS) || (insys == ISINUS1)) { /* this is the call to initialize INTEGERIZED SINUSOIDAL GRID ------------------------------------------------------------*/ center_long = paksz(inparm[4],iflg64)* 3600 * S2R; *iflg = *iflg64; if (*iflg64 != 0) return ERROR; dzone = inparm[8]; djustify = inparm[10]; *iflg64 = isinusinvinit(radius, center_long, false_easting, false_northing, dzone, djustify); *iflg = *iflg64; inv_trans[insys] = isinusinv; } return OK; } libgctp-1.0.orig/isin.h0000644000000000000000000000655311236644451011755 0ustar /****************************************************************************** NAME ISIN.H PURPOSE: Integerized Sinusoidal Library Header - constants, data structures and prototypes for integerized sinusoidal library functions. PROGRAMMER DATE REASON ---------- ---- ------ Robert Wolfe (STX) 1-2-97 Initial version. Raj Gejjagaraguppe (ARC) 1-15-97 Modified the code to work with GCTP software. D*****************************************************************************/ #ifdef __cplusplus extern "C" { #endif /* Status returned */ #define ISIN_SUCCESS 0 /* Successful return */ #define ISIN_ERROR -1 /* Error return */ #define ISIN_ERANGE -2 /* Input variable out of range */ /* Data Structures */ /* Row Type; Information for Eash Row (longitudinal band) in Projection */ typedef struct { long ncol; /* Number of columns */ long icol_cen; /* Column number to left of center of grid */ double ncol_inv; /* Number of columns inverse */ } Isin_row_t; /* Handle Type; Values assigned in 'Isin_init' */ typedef struct { double false_east; /* Northing at projection origin */ double false_north; /* Easting at projection origin */ double sphere; /* Sphere radius (user's units) */ double sphere_inv; /* Sphere radius inverse (user's units) */ double ang_size_inv; /* Grid angular resolution inverse (1/rad)*/ long nrow; /* Number of rows (longitudinal zones) */ long nrow_half; /* Half of number of rows (longitudinal zones)*/ double ref_lon; /* Zero reference longitude (rad) */ double lon_cen_mer; /* Longitude of central meridian (rad) */ int ijustify; /* Justify flag (see Isin_init) */ double col_dist; /* Distance for one column in projection * (user's units) */ double col_dist_inv; /* Distance for one column in projection inverse * (user's units) */ Isin_row_t *row; /* Row data structure */ long key; /* Data structure key */ } Isin_t; /* Error Structure */ typedef struct { int num; /* Error number */ char *str; /* Error message */ } error_t; /* Prototypes */ /* Initialize integerized sinusoidal forward transformations */ int isinusforinit(double , double, double, double, double, double); Isin_t *Isin_for_init(double , double, double, double, long, int); /* Initialize integerized sinusoidal inverse transformations */ int isinusinvinit(double , double, double, double, double, double); Isin_t *Isin_inv_init(double , double, double, double, long, int); /* Forward mapping; converts geographic coordinates ('lon', 'lat') * to map projection coordinates ('x', 'y') */ int isinusfor(double, double, double *, double *); int Isin_fwd(const Isin_t *, double, double, double *, double *); /* Inverse mapping; converts map projection coordinates ('x', 'y') to * geographic coordinates ('lon', 'lat') */ int isinusinv(double, double, double *, double *); int Isin_inv(const Isin_t *, double, double, double *, double *); /* Deallocate the 'isin' data structure and array memory */ int Isin_for_free(Isin_t *); int Isin_inv_free(Isin_t *); /* Private function to handle errors */ static int Isin_error(const error_t *, const char *); #ifdef __cplusplus } #endif libgctp-1.0.orig/isinusfor.c0000644000000000000000000004466711236644451013037 0ustar /****************************************************************************** NAME ISINUSFOR.C PURPOSE: Integerized Sinusoidal Library Functions - library routines to perform mapping to and from the Integerized Sinusoidal. These functions perform the mapping from geographic coordinates (longitude/latitude) to the map projection coordinates (x/y). PROGRAMMER DATE REASON ---------- ---- ------ Robert Wolfe (STX) 1-2-97 Initial version. Raj Gejjagaraguppe (ARC) 1-21-97 Modified and added code to make this work with GCTP software. Usage Notes: 1. The following functions are available: isinusforinit - Initialize integerized sinusoidal transformations isinusfor - Forward mapping; converts geographic coordinates (longitude/latitude) to map projection coordinates (x/y) 2. Since there are discontinuities at the top and bottom of each zone within the integerized sinusoidal grid care should be taken when mapping points near the edges of the zones. Also, care should be taken near the discontinuity at the most eastward and westward portions of the projection (180 degrees from the central meridian). 3. Latitudes are expected to in the range [-'HALFPI' to 'HALFPI']. 4. Longitudes are expected to be in the range [-'TWOPI' to 'TWOPI']. 5. The justify flag is used to indicate what to do with zones with an odd number of columns. If it has a value of 0 or 1 it indicates the extra column is on the right (zero) or left (one) of the projection y axis. If the flag is set to 2 the columns are calculated so there are always an even number of column in each zone. 6. The origin is located at the equator which is at the bottom of the first zone above the equator and the top of the first zone below the equator. 7. These routines were designed as an GCTP (General Cartographic Transformation Package) interface to the 'isin' library. *****************************************************************************/ /* #define NO_OUTPUT */ /* if defined, error messages are not written */ /* #define CHECK_EDGE */ /* if defined, statistics are gathered on how * close the column calculations are to being * dependent on the machine precision */ #include #include #include #include #ifndef NO_OUTPUT #include #endif #include "isin.h" #ifndef M_PI #define PI 3.141592653589793 /* Circular constant */ #else #define PI M_PI #endif #define TWOPI (2.0 * PI) #define HALFPI (PI / 2.0) #define TWOPI_INV (1.0 / (2.0 * PI)) #define NROW_MAX (360 * 3600) /* Maximum number of rows (zones) */ #define NZONE_MAX (360 * 3600) /* Maximum number of longitudinal zones */ #define EPS_SPHERE (1.0e-10) /* Minimum sphere radius */ #define EPS_CNVT 0.01 /* Doubles must be within this of an integer to be * valid */ #define ISIN_KEY 212589603 /* Key to verify correct data structure */ /* Local error handling routine */ static void error(const char *routine, const char *text) { #ifndef NO_OUTPUT fprintf(stderr, " error (isinusfor.c/%s : %s\n", routine, text); #endif /* exit(EXIT_FAILURE); */ } /* Error Messages */ static error_t ISIN_BADALLOC = { -3, "memory allocation"}; static error_t ISIN_BADPARAM = { -4, "invalid parameter"}; static error_t ISIN_BADHANDLE = { -5, "invalid handle"}; static error_t ISIN_BADKEY = { -6, "invalid key"}; /* Local data structure for 'Isin' library */ static Isin_t *isin = NULL; /* Functions */ int isinusforinit(double sphere, double lon_cen_mer, double false_east, double false_north, double dzone, double djustify) /* !C****************************************************************************** !Description: isinusforinit (initialize mapping) initializes the integerized sinusoidal transformations. !Input Parameters: sphere radius (meters) longitude of central meridian (radians) easting at projection origin (meters) northing at projection origin (meters) number of longitudinal zones justify flag; flag to indicate what to do with rows with an odd number of columns: 0.0 - indicates the extra column is on the right of the projection y axis; 1.0 - indicates the extra column is on the left of the projection y axis; 2.0 - calculate an even number of columns !Output Parameters: (none) !Team Unique Header: ! Usage Notes: 1. The sphere radius must not be smaller than 'EPS_SPHERE'. 2. The longitude must be in the range [-'TWOPI' to 'TWOPI']. 3. The number of longitudinal zones must be a positive multiple of two and no more than 'NZONE_MAX'. 4. The number of longitudinal zones and the justify flag must be within 'EPS_CNVT' of an integer. !END**************************************************************************** */ { long nzone; /* Number of longitudinal zones */ int ijustify; /* Justify flag (see above) */ int istat; /* Status returned from 'Isin' functions */ /* Check to see if this data set was already initialized; if it was, * free the data structure so it can be re-used */ if (isin != NULL) { istat = Isin_for_free(isin); if (istat != ISIN_SUCCESS) { error("isinusforinit", "bad return from Isin_for_free"); return ISIN_ERROR; } } /* Check the input parameters */ if (sphere <= 0.0) { error("isinusforinit", "bad parameter; sphere radius invalid"); return ISIN_ERROR; } if (lon_cen_mer < -TWOPI || lon_cen_mer > TWOPI) { error("isinusforinit", "bad parameter; longitude of central meridian invalid"); return ISIN_ERROR; } if (dzone < (2.0 - EPS_CNVT) || dzone > ((double) NZONE_MAX + EPS_CNVT)) { error("isinusforinit", "bad parameter; nzone out of range"); return ISIN_ERROR; } nzone = (long) (dzone + EPS_CNVT); if (fabs(dzone - nzone) > EPS_CNVT) { error("isinusforinit", "bad parameter; nzone not near an integer value"); return ISIN_ERROR; } if ((nzone % 2) != 0) { error("isinusforinit", "bad parameter; nzone not multiple of two"); return ISIN_ERROR; } if (djustify < -EPS_CNVT || djustify > (2.0 + EPS_CNVT)) { error("isinusforinit", "bad parameter; ijustify out of range"); return ISIN_ERROR; } ijustify = djustify + EPS_CNVT; if (fabs(djustify - ijustify) > EPS_CNVT) { error("isinusforinit", "bad parameter; ijustify not near an integer value"); return ISIN_ERROR; } /* Initialize the projection */ isin = Isin_for_init(sphere, lon_cen_mer, false_east, false_north, nzone, ijustify); if (isin == NULL) { error("Isin_for_init", "bad return from Isin_for_init"); return ISIN_ERROR; } return ISIN_SUCCESS; } Isin_t *Isin_for_init(double sphere, double lon_cen_mer, double false_east, double false_north, long nrow, int ijustify) /* !C****************************************************************************** !Description: Isin_for_init (initialize mapping) initializes the integerized sinusoidal transformations by calculating constants and a short-cut lookup table. !Input Parameters: sphere sphere radius (user's units) lon_cen_mer longitude of central meridian (radians) false_east easting at projection origin (user's units) false_north northing at projection origin (user's units) nrow number of rows (longitudinal zones) ijustify justify flag; flag to indicate what to do with rows with an odd number of columns; 0 = indicates the extra column is on the right of the projection y axis; 1 = indicates the extra column is on the left of the projection y axis; 2 = calculate an even number of columns !Output Parameters: (returns) a handle for this instance of the integerized sinusoidal projection or NULL for error !Team Unique Header: ! Usage Notes: 1. The sphere radius must not be smaller than 'EPS_SPHERE'. 2. The longitude must be in the range [-'TWOPI' to 'TWOPI']. 3. The number of rows must be a multiple of two and no more than 'NROW_MAX'. !END**************************************************************************** */ { Isin_t *thisIsin; /* 'isin' data structure */ Isin_row_t *row; /* current row data structure */ long irow; /* row (zone) index */ double clat; /* central latitude of the row */ long ncol_cen; /* number of columns in the central row of the grid * (at the equator) */ #ifdef CHECK_EDGE double dcol; /* delta column (normalized by number of columns) */ double dcol_min, /* minimum delta column */ double log2_dcol_min; /* log base 2 of minimum delta column */ dcol_min = 1.0; #endif /* Check input parameters */ if (sphere < EPS_SPHERE) {Isin_error(&ISIN_BADPARAM, "Isin_for_init"); return NULL;} if (lon_cen_mer < -TWOPI || lon_cen_mer > TWOPI) {Isin_error(&ISIN_BADPARAM, "Isin_for_init"); return NULL;} if (lon_cen_mer < PI) lon_cen_mer += TWOPI; if (lon_cen_mer >= PI) lon_cen_mer -= TWOPI; if (nrow < 2 || nrow > NROW_MAX) {Isin_error(&ISIN_BADPARAM, "Isin_for_init"); return NULL;} if ((nrow % 2) != 0) {Isin_error(&ISIN_BADPARAM, "Isin_for_init"); return NULL;} if (ijustify < 0 || ijustify > 2) {Isin_error(&ISIN_BADPARAM, "Isin_for_init"); return NULL;} /* Allocate 'isin' data structure */ thisIsin = (Isin_t *) malloc(sizeof(Isin_t)); if (thisIsin == NULL) {Isin_error(&ISIN_BADALLOC, "Isin_for_init"); return NULL;} /* Initialize data structure */ thisIsin->key = (long) NULL; thisIsin->false_east = false_east; thisIsin->false_north = false_north; thisIsin->sphere = sphere; thisIsin->sphere_inv = 1.0 / sphere; thisIsin->ang_size_inv = ((double) nrow) / PI; thisIsin->nrow = nrow; thisIsin->nrow_half = nrow / 2; thisIsin->lon_cen_mer = lon_cen_mer; thisIsin->ref_lon = lon_cen_mer - PI; if (thisIsin->ref_lon < -PI) thisIsin->ref_lon += TWOPI; thisIsin->ijustify = ijustify; /* Allocate space for information about each row */ thisIsin->row = (Isin_row_t *) malloc(thisIsin->nrow_half * sizeof(Isin_row_t)); if (thisIsin->row == NULL) { free(thisIsin); Isin_error(&ISIN_BADALLOC, "Isin_for_init"); return NULL; } /* Do calculations for each row; calculations are only done for half * the rows because of the symmetry between the rows above the * equator and the ones below */ row = thisIsin->row; for (irow = 0; irow < thisIsin->nrow_half; irow++, row++) { /* Calculate latitude at center of row */ clat = HALFPI * (1.0 - ((double) irow + 0.5) / thisIsin->nrow_half); /* Calculate number of columns per row */ if (ijustify < 2) row->ncol = (long) ((2.0 * cos(clat) * nrow) + 0.5); else { /* make the number of columns even */ row->ncol = (long) ((cos(clat) * nrow) + 0.5); row->ncol *= 2; } #ifdef CHECK_EDGE /* Check to be sure the are no less then three columns per row and that * there are exactly three columns at the poles */ if (ijustify < 2) { if (row->ncol < 3 || (irow == 0 && row->ncol != 3)) printf(" irow = %d ncol = %d\n", irow, row->ncol); } else { if (row->ncol < 6 || (irow == 0 && row->ncol != 6)) printf(" irow = %d ncol = %d\n", irow, row->ncol); } #endif /* Must have at least one column */ if (row->ncol < 1) row->ncol = 1; #ifdef CHECK_EDGE /* Calculate the minimum delta column (normalized by the number of * columns in the row) */ if (ijustify < 2) dcol = fabs((2.0 * cos(clat) * nrow) + 0.5 - row->ncol); else dcol = 2.0 * fabs((cos(clat) * nrow) + 0.5 - (row->ncol / 2)); dcol = dcol / row->ncol; if (dcol < dcol_min) dcol_min = dcol; if (ijustify < 2) { dcol = fabs((2.0 * cos(clat) * nrow) + 0.5 - (row->ncol + 1)); dcol = dcol / (row->ncol + 1); } else { dcol = 2.0 * fabs((cos(clat) * nrow) + 0.5 - ((row->ncol / 2) + 1)); dcol = dcol / (row->ncol + 2); } if (dcol < dcol_min) dcol_min = dcol; #endif /* Save the inverse of the number of columns */ row->ncol_inv = 1.0 / ((double) row->ncol); /* Calculate the column number of the column whose left edge touches the * central meridian */ if (ijustify == 1) row->icol_cen = (row->ncol + 1) / 2; else row->icol_cen = row->ncol / 2; } /* for (irow... */ /* Get the number of columns at the equator */ ncol_cen = thisIsin->row[thisIsin->nrow_half - 1].ncol; #ifdef CHECK_EDGE /* Print the minimum delta column and its base 2 log */ log2_dcol_min = log(dcol_min) / log(2.0); printf(" dcol_min = %g log2_dcol_min = %g\n", dcol_min, log2_dcol_min); /* Check to be sure the number of columns at the equator is twice the * number of rows */ if (ncol_cen != nrow * 2) printf(" ncol_cen = %d nrow = %d\n", ncol_cen, nrow); #endif /* Calculate the distance at the equator between * the centers of two columns (and the inverse) */ thisIsin->col_dist = (TWOPI * sphere) / ncol_cen; thisIsin->col_dist_inv = ncol_cen / (TWOPI * sphere); /* Give the data structure a valid key */ thisIsin->key = ISIN_KEY; /* All done */ return thisIsin; } int isinusfor(double lon, double lat, double *x, double *y) /* !C****************************************************************************** !Description: isinusfor (forward mapping) converts geographic coordinates ('lon', 'lat') to map projection coordinates ('x', 'y'). !Input Parameters: lon longitude (radians) lat latitude (radians) !Output Parameters: x easting in map projection (same units as 'sphere') y northing in map projection (same units as 'sphere') !Team Unique Header: ! Usage Notes: 1. 'isinusforinit' must have been previously called. 2. The longitude must be in the range [-'TWOPI' to 'TWOPI']. 3. The latitude must be in the range [-'HALFPI' to 'HALFPI']. !END**************************************************************************** */ { int istat; /* Status returned from 'Isin_fwd' function */ /* Call 'Isin_fwd' */ istat = Isin_fwd(isin, lon, lat, x, y); if (istat != ISIN_SUCCESS) { error("isinusfor", "bad return from Isin_fwd"); return ISIN_ERROR; } return ISIN_SUCCESS; } int Isin_fwd(const Isin_t *thisIsin, double lon, double lat, double *x, double *y) /* !C****************************************************************************** !Description: Isin_fwd (forward mapping) converts geographic coordinates ('lon', 'lat') to map projection coordinates ('x', 'y'). !Input Parameters: thisIsin handle for this instance of the integerized sinusoidal projection lon longitude (radians) lat latitude (radians) !Output Parameters: x easting in map projection (same units as 'sphere') y northing in map projection (same units as 'sphere') (returns) status: ISIN_SUCCESS - normal return ISIN_ERANGE - longitude or latitude not in range ISIN_ERROR - error return !Team Unique Header: ! Usage Notes: 1. 'Isin_for_init' must have been previously called for the handle. 2. The longitude must be in the range [-'TWOPI' to 'TWOPI']. 3. The latitude must be in the range [-'HALFPI' to 'HALFPI']. !END**************************************************************************** */ { double row, col; /* Row (zone) and column; column is relative to * central; 0.5 is the center of a row or column */ double flon; /* Fractional longitude (multiples of PI) */ long irow; /* Integer row (zone) number */ /* Check input parameters */ *x = 0.0; *y = 0.0; if (thisIsin == NULL) return Isin_error(&ISIN_BADHANDLE, "Isin_fwd"); if (thisIsin->key != ISIN_KEY) return Isin_error(&ISIN_BADKEY, "Isin_fwd"); if (lon < -TWOPI || lon > TWOPI) return ISIN_ERANGE; if (lat < -HALFPI || lat > HALFPI) return ISIN_ERANGE; /* Northing */ *y = thisIsin->false_north + (lat * thisIsin->sphere); /* Integer row number */ row = (HALFPI - lat) * thisIsin->ang_size_inv; irow = (long) row; if (irow >= thisIsin->nrow_half) irow = (thisIsin->nrow - 1) - irow; if (irow < 0) irow = 0; /* Fractional longitude */ flon = (lon - thisIsin->ref_lon) * TWOPI_INV; if (flon < 0.0) flon += (1 - (long) flon); if (flon > 1.0) flon -= (long) flon; /* Column number (relative to center) */ col = (thisIsin->row[irow].ncol * flon) - thisIsin->row[irow].icol_cen; /* Easting */ *x = thisIsin->false_east + (thisIsin->col_dist * col); return ISIN_SUCCESS; } int Isin_for_free(Isin_t *thisIsin) /* !C****************************************************************************** !Description: Isin_for_free (free) deallocates the 'isin' data structure and array memory. !Input Parameters: thisIsin handle for this instance of the integerized sinusoidal projection !Output Parameters: (returns) status: ISIN_SUCCESS - normal return ISIN_ERROR - error return !Team Unique Header: ! Usage Notes: 1. 'Isin_for_init' must have been previously called for the handle. !END**************************************************************************** */ { if (thisIsin == NULL) return Isin_error(&ISIN_BADHANDLE, "Isin_for_free"); if (thisIsin->key != ISIN_KEY) return Isin_error(&ISIN_BADKEY, "Isin_for_free"); /* Set the key to NULL */ thisIsin->key = (long) NULL; /* Free the memory */ free(thisIsin->row); thisIsin->row = NULL; free(thisIsin); thisIsin = NULL; return ISIN_SUCCESS; } static int Isin_error(const error_t *err, const char *routine) /* !C****************************************************************************** !Description: Private function to handle errors. !Input Parameters: err Error structure routine String containing name of routine where error occurred !Output Parameters: (returns) status: ISIN_ERROR - normal return !Team Unique Header: !Usage Notes: (none) !END**************************************************************************** */ { #ifndef NO_OUTPUT fprintf(stderr, " error (isinusfor.c/%s) : (%i) %s\n", routine, err->num, err->str); #endif return ISIN_ERROR; } libgctp-1.0.orig/isinusinv.c0000644000000000000000000004500111236644451013024 0ustar /****************************************************************************** NAME ISINUSINV.C PURPOSE: Integerized Sinusoidal Library Functions - library routines to perform mapping to and from the Integerized Sinusoidal. These functions perform the mapping from projection coordinates (x/y) to the geographic coordinates (longitude/latitude). PROOGRAMMER DATE REASON ---------- ---- ------ Robert Wolfe (STX) 1-2-97 Initial version. Raj Gejjagaraguppe (ARC) 1-24-97 Modified and added code to make this work with GCTP software. ! Usage Notes: 1. The following functions are available: isinusinvinit - Initialize integerized sinusoidal transformations isinusinv - Inverse mapping; converts map projection coordinates (x/y) to geographic coordinates (longitude/latitude) 2. Since there are discontinuities at the top and bottom of each zone within the integerized sinusoidal grid care should be taken when mapping points near the edges of the zones. Also, care should be taken near the discontinuity at the most eastward and westward portions of the projection (180 degrees from the central meridian). 3. Latitudes are expected to in the range [-'HALFPI' to 'HALFPI']. 4. Longitudes are expected to be in the range [-'TWOPI' to 'TWOPI']. 5. The justify flag is used to indicate what to do with zones with an odd number of columns. If it has a value of 0 or 1 it indicates the extra column is on the right (zero) or left (one) of the projection y axis. If the flag is set to 2 the columns are calculated so there are always an even number of column in each zone. 6. The origin is located at the equator which is at the bottom of the first zone above the equator and the top of the first zone below the equator. 7. These routines were designed as an GCTP (General Cartographic Transformation Package) interface to the 'isin' library. !END**************************************************************************** */ /* #define NO_OUTPUT */ /* if defined, error messages are not written */ /* #define CHECK_EDGE */ /* if defined, statistics are gathered on how * close the column calculations are to being * dependent on the machine precision */ #include #include #include #include #ifndef NO_OUTPUT #include #endif #include "isin.h" #ifndef M_PI #define PI 3.141592653589793 /* Circular constant */ #else #define PI M_PI #endif #define TWOPI (2.0 * PI) #define HALFPI (PI / 2.0) #define TWOPI_INV (1.0 / (2.0 * PI)) #define NROW_MAX (360 * 3600) /* Maximum number of rows (zones) */ #define NZONE_MAX (360 * 3600) /* Maximum number of longitudinal zones */ #define EPS_SPHERE (1.0e-10) /* Minimum sphere radius */ #define EPS_CNVT 0.01 /* Doubles must be within this of an integer to be * valid */ #define ISIN_KEY 212589603 /* Key to verify correct data structure */ /* Local error handling routine */ static void error(const char *routine, const char *text) { #ifndef NO_OUTPUT fprintf(stderr, " error (isinusinv.c/%s) : %s\n", routine, text); #endif /* exit(EXIT_FAILURE); */ } /* Error Messages */ static error_t ISIN_BADALLOC = { -3, "memory allocation"}; static error_t ISIN_BADPARAM = { -4, "invalid parameter"}; static error_t ISIN_BADHANDLE = { -5, "invalid handle"}; static error_t ISIN_BADKEY = { -6, "invalid key"}; /* Local data structure for 'Isin' library */ static Isin_t *isin = NULL; /* Functions */ int isinusinvinit(double sphere, double lon_cen_mer, double false_east, double false_north, double dzone, double djustify) /* !C****************************************************************************** !Description: isinusinvinit (initialize mapping) initializes the integerized sinusoidal transformations. !Input Parameters: sphere radius (meters) longitude of central meridian (radians) easting at projection origin (meters) northing at projection origin (meters) number of longitudinal zones justify flag; flag to indicate what to do with rows with an odd number of columns: 0.0 - indicates the extra column is on the right of the projection y axis; 1.0 - indicates the extra column is on the left of the projection y axis; 2.0 - calculate an even number of columns !Output Parameters: (none) !Team Unique Header: ! Usage Notes: 1. The sphere radius must not be smaller than 'EPS_SPHERE'. 2. The longitude must be in the range [-'TWOPI' to 'TWOPI']. 3. The number of longitudinal zones must be a positive multiple of two and no more than 'NZONE_MAX'. 4. The number of longitudinal zones and the justify flag must be within 'EPS_CNVT' of an integer. !END**************************************************************************** */ { long nzone; /* Number of longitudinal zones */ int ijustify; /* Justify flag (see above) */ int istat; /* Status returned from 'Isin' functions */ /* Check to see if this data set was already initialized; if it was, * free the data structure so it can be re-used */ if (isin != NULL) { istat = Isin_inv_free(isin); if (istat != ISIN_SUCCESS) { error("isinusinvinit", "bad return from Isin_inv_free"); return ISIN_ERROR; } } /* Check the input parameters */ if (sphere <= 0.0) { error("isinusinvinit", "bad parameter; sphere radius invalid"); return ISIN_ERROR; } if (lon_cen_mer < -TWOPI || lon_cen_mer > TWOPI) { error("isinusinvinit", "bad parameter; longitude of central meridian invalid"); return ISIN_ERROR; } if (dzone < (2.0 - EPS_CNVT) || dzone > ((double) NZONE_MAX + EPS_CNVT)) { error("isinusinvinit", "bad parameter; nzone out of range"); return ISIN_ERROR; } nzone = dzone + EPS_CNVT; if (fabs(dzone - nzone) > EPS_CNVT) { error("isinusinvinit", "bad parameter; nzone not near an integer value"); return ISIN_ERROR; } if ((nzone % 2) != 0) { error("isinusinvinit", "bad parameter; nzone not multiple of two"); return ISIN_ERROR; } if (djustify < -EPS_CNVT || djustify > (2.0 + EPS_CNVT)) { error("isinusinvinit", "bad parameter; ijustify out of range"); return ISIN_ERROR; } ijustify = djustify + EPS_CNVT; if (fabs(djustify - ijustify) > EPS_CNVT) { error("isinusinvinit", "bad parameter; ijustify not near an integer value"); return ISIN_ERROR; } /* Initialize the projection */ isin = Isin_inv_init(sphere, lon_cen_mer, false_east, false_north, nzone, ijustify); if (isin == NULL) { error("isinusinvinit", "bad return from Isin_inv_init"); return ISIN_ERROR; } return ISIN_SUCCESS; } Isin_t *Isin_inv_init(double sphere, double lon_cen_mer, double false_east, double false_north, long nrow, int ijustify) /* !C****************************************************************************** !Description: Isin_inv_init (initialize mapping) initializes the integerized sinusoidal transformations by calculating constants and a short-cut lookup table. !Input Parameters: sphere sphere radius (meters) lon_cen_mer longitude of central meridian (radians) false_east easting at projection origin (meters) false_north northing at projection origin (meters) nrow number of rows (longitudinal zones) ijustify justify flag; flag to indicate what to do with rows with an odd number of columns; 0 = indicates the extra column is on the right of the projection y axis; 1 = indicates the extra column is on the left of the projection y axis; 2 = calculate an even number of columns !Output Parameters: (returns) a handle for this instance of the integerized sinusoidal projection or NULL for error !Team Unique Header: ! Usage Notes: 1. The sphere radius must not be smaller than 'EPS_SPHERE'. 2. The longitude must be in the range [-'TWOPI' to 'TWOPI']. 3. The number of rows must be a multiple of two and no more than 'NROW_MAX'. !END**************************************************************************** */ { Isin_t *thisIsin; /* 'isin' data structure */ Isin_row_t *row; /* current row data structure */ long irow; /* row (zone) index */ double clat; /* central latitude of the row */ long ncol_cen; /* number of columns in the central row of the grid * (at the equator) */ #ifdef CHECK_EDGE double dcol; /* delta column (normalized by number of columns) */ double dcol_min, /* minimum delta column */ double log2_dcol_min; /* log base 2 of minimum delta column */ dcol_min = 1.0; #endif /* Check input parameters */ if (sphere < EPS_SPHERE) {Isin_error(&ISIN_BADPARAM, "Isin_inv_init"); return NULL;} if (lon_cen_mer < -TWOPI || lon_cen_mer > TWOPI) {Isin_error(&ISIN_BADPARAM, "Isin_inv_init"); return NULL;} if (lon_cen_mer < PI) lon_cen_mer += TWOPI; if (lon_cen_mer >= PI) lon_cen_mer -= TWOPI; if (nrow < 2 || nrow > NROW_MAX) {Isin_error(&ISIN_BADPARAM, "Isin_inv_init"); return NULL;} if ((nrow % 2) != 0) {Isin_error(&ISIN_BADPARAM, "Isin_inv_init"); return NULL;} if (ijustify < 0 || ijustify > 2) {Isin_error(&ISIN_BADPARAM, "Isin_inv_init"); return NULL;} /* Allocate 'isin' data structure */ thisIsin = (Isin_t *) malloc(sizeof(Isin_t)); if (thisIsin == NULL) {Isin_error(&ISIN_BADALLOC, "Isin_inv_init"); return NULL;} /* Initialize data structure */ thisIsin->key = (long) NULL; thisIsin->false_east = false_east; thisIsin->false_north = false_north; thisIsin->sphere = sphere; thisIsin->sphere_inv = 1.0 / sphere; thisIsin->ang_size_inv = ((double) nrow) / PI; thisIsin->nrow = nrow; thisIsin->nrow_half = nrow / 2; thisIsin->lon_cen_mer = lon_cen_mer; thisIsin->ref_lon = lon_cen_mer - PI; if (thisIsin->ref_lon < -PI) thisIsin->ref_lon += TWOPI; thisIsin->ijustify = ijustify; /* Allocate space for information about each row */ thisIsin->row = (Isin_row_t *) malloc(thisIsin->nrow_half * sizeof(Isin_row_t)); if (thisIsin->row == NULL) { free(thisIsin); Isin_error(&ISIN_BADALLOC, "Isin_inv_init"); return NULL; } /* Do calculations for each row; calculations are only done for half * the rows because of the symmetry between the rows above the * equator and the ones below */ row = thisIsin->row; for (irow = 0; irow < thisIsin->nrow_half; irow++, row++) { /* Calculate latitude at center of row */ clat = HALFPI * (1.0 - ((double) irow + 0.5) / thisIsin->nrow_half); /* Calculate number of columns per row */ if (ijustify < 2) row->ncol = (2.0 * cos(clat) * nrow) + 0.5; else { /* make the number of columns even */ row->ncol = (cos(clat) * nrow) + 0.5; row->ncol *= 2; } #ifdef CHECK_EDGE /* Check to be sure the are no less then three columns per row and that * there are exactly three columns at the poles */ if (ijustify < 2) { if (row->ncol < 3 || (irow == 0 && row->ncol != 3)) printf(" irow = %d ncol = %d\n", irow, row->ncol); } else { if (row->ncol < 6 || (irow == 0 && row->ncol != 6)) printf(" irow = %d ncol = %d\n", irow, row->ncol); } #endif /* Must have at least one column */ if (row->ncol < 1) row->ncol = 1; #ifdef CHECK_EDGE /* Calculate the minimum delta column (normalized by the number of * columns in the row) */ if (ijustify < 2) dcol = fabs((2.0 * cos(clat) * nrow) + 0.5 - row->ncol); else dcol = 2.0 * fabs((cos(clat) * nrow) + 0.5 - (row->ncol / 2)); dcol = dcol / row->ncol; if (dcol < dcol_min) dcol_min = dcol; if (ijustify < 2) { dcol = fabs((2.0 * cos(clat) * nrow) + 0.5 - (row->ncol + 1)); dcol = dcol / (row->ncol + 1); } else { dcol = 2.0 * fabs((cos(clat) * nrow) + 0.5 - ((row->ncol / 2) + 1)); dcol = dcol / (row->ncol + 2); } if (dcol < dcol_min) dcol_min = dcol; #endif /* Save the inverse of the number of columns */ row->ncol_inv = 1.0 / ((double) row->ncol); /* Calculate the column number of the column whose left edge touches the * central meridian */ if (ijustify == 1) row->icol_cen = (row->ncol + 1) / 2; else row->icol_cen = row->ncol / 2; } /* for (irow... */ /* Get the number of columns at the equator */ ncol_cen = thisIsin->row[thisIsin->nrow_half - 1].ncol; #ifdef CHECK_EDGE /* Print the minimum delta column and its base 2 log */ log2_dcol_min = log(dcol_min) / log(2.0); printf(" dcol_min = %g log2_dcol_min = %g\n", dcol_min, log2_dcol_min); /* Check to be sure the number of columns at the equator is twice the * number of rows */ if (ncol_cen != nrow * 2) printf(" ncol_cen = %d nrow = %d\n", ncol_cen, nrow); #endif /* Calculate the distance at the equator between * the centers of two columns (and the inverse) */ thisIsin->col_dist = (TWOPI * sphere) / ncol_cen; thisIsin->col_dist_inv = ncol_cen / (TWOPI * sphere); /* Give the data structure a valid key */ thisIsin->key = ISIN_KEY; /* All done */ return thisIsin; } int isinusinv(double x, double y, double *lon, double *lat) /* !C****************************************************************************** !Description: isinusinv (inverse mapping) maps from map projection coordinates ('x', 'y') to geographic coordinates ('lon', 'lat'). !Input Parameters: x easting in map projection (same units as 'sphere') y northing in map projection (same units as 'sphere') !Output Parameters: lon longitude (radians) lat latitude (radians) !Team Unique Header: ! Usage Notes: 1. 'isinus_init' must have been previously called for the handle. 2. The longitude returned is in the range [-'PI' to 'PI'). 3. If the input point is in the fill area of the map projection a status of ISIN_ERANGE is returned. !END**************************************************************************** */ { int istat; /* Status returned from 'Isin_inv' function */ /* Call 'Isin_inv' */ istat = Isin_inv(isin, x, y, lon, lat); if (istat != ISIN_SUCCESS) { error("isinusinv", "bad return from Isin_inv"); return ISIN_ERROR; } return ISIN_SUCCESS; } int Isin_inv(const Isin_t *thisIsin, double x, double y, double *lon, double *lat) /* !C****************************************************************************** !Description: Isin_inv (inverse mapping) maps from map projection coordinates ('x', 'y') to geographic coordinates ('lon', 'lat'). !Input Parameters: thisIsin handle for this instance of the integerized sinusoidal projection x easting in map projection (same units as 'sphere') y northing in map projection (same units as 'sphere') !Output Parameters: lon longitude (radians) lat latitude (radians) (returns) status: ISIN_SUCCESS - normal return ISIN_ERANGE - point not in map projection ISIN_ERROR - error return !Team Unique Header: ! Usage Notes: 1. 'Isin_inv_init' must have been previously called for the handle. 2. The longitude returned is in the range [-'PI' to 'PI'). 3. If the input point is in the fill area of the map projection a status of ISIN_ERANGE is returned. !END**************************************************************************** */ { double row, col; /* Row (zone) and column; column is relative to * central; 0.5 is the center of a row or column */ double flon; /* Fractional longitude (multiples of PI) */ long irow; /* Integer row (zone) number */ /* Check the input parameters */ *lon = 0.0; *lat = 0.0; if (thisIsin == NULL) return Isin_error(&ISIN_BADHANDLE, "Isin_inv"); if (thisIsin->key != ISIN_KEY) return Isin_error(&ISIN_BADKEY, "Isin_inv"); /* Latitude */ *lat = (y - thisIsin->false_north) * thisIsin->sphere_inv; if (*lat < -HALFPI || *lat > HALFPI) {*lat = 0.0; return ISIN_ERANGE;} /* Integer row number */ row = (HALFPI - *lat) * thisIsin->ang_size_inv; irow = row; if (irow >= thisIsin->nrow_half) irow = (thisIsin->nrow - 1) - irow; if (irow < 0) irow = 0; /* Column number (relative to center) */ col = (x - thisIsin->false_east) * thisIsin->col_dist_inv; /* Fractional longitude (between 0 and 1) */ flon = (col + thisIsin->row[irow].icol_cen) * thisIsin->row[irow].ncol_inv; if (flon < 0.0 || flon > 1.0) {*lat = 0.0; return ISIN_ERANGE;} /* Actual longitude */ *lon = thisIsin->ref_lon + (flon * TWOPI); if (*lon >= PI) *lon -= TWOPI; if (*lon < -PI) *lon += TWOPI; return ISIN_SUCCESS; } int Isin_inv_free(Isin_t *thisIsin) /* !C****************************************************************************** !Description: Isin_inv_free (free) deallocates the 'isin' data structure and array memory. !Input Parameters: thisIsin handle for this instance of the integerized sinusoidal projection !Output Parameters: (returns) status: ISIN_SUCCESS - normal return ISIN_ERROR - error return !Team Unique Header: ! Usage Notes: 1. 'Isin_inv_init' must have been previously called for the handle. !END**************************************************************************** */ { if (thisIsin == NULL) return Isin_error(&ISIN_BADHANDLE, "Isin_inv_free"); if (thisIsin->key != ISIN_KEY) return Isin_error(&ISIN_BADKEY, "Isin_inv_free"); /* Set the key to NULL */ thisIsin->key = (long) NULL; /* Free the memory */ free(thisIsin->row); thisIsin->row = NULL; free(thisIsin); thisIsin = NULL; return ISIN_SUCCESS; } static int Isin_error(const error_t *err, const char *routine) /* !C****************************************************************************** !Description: Private function to handle errors. !Input Parameters: err Error structure routine String containing name of routine where error occurred !Output Parameters: (returns) status: ISIN_ERROR - normal return !Team Unique Header: !Usage Notes: (none) !END**************************************************************************** */ { #ifndef NO_OUTPUT fprintf(stderr, " error (isinusinv.c/%s) : (%i) %s\n", routine, err->num, err->str); #endif return ISIN_ERROR; } libgctp-1.0.orig/lamazfor.c0000644000000000000000000000762411236644451012621 0ustar /******************************************************************************* NAME LAMBERT AZIMUTHAL EQUAL-AREA PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Lambert Azimuthal Equal-Area projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS March, 1991 This function was adapted from the Lambert Azimuthal Equal Area projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double sin_lat_o; /* Sine of the center latitude */ static double cos_lat_o; /* Cosine of the center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Lambert Azimuthal Equal Area projection ------------------------------------------------------*/ int lamazforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double center_lat, /* (I) Center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; tsincos(center_lat, &sin_lat_o, &cos_lat_o); /* Report parameters to the user -----------------------------*/ ptitle("LAMBERT AZIMUTHAL EQUAL-AREA"); radius(r); cenlon(center_long); cenlat(center_lat); offsetp(false_easting,false_northing); return(OK); } /* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y -----------------------------------------------------------------------*/ int lamazfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double sin_delta_lon; /* Sine of the delta longitude */ double cos_delta_lon; /* Cosine of the delta longitude */ double sin_lat; /* Sine of the given latitude */ double cos_lat; /* Cosine of the given latitude */ double g; /* temporary varialbe */ double ksp; /* heigth above elipsiod */ char mess[60]; /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); tsincos(lat, &sin_lat, &cos_lat); tsincos(delta_lon, &sin_delta_lon, &cos_delta_lon); g = sin_lat_o * sin_lat + cos_lat_o * cos_lat * cos_delta_lon; if (g == -1.0) { sprintf(mess, "Point projects to a circle of radius = %lf\n", 2.0 * R); p_error(mess, "lamaz-forward"); return(113); } ksp = R * sqrt(2.0 / (1.0 + g)); *x = ksp * cos_lat * sin_delta_lon + false_easting; *y = ksp * (cos_lat_o * sin_lat - sin_lat_o * cos_lat * cos_delta_lon) + false_northing; return(OK); } libgctp-1.0.orig/lamazinv.c0000644000000000000000000001007711236644451012623 0ustar /******************************************************************************* NAME LAMBERT AZIMUTHAL EQUAL-AREA PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Lambert Azimuthal Equal Area projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS March, 1991 S. Nelson,EROS Dec, 1993 changed asin() to asinz() because NaN resulted expecting poles. This function was adapted from the Lambert Azimuthal Equal Area projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double lat_center; /* Center latitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double sin_lat_o; /* Sine of the center latitude */ static double cos_lat_o; /* Cosine of the center latitude */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Lambert Azimuthal Equal Area projection ------------------------------------------------------*/ int lamazinvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double center_lat, /* (I) Center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; lat_center = center_lat; false_easting = false_east; false_northing = false_north; tsincos(center_lat, &sin_lat_o, &cos_lat_o); /* Report parameters to the user -----------------------------*/ ptitle("LAMBERT AZIMUTHAL EQUAL-AREA"); radius(r); cenlon(center_long); cenlat(center_lat); offsetp(false_easting,false_northing); return(OK); } /* Lambert Azimuthal Equal Area inverse equations--mapping x,y to lat,long -----------------------------------------------------------------------*/ int lamazinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double Rh; double z; /* Great circle dist from proj center to given point */ double sin_z; /* Sine of z */ double cos_z; /* Cosine of z */ double temp; /* Re-used temporary variable */ /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; Rh = sqrt(x * x + y * y); temp = Rh / (2.0 * R); if (temp > 1) { p_error("Input data error", "lamaz-inverse"); return(115); } z = 2.0 * asinz(temp); tsincos(z, &sin_z, &cos_z); *lon = lon_center; if (fabs(Rh) > EPSLN) { *lat = asinz(sin_lat_o * cos_z + cos_lat_o * sin_z * y / Rh); temp = fabs(lat_center) - HALF_PI; if (fabs(temp) > EPSLN) { temp = cos_z - sin_lat_o * sin(*lat); if(temp!=0.0)*lon=adjust_lon(lon_center+atan2(x*sin_z*cos_lat_o,temp*Rh)); } else if (lat_center < 0.0) *lon = adjust_lon(lon_center - atan2(-x, y)); else *lon = adjust_lon(lon_center + atan2(x, -y)); } else *lat = lat_center; return(OK); } libgctp-1.0.orig/lamccfor.c0000644000000000000000000001307611236644451012572 0ustar /******************************************************************************* NAME LAMBERT CONFORMAL CONIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Lambert Conformal Conic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan 2-26-93 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double es; /* eccentricity squared */ static double e; /* eccentricity */ static double center_lon; /* center longituted */ static double center_lat; /* cetner latitude */ static double ns; /* ratio of angle between meridian*/ static double f0; /* flattening of ellipsoid */ static double rh; /* height above ellipsoid */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Lambert Conformal conic projection ------------------------------------------------*/ int lamccforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double lat1, /* first standard parallel */ double lat2, /* second standard parallel */ double c_lon, /* center longitude */ double c_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double sin_po; /* sin value */ double cos_po; /* cos value */ double con; /* temporary variable */ double ms1; /* small m 1 */ double ms2; /* small m 2 */ double temp; /* temporary variable */ double ts0; /* small t 0 */ double ts1; /* small t 1 */ double ts2; /* small t 2 */ r_major = r_maj; r_minor = r_min; false_northing = false_north; false_easting = false_east; /* Standard Parallels cannot be equal and on opposite sides of the equator ------------------------------------------------------------------------*/ if (fabs(lat1+lat2) < EPSLN) { p_error("Equal Latitiudes for St. Parallels on opposite sides of equator", "lamcc-for"); return(41); } temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); center_lon = c_lon; center_lat = c_lat; tsincos(lat1,&sin_po,&cos_po); con = sin_po; ms1 = msfnz(e,sin_po,cos_po); ts1 = tsfnz(e,lat1,sin_po); tsincos(lat2,&sin_po,&cos_po); ms2 = msfnz(e,sin_po,cos_po); ts2 = tsfnz(e,lat2,sin_po); sin_po = sin(center_lat); ts0 = tsfnz(e,center_lat,sin_po); if (fabs(lat1 - lat2) > EPSLN) ns = log (ms1/ms2)/ log (ts1/ts2); else ns = con; f0 = ms1 / (ns * pow(ts1,ns)); rh = r_major * f0 * pow(ts0,ns); /* Report parameters to the user -----------------------------*/ ptitle("LAMBERT CONFORMAL CONIC"); radius2(r_major, r_minor); stanparl(lat1,lat2); cenlonmer(center_lon); origin(c_lat); offsetp(false_easting,false_northing); return(OK); } /* Lambert Conformal conic forward equations--mapping lat,long to x,y -----------------------------------------------------------------*/ int lamccfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double con; /* temporary angle variable */ double rh1; /* height above ellipsoid */ double sinphi; /* sin value */ double theta; /* angle */ double ts; /* small value t */ con = fabs( fabs(lat) - HALF_PI); if (con > EPSLN) { sinphi = sin(lat); ts = tsfnz(e,lat,sinphi); rh1 = r_major * f0 * pow(ts,ns); } else { con = lat * ns; if (con <= 0) { p_error("Point can not be projected","lamcc-for"); return(44); } rh1 = 0; } theta = ns * adjust_lon(lon - center_lon); *x = rh1 * sin(theta) + false_easting; *y = rh - rh1 * cos(theta) + false_northing; return(OK); } libgctp-1.0.orig/lamccinv.c0000644000000000000000000001143711236644451012577 0ustar /******************************************************************************* NAME LAMBERT CONFORMAL CONIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Lambert Conformal Conic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan 2-26-93 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double es; /* eccentricity squared */ static double e; /* eccentricity */ static double center_lon; /* center longituted */ static double center_lat; /* cetner latitude */ static double ns; /* ratio of angle between meridian*/ static double f0; /* flattening of ellipsoid */ static double rh; /* height above ellipsoid */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Lambert Conformal Conic projection ------------------------------------------------*/ int lamccinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double lat1, /* first standard parallel */ double lat2, /* second standard parallel */ double c_lon, /* center longitude */ double c_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double sin_po; /* sin value */ double cos_po; /* cos value */ double con; /* temporary sin value */ double ms1; /* small m 1 */ double ms2; /* small m 2 */ double temp; /* temporary variable */ double ts0; /* small t 0 */ double ts1; /* small t 1 */ double ts2; /* small t 2 */ r_major = r_maj; r_minor = r_min; false_easting = false_east; false_northing = false_north; /* Standard Parallels cannot be equal and on opposite sides of the equator ------------------------------------------------------------------------*/ if (fabs(lat1+lat2) < EPSLN) { p_error("Equal Latitiudes for St. Parallels on opposite sides of equator", "lamcc-inv"); return(41); } temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); center_lon = c_lon; center_lat = c_lat; tsincos(lat1,&sin_po,&cos_po); con = sin_po; ms1 = msfnz(e,sin_po,cos_po); ts1 = tsfnz(e,lat1,sin_po); tsincos(lat2,&sin_po,&cos_po); ms2 = msfnz(e,sin_po,cos_po); ts2 = tsfnz(e,lat2,sin_po); sin_po = sin(center_lat); ts0 = tsfnz(e,center_lat,sin_po); if (fabs(lat1 - lat2) > EPSLN) ns = log (ms1/ms2)/ log (ts1/ts2); else ns = con; f0 = ms1 / (ns * pow(ts1,ns)); rh = r_major * f0 * pow(ts0,ns); /* Report parameters to the user -----------------------------*/ ptitle("LAMBERT CONFORMAL CONIC"); radius2(r_major, r_minor); stanparl(lat1,lat2); cenlonmer(center_lon); origin(c_lat); offsetp(false_easting,false_northing); return(OK); } /* Lambert Conformal Conic inverse equations--mapping x,y to lat/long -----------------------------------------------------------------*/ int lamccinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh1; /* height above ellipsoid */ double con; /* sign variable */ double ts; /* small t */ double theta; /* angle */ long flag; /* error flag */ flag = 0; x -= false_easting; y = rh - y + false_northing; if (ns > 0) { rh1 = sqrt (x * x + y * y); con = 1.0; } else { rh1 = -sqrt (x * x + y * y); con = -1.0; } theta = 0.0; if (rh1 != 0) theta = atan2((con * x),(con * y)); if ((rh1 != 0) || (ns > 0.0)) { con = 1.0/ns; ts = pow((rh1/(r_major * f0)),con); *lat = phi2z(e,ts,&flag); if (flag != 0) return(flag); } else *lat = -HALF_PI; *lon = adjust_lon(theta/ns + center_lon); return(OK); } libgctp-1.0.orig/make.com0000755000000000000000000001013011236644451012244 0ustar $! Check to see if the library exists $!----------------------------------- $ open/read/error=cre_lib lib WORLIB:geolib.olb $ close lib $ goto build_lib $! $! Create the library $!------------------- $ cre_lib: $ lib/create WORLIB:geolib.olb $! $! Add the individual routines to the library $!------------------------------------------- $ build_lib: $ $ makesup c_getgrd WORLIB:geolib.olb $ makesup c_grderr WORLIB:geolib.olb $ makesup c_eval WORLIB:geolib.olb $ makesup c_grdred WORLIB:geolib.olb $ makesup c_ptclse WORLIB:geolib.olb $ makesup c_ptio WORLIB:geolib.olb $ makesup c_ptopen WORLIB:geolib.olb $ makesup c_putgrd WORLIB:geolib.olb $ makesup c_steplr WORLIB:geolib.olb $ makesup c_invert WORLIB:geolib.olb $ makesup c_ckptid WORLIB:geolib.olb $ makesup c_getrwt WORLIB:geolib.olb $ makesup c_putrwt WORLIB:geolib.olb $ makesup br_decdeg WORLIB:geolib.olb $ makesup br_degdms WORLIB:geolib.olb $ makesup br_prostr WORLIB:geolib.olb $ makesup c_decdeg WORLIB:geolib.olb $ makesup c_degdms WORLIB:geolib.olb $ makesup c_prostr WORLIB:geolib.olb $ makesup br_proj WORLIB:geolib.olb $ makesup br_projon WORLIB:geolib.olb $ makesup check_dms WORLIB:geolib.olb $ makesup c_proj WORLIB:geolib.olb $ makesup c_projon WORLIB:geolib.olb $ makesup proj_err WORLIB:geolib.olb $ makesup proj_print WORLIB:geolib.olb $ makesup proj_report WORLIB:geolib.olb $ makesup prt_spcs_zone WORLIB:geolib.olb $ makesup spcs_zone WORLIB:geolib.olb $ makesup spheroid WORLIB:geolib.olb $ makesup c_ckunit WORLIB:geolib.olb $ makesup br_ckunit WORLIB:geolib.olb $ makesup c_mapedg WORLIB:geolib.olb $ makesup digitizer WORLIB:geolib.olb $ makesup psupport WORLIB:geolib.olb $ makesup alberfor WORLIB:geolib.olb $ makesup alberinv WORLIB:geolib.olb $ makesup alconfor WORLIB:geolib.olb $ makesup alconinv WORLIB:geolib.olb $ makesup azimfor WORLIB:geolib.olb $ makesup aziminv WORLIB:geolib.olb $ makesup bceafor WORLIB:geolib.olb $ makesup bceainv WORLIB:geolib.olb $ makesup ceafor WORLIB:geolib.olb $ makesup ceainv WORLIB:geolib.olb $ makesup cproj WORLIB:geolib.olb $ makesup eqconfor WORLIB:geolib.olb $ makesup eqconinv WORLIB:geolib.olb $ makesup equifor WORLIB:geolib.olb $ makesup equiinv WORLIB:geolib.olb $ makesup for_init WORLIB:geolib.olb $ makesup gctp WORLIB:geolib.olb $ makesup gnomfor WORLIB:geolib.olb $ makesup gnominv WORLIB:geolib.olb $ makesup goodfor WORLIB:geolib.olb $ makesup goodinv WORLIB:geolib.olb $ makesup gvnspfor WORLIB:geolib.olb $ makesup gvnspinv WORLIB:geolib.olb $ makesup hamfor WORLIB:geolib.olb $ makesup haminv WORLIB:geolib.olb $ makesup imolwfor WORLIB:geolib.olb $ makesup imolwinv WORLIB:geolib.olb $ makesup inv_init WORLIB:geolib.olb $ makesup lamazfor WORLIB:geolib.olb $ makesup lamazinv WORLIB:geolib.olb $ makesup lamccfor WORLIB:geolib.olb $ makesup lamccinv WORLIB:geolib.olb $ makesup merfor WORLIB:geolib.olb $ makesup merinv WORLIB:geolib.olb $ makesup millfor WORLIB:geolib.olb $ makesup millinv WORLIB:geolib.olb $ makesup molwfor WORLIB:geolib.olb $ makesup molwinv WORLIB:geolib.olb $ makesup obleqfor WORLIB:geolib.olb $ makesup obleqinv WORLIB:geolib.olb $ makesup omerfor WORLIB:geolib.olb $ makesup omerinv WORLIB:geolib.olb $ makesup orthfor WORLIB:geolib.olb $ makesup orthinv WORLIB:geolib.olb $ makesup paksz WORLIB:geolib.olb $ makesup polyfor WORLIB:geolib.olb $ makesup polyinv WORLIB:geolib.olb $ makesup psfor WORLIB:geolib.olb $ makesup psinv WORLIB:geolib.olb $ makesup report WORLIB:geolib.olb $ makesup robfor WORLIB:geolib.olb $ makesup robinv WORLIB:geolib.olb $ makesup sinfor WORLIB:geolib.olb $ makesup sininv WORLIB:geolib.olb $ makesup somfor WORLIB:geolib.olb $ makesup sominv WORLIB:geolib.olb $ makesup sphdz WORLIB:geolib.olb $ makesup sterfor WORLIB:geolib.olb $ makesup sterinv WORLIB:geolib.olb $ makesup stplnfor WORLIB:geolib.olb $ makesup stplninv WORLIB:geolib.olb $ makesup tmfor WORLIB:geolib.olb $ makesup tminv WORLIB:geolib.olb $ makesup untfz WORLIB:geolib.olb $ makesup vandgfor WORLIB:geolib.olb $ makesup vandginv WORLIB:geolib.olb $ makesup wivfor WORLIB:geolib.olb $ makesup wivinv WORLIB:geolib.olb $ makesup wviifor WORLIB:geolib.olb $ makesup wviiinv WORLIB:geolib.olb $ exit libgctp-1.0.orig/makeboston0000755000000000000000000001326711236644451012732 0ustar INCDIR = ARCHIVE = libgctpboston.a LIBDIR = SRCDIR = . INCS = cproj.h proj.h INCSIN = isin.h CC = cc -DDEC_ALPHA -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h $(ARCHIVE): $(OBJECTS) ar r libgctpboston.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makecygwin0000755000000000000000000001404711236644451012723 0ustar INCDIR = ARCHIVE = libgctpcygwin.a LIBDIR = ../lib/winnt98 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DCYGWIN -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctpcygwin.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makedec0000755000000000000000000001404011236644451012147 0ustar INCDIR = ARCHIVE = libgctpdec.a LIBDIR = ../lib/dec SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DDEC_ALPHA -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctpdec.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makehp0000755000000000000000000001236611236644451012034 0ustar INCDIR = ARCHIVE = libgctphp.a LIBDIR = ../lib/hp SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -Aa -Ae -DHP9000 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctphp.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makehp110000755000000000000000000001237411236644451012175 0ustar INCDIR = ARCHIVE = libgctphp11.a LIBDIR = ../lib/hp11 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -Aa -Ae -DHP9000 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctphp11.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makeibm0000755000000000000000000001236211236644451012170 0ustar INCDIR = ARCHIVE = libgctpibm.a LIBDIR = ../lib/ibm SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DIBM6000 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpibm.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makelinux0000755000000000000000000001404711236644451012562 0ustar INCDIR = ARCHIVE = libgctplinux.a LIBDIR = ../lib/linux SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -m32 -DLINUX -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctplinux.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makelinux640000755000000000000000000001405011236644451012726 0ustar INCDIR = ARCHIVE = libgctplinux64.a LIBDIR = ../lib/linux64 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DLINUX -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctplinux64.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makelinuxia640000755000000000000000000001405611236644451013246 0ustar INCDIR = ARCHIVE = libgctplinuxia64.a LIBDIR = ../lib/linuxia64 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DLINUX -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctplinuxia64.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makemacintel0000755000000000000000000001405711236644451013220 0ustar INCDIR = ARCHIVE = libgctpmacintel.a LIBDIR = ../lib/macintel SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = gcc -DMACINTEL -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctpmacintel.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makemacintosh0000755000000000000000000001406311236644451013406 0ustar INCDIR = ARCHIVE = libgctpmacintosh.a LIBDIR = ../lib/macintosh SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = gcc -DMACINTOSH -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) ar r libgctpmacintosh.a \ gctp.o alberfor.o alberinv.o alconfor.o alconinv.o azimfor.o \ aziminv.o eqconfor.o eqconinv.o equifor.o equiinv.o gnomfor.o \ gnominv.o goodfor.o goodinv.o gvnspfor.o gvnspinv.o hamfor.o \ haminv.o imolwfor.o imolwinv.o lamazfor.o lamazinv.o merfor.o \ merinv.o millfor.o millinv.o molwfor.o molwinv.o obleqfor.o \ obleqinv.o omerfor.o omerinv.o orthfor.o orthinv.o polyfor.o \ polyinv.o psfor.o psinv.o robfor.o robinv.o sinfor.o sininv.o \ somfor.o sominv.o sterfor.o sterinv.o stplnfor.o stplninv.o \ tmfor.o tminv.o utmfor.o utminv.o vandgfor.o vandginv.o \ wivfor.o wivinv.o wviifor.o wviiinv.o for_init.o inv_init.o \ cproj.o report.o lamccfor.o lamccinv.o paksz.o untfz.o sphdz.o \ br_gctp.o isinusfor.o isinusinv.o \ bceafor.o bceainv.o ceafor.o ceainv.o /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesgi320000755000000000000000000001237611236644451012355 0ustar INCDIR = ARCHIVE = libgctpsgi32.a LIBDIR = ../lib/sgi SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -32 -mips2 -DIRIX -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsgi32.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesgi640000755000000000000000000001240111236644451012347 0ustar INCDIR = ARCHIVE = libgctpsgi64.a LIBDIR = ../lib/sgi64 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -64 -mips4 -DSGI64 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsgi64.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesgi65_640000755000000000000000000001241111236644451012662 0ustar INCDIR = ARCHIVE = libgctpsgi65_64.a LIBDIR = ../lib/irix65 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -64 -mips4 -DSGI64 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsgi65_64.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesgi65_n320000755000000000000000000001241411236644451013036 0ustar INCDIR = ARCHIVE = libgctpsgi65_n32.a LIBDIR = ../lib/irix65 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -n32 -mips3 -DSGI64 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsgi65_n32.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesgin320000755000000000000000000001240411236644451012523 0ustar INCDIR = ARCHIVE = libgctpsgin32.a LIBDIR = ../lib/sgi32 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -n32 -mips3 -DIRIX -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsgin32.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesol2100000755000000000000000000001237311236644451012443 0ustar INCDIR = ARCHIVE = libgctpsol210.a LIBDIR = ../lib/sun5.10 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DSUN10 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsol210.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/makesol250000755000000000000000000001236511236644451012370 0ustar INCDIR = ARCHIVE = libgctpsol25.a LIBDIR = ../lib/sun5 SRCDIR = . INCS = cproj.h proj.h bcea.h INCSIN = isin.h CC = cc -DSUN5 -Dunix OBJECTS= \ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \ $(ARCHIVE)(alconfor.o) $(ARCHIVE)(alconinv.o) \ $(ARCHIVE)(azimfor.o) $(ARCHIVE)(aziminv.o) \ $(ARCHIVE)(bceafor.o) $(ARCHIVE)(bceainv.o) \ $(ARCHIVE)(ceafor.o) $(ARCHIVE)(ceainv.o) \ $(ARCHIVE)(eqconfor.o) $(ARCHIVE)(eqconinv.o) \ $(ARCHIVE)(equifor.o) $(ARCHIVE)(equiinv.o) \ $(ARCHIVE)(gnomfor.o) $(ARCHIVE)(gnominv.o) \ $(ARCHIVE)(goodfor.o) $(ARCHIVE)(goodinv.o) \ $(ARCHIVE)(gvnspfor.o) $(ARCHIVE)(gvnspinv.o) \ $(ARCHIVE)(hamfor.o) $(ARCHIVE)(haminv.o) \ $(ARCHIVE)(imolwfor.o) $(ARCHIVE)(imolwinv.o) \ $(ARCHIVE)(lamazfor.o) $(ARCHIVE)(lamazinv.o) \ $(ARCHIVE)(lamccfor.o) $(ARCHIVE)(lamccinv.o) \ $(ARCHIVE)(merfor.o) $(ARCHIVE)(merinv.o) \ $(ARCHIVE)(millfor.o) $(ARCHIVE)(millinv.o) \ $(ARCHIVE)(molwfor.o) $(ARCHIVE)(molwinv.o) \ $(ARCHIVE)(obleqfor.o) $(ARCHIVE)(obleqinv.o) \ $(ARCHIVE)(omerfor.o) $(ARCHIVE)(omerinv.o) \ $(ARCHIVE)(orthfor.o) $(ARCHIVE)(orthinv.o) \ $(ARCHIVE)(polyfor.o) $(ARCHIVE)(polyinv.o) \ $(ARCHIVE)(psfor.o) $(ARCHIVE)(psinv.o) \ $(ARCHIVE)(robfor.o) $(ARCHIVE)(robinv.o) \ $(ARCHIVE)(sinfor.o) $(ARCHIVE)(sininv.o) \ $(ARCHIVE)(somfor.o) $(ARCHIVE)(sominv.o) \ $(ARCHIVE)(sterfor.o) $(ARCHIVE)(sterinv.o) \ $(ARCHIVE)(stplnfor.o) $(ARCHIVE)(stplninv.o) \ $(ARCHIVE)(tmfor.o) $(ARCHIVE)(tminv.o) \ $(ARCHIVE)(utmfor.o) $(ARCHIVE)(utminv.o) \ $(ARCHIVE)(vandgfor.o) $(ARCHIVE)(vandginv.o) \ $(ARCHIVE)(wivfor.o) $(ARCHIVE)(wivinv.o) \ $(ARCHIVE)(wviifor.o) $(ARCHIVE)(wviiinv.o) \ $(ARCHIVE)(isinusfor.o) $(ARCHIVE)(isinusinv.o) \ $(ARCHIVE)(for_init.o) $(ARCHIVE)(inv_init.o) \ $(ARCHIVE)(cproj.o) $(ARCHIVE)(report.o) \ $(ARCHIVE)(paksz.o) $(ARCHIVE)(sphdz.o) \ $(ARCHIVE)(untfz.o) $(ARCHIVE)(gctp.o) \ $(ARCHIVE)(br_gctp.o) SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c azimfor.c \ aziminv.c eqconfor.c eqconinv.c equifor.c equiinv.c gnomfor.c \ gnominv.c goodfor.c goodinv.c gvnspfor.c gvnspinv.c hamfor.c \ haminv.c imolwfor.c imolwnv.c lamazfor.c lamazinv.c merfor.c \ merinv.c millfor.c millinv.c molwfor.c molwinv.c obleqfor.c \ obleqinv.c omerfor.c omerinv.c orthfor.c orthinv.c polyfor.c \ polyinv.c psfor.c psinv.c robfor.c robinv.c sinfor.c sininv.c \ somfor.c sominv.c sterfor.c sterinv.c stplnfor.c stplninv.c \ tmfor.c tminv.c utmfor.c utminv.c vandgfor.c vandginv.c \ wivfor.c wivinv.c wviifor.c wviiinv.c for_init.c inv_init.c \ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \ br_gctp.c isinusfor.c isinusinv.c Makefile cproj.h proj.h \ bceafor.c bceainv.c ceafor.c ceainv.c $(ARCHIVE): $(OBJECTS) touch libgctpsol25.a /bin/mv $(ARCHIVE) $(LIBDIR)/$(ARCHIVE) $(ARCHIVE)(gctp.o): $(INCS) $(ARCHIVE)(alberfor.o): $(INCS) $(ARCHIVE)(alberinv.o): $(INCS) $(ARCHIVE)(alconfor.o): $(INCS) $(ARCHIVE)(alconinv.o): $(INCS) $(ARCHIVE)(azimfor.o): $(INCS) $(ARCHIVE)(aziminv.o): $(INCS) $(ARCHIVE)(bceafor.o): $(INCS) $(ARCHIVE)(bceainv.o): $(INCS) $(ARCHIVE)(ceafor.o): $(INCS) $(ARCHIVE)(ceainv.o): $(INCS) $(ARCHIVE)(eqconfor.o): $(INCS) $(ARCHIVE)(eqconinv.o): $(INCS) $(ARCHIVE)(equifor.o): $(INCS) $(ARCHIVE)(equiinv.o): $(INCS) $(ARCHIVE)(for_init.o): $(INCS) $(ARCHIVE)(gnomfor.o): $(INCS) $(ARCHIVE)(gnominv.o): $(INCS) $(ARCHIVE)(goodfor.o): $(INCS) $(ARCHIVE)(goodinv.o): $(INCS) $(ARCHIVE)(gvnspfor.o): $(INCS) $(ARCHIVE)(gvnspinv.o): $(INCS) $(ARCHIVE)(hamfor.o): $(INCS) $(ARCHIVE)(haminv.o): $(INCS) $(ARCHIVE)(imolwfor.o): $(INCS) $(ARCHIVE)(imolwinv.o): $(INCS) $(ARCHIVE)(inv_init.o): $(INCS) $(ARCHIVE)(lamazfor.o): $(INCS) $(ARCHIVE)(lamazinv.o): $(INCS) $(ARCHIVE)(lamccfor.o): $(INCS) $(ARCHIVE)(lamccinv.o): $(INCS) $(ARCHIVE)(merfor.o): $(INCS) $(ARCHIVE)(merinv.o): $(INCS) $(ARCHIVE)(millfor.o): $(INCS) $(ARCHIVE)(millinv.o): $(INCS) $(ARCHIVE)(molwfor.o): $(INCS) $(ARCHIVE)(molwinv.o): $(INCS) $(ARCHIVE)(obleqfor.o): $(INCS) $(ARCHIVE)(obleqinv.o): $(INCS) $(ARCHIVE)(omerfor.o): $(INCS) $(ARCHIVE)(omerinv.o): $(INCS) $(ARCHIVE)(orthfor.o): $(INCS) $(ARCHIVE)(orthinv.o): $(INCS) $(ARCHIVE)(paksz.o): $(INCS) $(ARCHIVE)(polyinv.o): $(INCS) $(ARCHIVE)(polyfor.o): $(INCS) $(ARCHIVE)(psinv.o): $(INCS) $(ARCHIVE)(psfor.o): $(INCS) $(ARCHIVE)(robinv.o): $(INCS) $(ARCHIVE)(robfor.o): $(INCS) $(ARCHIVE)(sininv.o): $(INCS) $(ARCHIVE)(sinfor.o): $(INCS) $(ARCHIVE)(sominv.o): $(INCS) $(ARCHIVE)(somfor.o): $(INCS) $(ARCHIVE)(sphdz.o): $(INCS) $(ARCHIVE)(sterinv.o): $(INCS) $(ARCHIVE)(sterfor.o): $(INCS) $(ARCHIVE)(stplninv.o): $(INCS) $(ARCHIVE)(stplnfor.o): $(INCS) $(ARCHIVE)(tminv.o): $(INCS) $(ARCHIVE)(tmfor.o): $(INCS) $(ARCHIVE)(utminv.o): $(INCS) $(ARCHIVE)(utmfor.o): $(INCS) $(ARCHIVE)(untfz.o): $(INCS) $(ARCHIVE)(vandginv.o): $(INCS) $(ARCHIVE)(vandgfor.o): $(INCS) $(ARCHIVE)(wivinv.o): $(INCS) $(ARCHIVE)(wivfor.o): $(INCS) $(ARCHIVE)(wviiinv.o): $(INCS) $(ARCHIVE)(wviifor.o): $(INCS) $(ARCHIVE)(cproj.o): $(INCS) $(ARCHIVE)(report.o): $(INCS) $(ARCHIVE)(br_gctp.o): $(INCS) $(ARCHIVE)(isinusfor.o): $(INCSIN) $(ARCHIVE)(isinusinv.o): $(INCSIN) libgctp-1.0.orig/merfor.c0000644000000000000000000000641511236644451012275 0ustar /******************************************************************************* NAME MERCATOR PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Mercator projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e,es; /* eccentricity constants */ static double m1; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the Mercator projection -------------------------------------------------*/ int merforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ double e0fn(),e1fn(),e2fn(),e3fn(); /* functions */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); m1 = cos(center_lat)/(sqrt(1.0 - es * sin(center_lat) * sin(center_lat))); /* Report parameters to the user -----------------------------*/ ptitle("MERCATOR"); radius2(r_major, r_minor); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Mercator forward equations--mapping lat,long to x,y --------------------------------------------------*/ int merfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double ts; /* small t value */ double sinphi; /* sin value */ /* Forward equations -----------------*/ if (fabs(fabs(lat) - HALF_PI) <= EPSLN) { p_error("Transformation cannot be computed at the poles","mer-forward"); return(53); } else { sinphi = sin(lat); ts = tsfnz(e,lat,sinphi); *x = false_easting + r_major * m1 * adjust_lon(lon - lon_center); *y = false_northing - r_major * m1 * log(ts); } return(OK); } libgctp-1.0.orig/merinv.c0000644000000000000000000000616511236644451012305 0ustar /******************************************************************************* NAME MERCATOR PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Mercator projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e,es; /* eccentricity constants */ static double m1; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the Mercator projection -----------------------------------*/ int merinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ double e0fn(),e1fn(),e2fn(),e3fn(); /* functions */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); m1 = cos(center_lat)/(sqrt(1.0 - es * sin(center_lat) * sin(center_lat))); /* Report parameters to the user -----------------------------*/ ptitle("MERCATOR"); radius2(r_major, r_minor); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Mercator inverse equations--mapping x,y to lat/long --------------------------------------------------*/ int merinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double ts; /* small t value */ long flag; /* error flag */ /* Inverse equations -----------------*/ flag = 0; x -= false_easting; y -= false_northing; ts = exp(-y/(r_major * m1)); *lat = phi2z(e,ts,&flag); if (flag != 0) return(flag); *lon = adjust_lon(lon_center + x/(r_major * m1)); return(OK); } libgctp-1.0.orig/millfor.c0000644000000000000000000000553211236644451012446 0ustar /******************************************************************************* NAME MILLER CYLINDRICAL PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Miller Cylindrical projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Lambert Azimuthal Equal Area projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Miller Cylindrical projection -------------------------------------------*/ int millforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("MILLER CYLINDRICAL"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Miller Cylindrical forward equations--mapping lat,long to x,y ------------------------------------------------------------*/ int millfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); *x = false_easting + R * dlon; *y = false_northing + R * log(tan((PI / 4.0) + (lat / 2.5))) * 1.25; return(OK); } libgctp-1.0.orig/millinv.c0000644000000000000000000000550011236644451012447 0ustar /******************************************************************************* NAME MILLER CYLINDRICAL PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Miller Cylindrical projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Miller Cylindrical projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Miller Cylindrical projection -------------------------------------------*/ int millinvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("MILLER CYLINDRICAL"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Miller Cylindrical inverse equations--mapping x,y to lat/long ------------------------------------------------------------*/ int millinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { /* Inverse equations ------------------*/ x -= false_easting; y -= false_northing; *lon = adjust_lon(lon_center + x / R); *lat = 2.5 * (atan(exp(y / R / 1.25)) - PI / 4.0); return(OK); } libgctp-1.0.orig/molwfor.c0000644000000000000000000000662611236644451012474 0ustar /******************************************************************************* NAME MOLLWEIDE PURPOSE: Transforms input longitude and latitude to Easting and Northing for the MOllweide projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991; Updated Sept, 1992; Updated Feb, 1993 S. Nelson, EDC Jun, 2993; Made corrections in precision and number of iterations. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Mollweide projection ------------------------------------*/ int molwforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ false_easting = false_east; false_northing = false_north; R = r; lon_center = center_long; /* Report parameters to the user -----------------------------*/ ptitle("MOLLWEIDE"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Mollweide forward equations--mapping lat,long to x,y ----------------------------------------------------*/ int molwfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double theta; double delta_theta; double con; long i; /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); theta = lat; con = PI * sin(lat); /* Iterate using the Newton-Raphson method to find theta -----------------------------------------------------*/ for (i=0;;i++) { delta_theta = -(theta + sin(theta) - con)/ (1.0 + cos(theta)); theta += delta_theta; if (fabs(delta_theta) < EPSLN) break; if (i >= 50) { p_error("Iteration failed to converge","Mollweide-forward"); return(241); } } theta /= 2.0; /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting" this is done here because of precision problems with "cos(theta)" --------------------------------------------------------------------------*/ if (PI/2 - fabs(lat) < EPSLN) delta_lon =0; *x = 0.900316316158 * R * delta_lon * cos(theta) + false_easting; *y = 1.4142135623731 * R * sin(theta) + false_northing; return(OK); } libgctp-1.0.orig/molwinv.c0000644000000000000000000000572411236644451012500 0ustar /******************************************************************************* NAME MOLLWEIDE PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Mollweide projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991; Updated Sept, 1992; Updated Feb, 1993 S. Nelson, EROS Nov, 1993; fixed infinite loop at poles ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Mollweide projection ------------------------------------*/ int molwinvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ false_easting = false_east; false_northing = false_north; R = r; lon_center = center_long; /* Report parameters to the user -----------------------------*/ ptitle("MOLLWEIDE"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Mollweide inverse equations--mapping x,y to lat,long ----------------------------------------------------*/ int molwinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double theta; double arg; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; arg = y / (1.4142135623731 * R); /* Because of division by zero problems, 'arg' can not be 1.0. Therefore a number very close to one is used instead. -------------------------------------------------------------------*/ if(fabs(arg) > 0.999999999999) arg=0.999999999999; theta = asin(arg); *lon = adjust_lon(lon_center + (x / (0.900316316158 * R * cos(theta)))); if(*lon < (-PI)) *lon= -PI; if(*lon > PI) *lon= PI; arg = (2.0 * theta + sin(2.0 * theta)) / PI; if(fabs(arg) > 1.0)arg=1.0; *lat = asin(arg); return(OK); } libgctp-1.0.orig/nad1927.dat0000644000000000000000000012047011236644451012414 0ustar ALABAMA EAST 1 NAD27 101 0.6378206400000000D+07 0.6768657997291094D-02 -0.8550000000000000D+06 0.9999600000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3030000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALABAMA WEST 1 NAD27 102 0.6378206400000000D+07 0.6768657997291094D-02 -0.8730000000000000D+06 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3000000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 10 2 NAD27 5010 0.6378206400000000D+07 0.6768657997291094D-02 -0.1760000000000000D+07 0.1000000000000000D+01 0.5350000000000000D+06 0.5150000000000000D+06 0.5100000000000000D+06 0.9144018288036576D+06 0.0000000000000000D+00 AMERICAN SAMOA 2 NAD27 5300 0.6378206400000000D+07 0.6768657997291094D-02 -0.1700000000000000D+07 0.1000000000000000D+01 -0.1416000000000000D+06 -0.1416000000000000D+06 -0.1416000000000000D+06 0.1524003048006096D+06 0.9516931165862332D+05 ARIZONA EAST 1 NAD27 201 0.6378206400000000D+07 0.6768657997291094D-02 -0.1101000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ARIZONA CENTRAL 1 NAD27 202 0.6378206400000000D+07 0.6768657997291094D-02 -0.1115500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ARIZONA WEST 1 NAD27 203 0.6378206400000000D+07 0.6768657997291094D-02 -0.1134500000000000D+07 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ARKANSAS NORTH 2 NAD27 301 0.6378206400000000D+07 0.6768657997291094D-02 -0.9200000000000000D+06 0.1000000000000000D+01 0.3614000000000000D+06 0.3456000000000000D+06 0.3420000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 ARKANSAS SOUTH 2 NAD27 302 0.6378206400000000D+07 0.6768657997291094D-02 -0.9200000000000000D+06 0.1000000000000000D+01 0.3446000000000000D+06 0.3318000000000000D+06 0.3240000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA I 2 NAD27 401 0.6378206400000000D+07 0.6768657997291094D-02 -0.1220000000000000D+07 0.1000000000000000D+01 0.4140000000000000D+06 0.4000000000000000D+06 0.3920000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA II 2 NAD27 402 0.6378206400000000D+07 0.6768657997291094D-02 -0.1220000000000000D+07 0.1000000000000000D+01 0.3950000000000000D+06 0.3820000000000000D+06 0.3740000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA III 2 NAD27 403 0.6378206400000000D+07 0.6768657997291094D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.3826000000000000D+06 0.3704000000000000D+06 0.3630000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA IV 2 NAD27 404 0.6378206400000000D+07 0.6768657997291094D-02 -0.1190000000000000D+07 0.1000000000000000D+01 0.3715000000000000D+06 0.3600000000000000D+06 0.3520000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA V 2 NAD27 405 0.6378206400000000D+07 0.6768657997291094D-02 -0.1180000000000000D+07 0.1000000000000000D+01 0.3528000000000000D+06 0.3402000000000000D+06 0.3330000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA VI 2 NAD27 406 0.6378206400000000D+07 0.6768657997291094D-02 -0.1161500000000000D+07 0.1000000000000000D+01 0.3353000000000000D+06 0.3247000000000000D+06 0.3210000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CALIFORNIA VII 2 NAD27 407 0.6378206400000000D+07 0.6768657997291094D-02 -0.1182000000000000D+07 0.1000000000000000D+01 0.3425000000000000D+06 0.3352000000000000D+06 0.3408000000000000D+06 0.1276106450596901D+07 0.1268253006858014D+07 COLORADO NORTH 2 NAD27 501 0.6378206400000000D+07 0.6768657997291094D-02 -0.1053000000000000D+07 0.1000000000000000D+01 0.4047000000000000D+06 0.3943000000000000D+06 0.3920000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 COLORADO CENTRAL 2 NAD27 502 0.6378206400000000D+07 0.6768657997291094D-02 -0.1053000000000000D+07 0.1000000000000000D+01 0.3945000000000000D+06 0.3827000000000000D+06 0.3750000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 COLORADO SOUTH 2 NAD27 503 0.6378206400000000D+07 0.6768657997291094D-02 -0.1053000000000000D+07 0.1000000000000000D+01 0.3826000000000000D+06 0.3714000000000000D+06 0.3640000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 CONNECTICUT --- 2 NAD27 600 0.6378206400000000D+07 0.6768657997291094D-02 -0.7245000000000000D+06 0.1000000000000000D+01 0.4152000000000000D+06 0.4112000000000000D+06 0.4050000000000000D+06 0.1828803657607315D+06 0.0000000000000000D+00 DELAWARE --- 1 NAD27 700 0.6378206400000000D+07 0.6768657997291094D-02 -0.7525000000000000D+06 0.9999950000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3800000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 FLORIDA EAST 1 NAD27 901 0.6378206400000000D+07 0.6768657997291094D-02 -0.8100000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2420000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 FLORIDA WEST 1 NAD27 902 0.6378206400000000D+07 0.6768657997291094D-02 -0.8200000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2420000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 FLORIDA NORTH 2 NAD27 903 0.6378206400000000D+07 0.6768657997291094D-02 -0.8430000000000000D+06 0.1000000000000000D+01 0.3045000000000000D+06 0.2935000000000000D+06 0.2900000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 GEORGIA EAST 1 NAD27 1001 0.6378206400000000D+07 0.6768657997291094D-02 -0.8210000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3000000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 GEORGIA WEST 1 NAD27 1002 0.6378206400000000D+07 0.6768657997291094D-02 -0.8410000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3000000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 HAWAII 1 1 NAD27 5101 0.6378206400000000D+07 0.6768657997291094D-02 -0.1553000000000000D+07 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.1850000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 HAWAII 2 1 NAD27 5102 0.6378206400000000D+07 0.6768657997291094D-02 -0.1564000000000000D+07 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2020000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 HAWAII 3 1 NAD27 5103 0.6378206400000000D+07 0.6768657997291094D-02 -0.1580000000000000D+07 0.9999900000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2110000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 HAWAII 4 1 NAD27 5104 0.6378206400000000D+07 0.6768657997291094D-02 -0.1593000000000000D+07 0.9999900000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2150000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 HAWAII 5 1 NAD27 5105 0.6378206400000000D+07 0.6768657997291094D-02 -0.1601000000000000D+07 0.1000000000000000D+01 0.0000000000000000D+00 0.0000000000000000D+00 0.2140000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 IDAHO EAST 1 NAD27 1101 0.6378206400000000D+07 0.6768657997291094D-02 -0.1121000000000000D+07 0.9999473684210526D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4140000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 IDAHO CENTRAL 1 NAD27 1102 0.6378206400000000D+07 0.6768657997291094D-02 -0.1140000000000000D+07 0.9999473684210526D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4140000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 IDAHO WEST 1 NAD27 1103 0.6378206400000000D+07 0.6768657997291094D-02 -0.1154500000000000D+07 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4140000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ILLINOIS EAST 1 NAD27 1201 0.6378206400000000D+07 0.6768657997291094D-02 -0.8820000000000000D+06 0.9999750000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3640000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ILLINOIS WEST 1 NAD27 1202 0.6378206400000000D+07 0.6768657997291094D-02 -0.9010000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3640000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 INDIANA EAST 1 NAD27 1301 0.6378206400000000D+07 0.6768657997291094D-02 -0.8540000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3730000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 INDIANA WEST 1 NAD27 1302 0.6378206400000000D+07 0.6768657997291094D-02 -0.8705000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3730000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 IOWA NORTH 2 NAD27 1401 0.6378206400000000D+07 0.6768657997291094D-02 -0.9330000000000000D+06 0.1000000000000000D+01 0.4316000000000000D+06 0.4204000000000000D+06 0.4130000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 IOWA SOUTH 2 NAD27 1402 0.6378206400000000D+07 0.6768657997291094D-02 -0.9330000000000000D+06 0.1000000000000000D+01 0.4147000000000000D+06 0.4037000000000000D+06 0.4000000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 KANSAS NORTH 2 NAD27 1501 0.6378206400000000D+07 0.6768657997291094D-02 -0.9800000000000000D+06 0.1000000000000000D+01 0.3947000000000000D+06 0.3843000000000000D+06 0.3820000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 KANSAS SOUTH 2 NAD27 1502 0.6378206400000000D+07 0.6768657997291094D-02 -0.9830000000000000D+06 0.1000000000000000D+01 0.3834000000000000D+06 0.3716000000000000D+06 0.3640000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 KENTUCKY NORTH 2 NAD27 1601 0.6378206400000000D+07 0.6768657997291094D-02 -0.8415000000000000D+06 0.1000000000000000D+01 0.3858000000000000D+06 0.3758000000000000D+06 0.3730000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 KENTUCKY SOUTH 2 NAD27 1602 0.6378206400000000D+07 0.6768657997291094D-02 -0.8545000000000000D+06 0.1000000000000000D+01 0.3756000000000000D+06 0.3644000000000000D+06 0.3620000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 LOUISIANA NORTH 2 NAD27 1701 0.6378206400000000D+07 0.6768657997291094D-02 -0.9230000000000000D+06 0.1000000000000000D+01 0.3240000000000000D+06 0.3110000000000000D+06 0.3040000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 LOUISIANA SOUTH 2 NAD27 1702 0.6378206400000000D+07 0.6768657997291094D-02 -0.9120000000000000D+06 0.1000000000000000D+01 0.3042000000000000D+06 0.2918000000000000D+06 0.2840000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 LOUISIANA OFFSHORE 2 NAD27 1703 0.6378206400000000D+07 0.6768657997291094D-02 -0.9120000000000000D+06 0.1000000000000000D+01 0.2750000000000000D+06 0.2610000000000000D+06 0.2540000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MAINE EAST 1 NAD27 1801 0.6378206400000000D+07 0.6768657997291094D-02 -0.6830000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4350000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MAINE WEST 1 NAD27 1802 0.6378206400000000D+07 0.6768657997291094D-02 -0.7010000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4250000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MARYLAND --- 2 NAD27 1900 0.6378206400000000D+07 0.6768657997291094D-02 -0.7700000000000000D+06 0.1000000000000000D+01 0.3927000000000000D+06 0.3818000000000000D+06 0.3750000000000000D+06 0.2438404876809754D+06 0.0000000000000000D+00 MASSACHUSETTS MAINLAND 2 NAD27 2001 0.6378206400000000D+07 0.6768657997291094D-02 -0.7130000000000000D+06 0.1000000000000000D+01 0.4241000000000000D+06 0.4143000000000000D+06 0.4100000000000000D+06 0.1828803657607315D+06 0.0000000000000000D+00 MASSACHUSETTS ISLAND 2 NAD27 2002 0.6378206400000000D+07 0.6768657997291094D-02 -0.7030000000000000D+06 0.1000000000000000D+01 0.4129000000000000D+06 0.4117000000000000D+06 0.4100000000000000D+06 0.6096012192024384D+05 0.0000000000000000D+00 MICHIGAN EAST 1 NAD27 2101 0.6378206400000000D+07 0.6768657997291094D-02 -0.8340000000000000D+06 0.9999428571428571D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4130000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MICHIGAN CENTRAL/M 1 NAD27 2102 0.6378206400000000D+07 0.6768657997291094D-02 -0.8545000000000000D+06 0.9999090909090909D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4130000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MICHIGAN WEST 1 NAD27 2103 0.6378206400000000D+07 0.6768657997291094D-02 -0.8845000000000000D+06 0.9999090909090909D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4130000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MICHIGAN NORTH 2 NAD27 2111 0.6378450047000000D+07 0.6768657997291094D-02 -0.8700000000000000D+06 0.1000000000000000D+01 0.4705000000000000D+06 0.4529000000000000D+06 0.4447000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MICHIGAN CENTRAL/L 2 NAD27 2112 0.6378450047000000D+07 0.6768657997291094D-02 -0.8420000000000000D+06 0.1000000000000000D+01 0.4542000000000000D+06 0.4411000000000000D+06 0.4319000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MICHIGAN SOUTH 2 NAD27 2113 0.6378450047000000D+07 0.6768657997291094D-02 -0.8420000000000000D+06 0.1000000000000000D+01 0.4340000000000000D+06 0.4206000000000000D+06 0.4130000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MINNESOTA NORTH 2 NAD27 2201 0.6378206400000000D+07 0.6768657997291094D-02 -0.9306000000000000D+06 0.1000000000000000D+01 0.4838000000000000D+06 0.4702000000000000D+06 0.4630000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MINNESOTA CENTRAL 2 NAD27 2202 0.6378206400000000D+07 0.6768657997291094D-02 -0.9415000000000000D+06 0.1000000000000000D+01 0.4703000000000000D+06 0.4537000000000000D+06 0.4500000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MINNESOTA SOUTH 2 NAD27 2203 0.6378206400000000D+07 0.6768657997291094D-02 -0.9400000000000000D+06 0.1000000000000000D+01 0.4513000000000000D+06 0.4347000000000000D+06 0.4300000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MISSISSIPPI EAST 1 NAD27 2301 0.6378206400000000D+07 0.6768657997291094D-02 -0.8850000000000000D+06 0.9999600000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2940000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MISSISSIPPI WEST 1 NAD27 2302 0.6378206400000000D+07 0.6768657997291094D-02 -0.9020000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3030000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MISSOURI EAST 1 NAD27 2401 0.6378206400000000D+07 0.6768657997291094D-02 -0.9030000000000000D+06 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3550000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MISSOURI CENTRAL 1 NAD27 2402 0.6378206400000000D+07 0.6768657997291094D-02 -0.9230000000000000D+06 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3550000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MISSOURI WEST 1 NAD27 2403 0.6378206400000000D+07 0.6768657997291094D-02 -0.9430000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3610000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MONTANA NORTH 2 NAD27 2501 0.6378206400000000D+07 0.6768657997291094D-02 -0.1093000000000000D+07 0.1000000000000000D+01 0.4843000000000000D+06 0.4751000000000000D+06 0.4700000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MONTANA CENTRAL 2 NAD27 2502 0.6378206400000000D+07 0.6768657997291094D-02 -0.1093000000000000D+07 0.1000000000000000D+01 0.4753000000000000D+06 0.4627000000000000D+06 0.4550000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 MONTANA SOUTH 2 NAD27 2503 0.6378206400000000D+07 0.6768657997291094D-02 -0.1093000000000000D+07 0.1000000000000000D+01 0.4624000000000000D+06 0.4452000000000000D+06 0.4400000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 NEBRASKA NORTH 2 NAD27 2601 0.6378206400000000D+07 0.6768657997291094D-02 -0.1000000000000000D+07 0.1000000000000000D+01 0.4249000000000000D+06 0.4151000000000000D+06 0.4120000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 NEBRASKA SOUTH 2 NAD27 2602 0.6378206400000000D+07 0.6768657997291094D-02 -0.9930000000000000D+06 0.1000000000000000D+01 0.4143000000000000D+06 0.4017000000000000D+06 0.3940000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 NEVADA EAST 1 NAD27 2701 0.6378206400000000D+07 0.6768657997291094D-02 -0.1153500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3445000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEVADA CENTRAL 1 NAD27 2702 0.6378206400000000D+07 0.6768657997291094D-02 -0.1164000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3445000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEVADA WEST 1 NAD27 2703 0.6378206400000000D+07 0.6768657997291094D-02 -0.1183500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3445000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW HAMPSHIRE --- 1 NAD27 2800 0.6378206400000000D+07 0.6768657997291094D-02 -0.7140000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4230000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW JERSEY --- 1 NAD27 2900 0.6378206400000000D+07 0.6768657997291094D-02 -0.7440000000000000D+06 0.9999750000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3850000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 NEW MEXICO EAST 1 NAD27 3001 0.6378206400000000D+07 0.6768657997291094D-02 -0.1042000000000000D+07 0.9999090909090909D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW MEXICO CENTRAL 1 NAD27 3002 0.6378206400000000D+07 0.6768657997291094D-02 -0.1061500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW MEXICO WEST 1 NAD27 3003 0.6378206400000000D+07 0.6768657997291094D-02 -0.1075000000000000D+07 0.9999166666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW YORK EAST 1 NAD27 3101 0.6378206400000000D+07 0.6768657997291094D-02 -0.7420000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4000000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW YORK CENTRAL 1 NAD27 3102 0.6378206400000000D+07 0.6768657997291094D-02 -0.7635000000000000D+06 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4000000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW YORK WEST 1 NAD27 3103 0.6378206400000000D+07 0.6768657997291094D-02 -0.7835000000000000D+06 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4000000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 NEW YORK LONG ISLAND 2 NAD27 3104 0.6378206400000000D+07 0.6768657997291094D-02 -0.7400000000000000D+06 0.1000000000000000D+01 0.4102000000000000D+06 0.4040000000000000D+06 0.4030000000000000D+06 0.6096012192024384D+06 0.3048006096012192D+05 NORTH CAROLINA --- 2 NAD27 3200 0.6378206400000000D+07 0.6768657997291094D-02 -0.7900000000000000D+06 0.1000000000000000D+01 0.3610000000000000D+06 0.3420000000000000D+06 0.3345000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 NORTH DAKOTA NORTH 2 NAD27 3301 0.6378206400000000D+07 0.6768657997291094D-02 -0.1003000000000000D+07 0.1000000000000000D+01 0.4844000000000000D+06 0.4726000000000000D+06 0.4700000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 NORTH DAKOTA SOUTH 2 NAD27 3302 0.6378206400000000D+07 0.6768657997291094D-02 -0.1003000000000000D+07 0.1000000000000000D+01 0.4729000000000000D+06 0.4611000000000000D+06 0.4540000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 OHIO NORTH 2 NAD27 3401 0.6378206400000000D+07 0.6768657997291094D-02 -0.8230000000000000D+06 0.1000000000000000D+01 0.4142000000000000D+06 0.4026000000000000D+06 0.3940000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 OHIO SOUTH 2 NAD27 3402 0.6378206400000000D+07 0.6768657997291094D-02 -0.8230000000000000D+06 0.1000000000000000D+01 0.4002000000000000D+06 0.3844000000000000D+06 0.3800000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 OKLAHOMA NORTH 2 NAD27 3501 0.6378206400000000D+07 0.6768657997291094D-02 -0.9800000000000000D+06 0.1000000000000000D+01 0.3646000000000000D+06 0.3534000000000000D+06 0.3500000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 OKLAHOMA SOUTH 2 NAD27 3502 0.6378206400000000D+07 0.6768657997291094D-02 -0.9800000000000000D+06 0.1000000000000000D+01 0.3514000000000000D+06 0.3356000000000000D+06 0.3320000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 OREGON NORTH 2 NAD27 3601 0.6378206400000000D+07 0.6768657997291094D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.4600000000000000D+06 0.4420000000000000D+06 0.4340000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 OREGON SOUTH 2 NAD27 3602 0.6378206400000000D+07 0.6768657997291094D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.4400000000000000D+06 0.4220000000000000D+06 0.4140000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 PENNSYLVANIA NORTH 2 NAD27 3701 0.6378206400000000D+07 0.6768657997291094D-02 -0.7745000000000000D+06 0.1000000000000000D+01 0.4157000000000000D+06 0.4053000000000000D+06 0.4010000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 PENNSYLVANIA SOUTH 2 NAD27 3702 0.6378206400000000D+07 0.6768657997291094D-02 -0.7745000000000000D+06 0.1000000000000000D+01 0.4058000000000000D+06 0.3956000000000000D+06 0.3920000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 RHODE ISLAND --- 1 NAD27 3800 0.6378206400000000D+07 0.6768657997291094D-02 -0.7130000000000000D+06 0.9999937500000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4105000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 SOUTH CAROLINA NORTH 2 NAD27 3901 0.6378206400000000D+07 0.6768657997291094D-02 -0.8100000000000000D+06 0.1000000000000000D+01 0.3458000000000000D+06 0.3346000000000000D+06 0.3300000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 SOUTH CAROLINA SOUTH 2 NAD27 3902 0.6378206400000000D+07 0.6768657997291094D-02 -0.8100000000000000D+06 0.1000000000000000D+01 0.3340000000000000D+06 0.3220000000000000D+06 0.3150000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 SOUTH DAKOTA NORTH 2 NAD27 4001 0.6378206400000000D+07 0.6768657997291094D-02 -0.1000000000000000D+07 0.1000000000000000D+01 0.4541000000000000D+06 0.4425000000000000D+06 0.4350000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 SOUTH DAKOTA SOUTH 2 NAD27 4002 0.6378206400000000D+07 0.6768657997291094D-02 -0.1002000000000000D+07 0.1000000000000000D+01 0.4424000000000000D+06 0.4250000000000000D+06 0.4220000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 TENNESSEE --- 2 NAD27 4100 0.6378206400000000D+07 0.6768657997291094D-02 -0.8600000000000000D+06 0.1000000000000000D+01 0.3625000000000000D+06 0.3515000000000000D+06 0.3440000000000000D+06 0.6096012192024384D+06 0.3048006096012192D+05 TEXAS NORTH 2 NAD27 4201 0.6378206400000000D+07 0.6768657997291094D-02 -0.1013000000000000D+07 0.1000000000000000D+01 0.3611000000000000D+06 0.3439000000000000D+06 0.3400000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 TEXAS NORTH CENTRAL 2 NAD27 4202 0.6378206400000000D+07 0.6768657997291094D-02 -0.9730000000000000D+06 0.1000000000000000D+01 0.3358000000000000D+06 0.3208000000000000D+06 0.3140000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 TEXAS CENTRAL 2 NAD27 4203 0.6378206400000000D+07 0.6768657997291094D-02 -0.1002000000000000D+07 0.1000000000000000D+01 0.3153000000000000D+06 0.3007000000000000D+06 0.2940000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 TEXAS SOUTH CENTRAL 2 NAD27 4204 0.6378206400000000D+07 0.6768657997291094D-02 -0.9900000000000000D+06 0.1000000000000000D+01 0.3017000000000000D+06 0.2823000000000000D+06 0.2750000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 TEXAS SOUTH 2 NAD27 4205 0.6378206400000000D+07 0.6768657997291094D-02 -0.9830000000000000D+06 0.1000000000000000D+01 0.2750000000000000D+06 0.2610000000000000D+06 0.2540000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 UTAH NORTH 2 NAD27 4301 0.6378206400000000D+07 0.6768657997291094D-02 -0.1113000000000000D+07 0.1000000000000000D+01 0.4147000000000000D+06 0.4043000000000000D+06 0.4020000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 UTAH CENTRAL 2 NAD27 4302 0.6378206400000000D+07 0.6768657997291094D-02 -0.1113000000000000D+07 0.1000000000000000D+01 0.4039000000000000D+06 0.3901000000000000D+06 0.3820000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 UTAH SOUTH 2 NAD27 4303 0.6378206400000000D+07 0.6768657997291094D-02 -0.1113000000000000D+07 0.1000000000000000D+01 0.3821000000000000D+06 0.3713000000000000D+06 0.3640000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 VERMONT --- 1 NAD27 4400 0.6378206400000000D+07 0.6768657997291094D-02 -0.7230000000000000D+06 0.9999642857142857D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4230000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 VIRGINIA NORTH 2 NAD27 4501 0.6378206400000000D+07 0.6768657997291094D-02 -0.7830000000000000D+06 0.1000000000000000D+01 0.3912000000000000D+06 0.3802000000000000D+06 0.3740000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 VIRGINIA SOUTH 2 NAD27 4502 0.6378206400000000D+07 0.6768657997291094D-02 -0.7830000000000000D+06 0.1000000000000000D+01 0.3758000000000000D+06 0.3646000000000000D+06 0.3620000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WASHINGTON NORTH 2 NAD27 4601 0.6378206400000000D+07 0.6768657997291094D-02 -0.1205000000000000D+07 0.1000000000000000D+01 0.4844000000000000D+06 0.4730000000000000D+06 0.4700000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WASHINGTON SOUTH 2 NAD27 4602 0.6378206400000000D+07 0.6768657997291094D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.4720000000000000D+06 0.4550000000000000D+06 0.4520000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WEST VIRGINIA NORTH 2 NAD27 4701 0.6378206400000000D+07 0.6768657997291094D-02 -0.7930000000000000D+06 0.1000000000000000D+01 0.4015000000000000D+06 0.3900000000000000D+06 0.3830000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WEST VIRGINIA SOUTH 2 NAD27 4702 0.6378206400000000D+07 0.6768657997291094D-02 -0.8100000000000000D+06 0.1000000000000000D+01 0.3853000000000000D+06 0.3729000000000000D+06 0.3700000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WISCONSIN NORTH 2 NAD27 4801 0.6378206400000000D+07 0.6768657997291094D-02 -0.9000000000000000D+06 0.1000000000000000D+01 0.4646000000000000D+06 0.4534000000000000D+06 0.4510000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WISCONSIN CENTRAL 2 NAD27 4802 0.6378206400000000D+07 0.6768657997291094D-02 -0.9000000000000000D+06 0.1000000000000000D+01 0.4530000000000000D+06 0.4415000000000000D+06 0.4350000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WISCONSIN SOUTH 2 NAD27 4803 0.6378206400000000D+07 0.6768657997291094D-02 -0.9000000000000000D+06 0.1000000000000000D+01 0.4404000000000000D+06 0.4244000000000000D+06 0.4200000000000000D+06 0.6096012192024384D+06 0.0000000000000000D+00 WYOMING EAST 1 NAD27 4901 0.6378206400000000D+07 0.6768657997291094D-02 -0.1051000000000000D+07 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4040000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 WYOMING EAST CENTRAL 1 NAD27 4902 0.6378206400000000D+07 0.6768657997291094D-02 -0.1072000000000000D+07 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4040000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 WYOMING WEST CENTRAL 1 NAD27 4903 0.6378206400000000D+07 0.6768657997291094D-02 -0.1084500000000000D+07 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4040000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 WYOMING WEST 1 NAD27 4904 0.6378206400000000D+07 0.6768657997291094D-02 -0.1100500000000000D+07 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4040000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 1 4 NAD27 5001 0.6378206400000000D+07 0.6768657997291094D-02 -0.1334000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 -0.3652116315000000D+06 0.5700000000000000D+06 0.8185855672270928D+06 0.5752192451072642D+06 ALASKA ZONE NO. 2 1 NAD27 5002 0.6378206400000000D+07 0.6768657997291094D-02 -0.1420000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 3 1 NAD27 5003 0.6378206400000000D+07 0.6768657997291094D-02 -0.1460000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 4 1 NAD27 5004 0.6378206400000000D+07 0.6768657997291094D-02 -0.1500000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 5 1 NAD27 5005 0.6378206400000000D+07 0.6768657997291094D-02 -0.1540000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 6 1 NAD27 5006 0.6378206400000000D+07 0.6768657997291094D-02 -0.1580000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 7 1 NAD27 5007 0.6378206400000000D+07 0.6768657997291094D-02 -0.1620000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.2133604267208534D+06 0.0000000000000000D+00 ALASKA ZONE NO. 8 1 NAD27 5008 0.6378206400000000D+07 0.6768657997291094D-02 -0.1660000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 ALASKA ZONE NO. 9 1 NAD27 5009 0.6378206400000000D+07 0.6768657997291094D-02 -0.1700000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.1828803657607315D+06 0.0000000000000000D+00 PUERTO RICO AND VIRGIN ISLANDS 2 NAD27 5201 0.6378206400000000D+07 0.6768657997291094D-02 -0.6626000000000000D+06 0.1000000000000000D+01 0.1826000000000000D+06 0.1802000000000000D+06 0.1750000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 VIRGIN ISLANDS ST. CROIX 2 NAD27 5202 0.6378206400000000D+07 0.6768657997291094D-02 -0.6626000000000000D+06 0.1000000000000000D+01 0.1826000000000000D+06 0.1802000000000000D+06 0.1750000000000000D+06 0.1524003048006096D+06 0.3048006096012192D+05 GUAM ISLAND 3 NAD27 5400 0.6378206400000000D+07 0.6768657997291094D-02 0.1444455502540000D+07 0.1328208788700000D+06 0.5000000000000000D+05 0.5000000000000000D+05 0.0000000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 libgctp-1.0.orig/nad1983.dat0000644000000000000000000012047011236644451012416 0ustar ALABAMA EAST 1 NAD83 101 0.6378137000000000D+07 0.6694380022900000D-02 -0.8550000000000000D+06 0.9999600000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3030000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 ALABAMA WEST 1 NAD83 102 0.6378137000000000D+07 0.6694380022900000D-02 -0.8730000000000000D+06 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3000000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 10 2 NAD83 5010 0.6378137000000000D+07 0.6694380022900000D-02 -0.1760000000000000D+07 0.1000000000000000D+01 0.5350000000000000D+06 0.5150000000000000D+06 0.5100000000000000D+06 0.1000000000000000D+07 0.0000000000000000D+00 AMERICAN SAMOA 0 NAD83 5300 0.6378137000000000D+07 0.6694380022900000D-02 -0.1700000000000000D+07 0.1000000000000000D+01 -0.1416000000000000D+06 -0.1416000000000000D+06 -0.1416000000000000D+06 0.1524003048006096D+06 0.9516931165862332D+05 ARIZONA EAST 1 NAD83 201 0.6378137000000000D+07 0.6694380022900000D-02 -0.1101000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.2133600000000000D+06 0.0000000000000000D+00 ARIZONA CENTRAL 1 NAD83 202 0.6378137000000000D+07 0.6694380022900000D-02 -0.1115500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.2133600000000000D+06 0.0000000000000000D+00 ARIZONA WEST 1 NAD83 203 0.6378137000000000D+07 0.6694380022900000D-02 -0.1134500000000000D+07 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.2133600000000000D+06 0.0000000000000000D+00 ARKANSAS NORTH 2 NAD83 301 0.6378137000000000D+07 0.6694380022900000D-02 -0.9200000000000000D+06 0.1000000000000000D+01 0.3614000000000000D+06 0.3456000000000000D+06 0.3420000000000000D+06 0.4000000000000000D+06 0.0000000000000000D+00 ARKANSAS SOUTH 2 NAD83 302 0.6378137000000000D+07 0.6694380022900000D-02 -0.9200000000000000D+06 0.1000000000000000D+01 0.3446000000000000D+06 0.3318000000000000D+06 0.3240000000000000D+06 0.4000000000000000D+06 0.4000000000000000D+06 CALIFORNIA I 2 NAD83 401 0.6378137000000000D+07 0.6694380022900000D-02 -0.1220000000000000D+07 0.1000000000000000D+01 0.4140000000000000D+06 0.4000000000000000D+06 0.3920000000000000D+06 0.2000000000000000D+07 0.5000000000000000D+06 CALIFORNIA II 2 NAD83 402 0.6378137000000000D+07 0.6694380022900000D-02 -0.1220000000000000D+07 0.1000000000000000D+01 0.3950000000000000D+06 0.3820000000000000D+06 0.3740000000000000D+06 0.2000000000000000D+07 0.5000000000000000D+06 CALIFORNIA III 2 NAD83 403 0.6378137000000000D+07 0.6694380022900000D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.3826000000000000D+06 0.3704000000000000D+06 0.3630000000000000D+06 0.2000000000000000D+07 0.5000000000000000D+06 CALIFORNIA IV 2 NAD83 404 0.6378137000000000D+07 0.6694380022900000D-02 -0.1190000000000000D+07 0.1000000000000000D+01 0.3715000000000000D+06 0.3600000000000000D+06 0.3520000000000000D+06 0.2000000000000000D+07 0.5000000000000000D+06 CALIFORNIA V 2 NAD83 405 0.6378137000000000D+07 0.6694380022900000D-02 -0.1180000000000000D+07 0.1000000000000000D+01 0.3528000000000000D+06 0.3402000000000000D+06 0.3330000000000000D+06 0.2000000000000000D+07 0.5000000000000000D+06 CALIFORNIA VI 2 NAD83 406 0.6378137000000000D+07 0.6694380022900000D-02 -0.1161500000000000D+07 0.1000000000000000D+01 0.3353000000000000D+06 0.3247000000000000D+06 0.3210000000000000D+06 0.2000000000000000D+07 0.5000000000000000D+06 CALIFORNIA VII 0 NAD83 407 0.6378137000000000D+07 0.6694380022900000D-02 -0.1182000000000000D+07 0.1000000000000000D+01 0.3425000000000000D+06 0.3352000000000000D+06 0.3408000000000000D+06 0.1276106450596901D+07 0.1268253006858014D+07 COLORADO NORTH 2 NAD83 501 0.6378137000000000D+07 0.6694380022900000D-02 -0.1053000000000000D+07 0.1000000000000000D+01 0.4047000000000000D+06 0.3943000000000000D+06 0.3920000000000000D+06 0.9144018289000000D+06 0.3048006096000000D+06 COLORADO CENTRAL 2 NAD83 502 0.6378137000000000D+07 0.6694380022900000D-02 -0.1053000000000000D+07 0.1000000000000000D+01 0.3945000000000000D+06 0.3827000000000000D+06 0.3750000000000000D+06 0.9144018289000000D+06 0.3048006096000000D+06 COLORADO SOUTH 2 NAD83 503 0.6378137000000000D+07 0.6694380022900000D-02 -0.1053000000000000D+07 0.1000000000000000D+01 0.3826000000000000D+06 0.3714000000000000D+06 0.3640000000000000D+06 0.9144018289000000D+06 0.3048006096000000D+06 CONNECTICUT --- 2 NAD83 600 0.6378137000000000D+07 0.6694380022900000D-02 -0.7245000000000000D+06 0.1000000000000000D+01 0.4152000000000000D+06 0.4112000000000000D+06 0.4050000000000000D+06 0.3048006096000000D+06 0.1524003048000000D+06 DELAWARE --- 1 NAD83 700 0.6378137000000000D+07 0.6694380022900000D-02 -0.7525000000000000D+06 0.9999950000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3800000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 FLORIDA EAST 1 NAD83 901 0.6378137000000000D+07 0.6694380022900000D-02 -0.8100000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2420000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 FLORIDA WEST 1 NAD83 902 0.6378137000000000D+07 0.6694380022900000D-02 -0.8200000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2420000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 FLORIDA NORTH 2 NAD83 903 0.6378137000000000D+07 0.6694380022900000D-02 -0.8430000000000000D+06 0.1000000000000000D+01 0.3045000000000000D+06 0.2935000000000000D+06 0.2900000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 GEORGIA EAST 1 NAD83 1001 0.6378137000000000D+07 0.6694380022900000D-02 -0.8210000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3000000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 GEORGIA WEST 1 NAD83 1002 0.6378137000000000D+07 0.6694380022900000D-02 -0.8410000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3000000000000000D+06 0.7000000000000000D+06 0.0000000000000000D+00 HAWAII 1 1 NAD83 5101 0.6378137000000000D+07 0.6694380022900000D-02 -0.1553000000000000D+07 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.1850000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 HAWAII 2 1 NAD83 5102 0.6378137000000000D+07 0.6694380022900000D-02 -0.1564000000000000D+07 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2020000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 HAWAII 3 1 NAD83 5103 0.6378137000000000D+07 0.6694380022900000D-02 -0.1580000000000000D+07 0.9999900000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2110000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 HAWAII 4 1 NAD83 5104 0.6378137000000000D+07 0.6694380022900000D-02 -0.1593000000000000D+07 0.9999900000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2150000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 HAWAII 5 1 NAD83 5105 0.6378137000000000D+07 0.6694380022900000D-02 -0.1601000000000000D+07 0.1000000000000000D+01 0.0000000000000000D+00 0.0000000000000000D+00 0.2140000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 IDAHO EAST 1 NAD83 1101 0.6378137000000000D+07 0.6694380022900000D-02 -0.1121000000000000D+07 0.9999473684210526D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4140000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 IDAHO CENTRAL 1 NAD83 1102 0.6378137000000000D+07 0.6694380022900000D-02 -0.1140000000000000D+07 0.9999473684210526D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4140000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 IDAHO WEST 1 NAD83 1103 0.6378137000000000D+07 0.6694380022900000D-02 -0.1154500000000000D+07 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4140000000000000D+06 0.8000000000000000D+06 0.0000000000000000D+00 ILLINOIS EAST 1 NAD83 1201 0.6378137000000000D+07 0.6694380022900000D-02 -0.8820000000000000D+06 0.9999750000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3640000000000000D+06 0.3000000000000000D+06 0.0000000000000000D+00 ILLINOIS WEST 1 NAD83 1202 0.6378137000000000D+07 0.6694380022900000D-02 -0.9010000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3640000000000000D+06 0.7000000000000000D+06 0.0000000000000000D+00 INDIANA EAST 1 NAD83 1301 0.6378137000000000D+07 0.6694380022900000D-02 -0.8540000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3730000000000000D+06 0.1000000000000000D+06 0.2500000000000000D+06 INDIANA WEST 1 NAD83 1302 0.6378137000000000D+07 0.6694380022900000D-02 -0.8705000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3730000000000000D+06 0.9000000000000000D+06 0.2500000000000000D+06 IOWA NORTH 2 NAD83 1401 0.6378137000000000D+07 0.6694380022900000D-02 -0.9330000000000000D+06 0.1000000000000000D+01 0.4316000000000000D+06 0.4204000000000000D+06 0.4130000000000000D+06 0.1500000000000000D+07 0.1000000000000000D+07 IOWA SOUTH 2 NAD83 1402 0.6378137000000000D+07 0.6694380022900000D-02 -0.9330000000000000D+06 0.1000000000000000D+01 0.4147000000000000D+06 0.4037000000000000D+06 0.4000000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 KANSAS NORTH 2 NAD83 1501 0.6378137000000000D+07 0.6694380022900000D-02 -0.9800000000000000D+06 0.1000000000000000D+01 0.3947000000000000D+06 0.3843000000000000D+06 0.3820000000000000D+06 0.4000000000000000D+06 0.0000000000000000D+00 KANSAS SOUTH 2 NAD83 1502 0.6378137000000000D+07 0.6694380022900000D-02 -0.9830000000000000D+06 0.1000000000000000D+01 0.3834000000000000D+06 0.3716000000000000D+06 0.3640000000000000D+06 0.4000000000000000D+06 0.4000000000000000D+06 KENTUCKY NORTH 2 NAD83 1601 0.6378137000000000D+07 0.6694380022900000D-02 -0.8415000000000000D+06 0.1000000000000000D+01 0.3858000000000000D+06 0.3758000000000000D+06 0.3730000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 KENTUCKY SOUTH 2 NAD83 1602 0.6378137000000000D+07 0.6694380022900000D-02 -0.8545000000000000D+06 0.1000000000000000D+01 0.3756000000000000D+06 0.3644000000000000D+06 0.3620000000000000D+06 0.5000000000000000D+06 0.5000000000000000D+06 LOUISIANA NORTH 2 NAD83 1701 0.6378137000000000D+07 0.6694380022900000D-02 -0.9230000000000000D+06 0.1000000000000000D+01 0.3240000000000000D+06 0.3110000000000000D+06 0.3030000000000000D+06 0.1000000000000000D+07 0.0000000000000000D+00 LOUISIANA SOUTH 2 NAD83 1702 0.6378137000000000D+07 0.6694380022900000D-02 -0.9120000000000000D+06 0.1000000000000000D+01 0.3042000000000000D+06 0.2918000000000000D+06 0.2830000000000000D+06 0.1000000000000000D+07 0.0000000000000000D+00 LOUISIANA OFFSHORE 2 NAD83 1703 0.6378137000000000D+07 0.6694380022900000D-02 -0.9120000000000000D+06 0.1000000000000000D+01 0.2750000000000000D+06 0.2610000000000000D+06 0.2530000000000000D+06 0.1000000000000000D+07 0.0000000000000000D+00 MAINE EAST 1 NAD83 1801 0.6378137000000000D+07 0.6694380022900000D-02 -0.6830000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4340000000000000D+06 0.3000000000000000D+06 0.0000000000000000D+00 MAINE WEST 1 NAD83 1802 0.6378137000000000D+07 0.6694380022900000D-02 -0.7010000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4250000000000000D+06 0.9000000000000000D+06 0.0000000000000000D+00 MARYLAND --- 2 NAD83 1900 0.6378137000000000D+07 0.6694380022900000D-02 -0.7700000000000000D+06 0.1000000000000000D+01 0.3927000000000000D+06 0.3818000000000000D+06 0.3740000000000000D+06 0.4000000000000000D+06 0.0000000000000000D+00 MASSACHUSETTS MAINLAND 2 NAD83 2001 0.6378137000000000D+07 0.6694380022900000D-02 -0.7130000000000000D+06 0.1000000000000000D+01 0.4241000000000000D+06 0.4143000000000000D+06 0.4100000000000000D+06 0.2000000000000000D+06 0.7500000000000000D+06 MASSACHUSETTS ISLAND 2 NAD83 2002 0.6378137000000000D+07 0.6694380022900000D-02 -0.7030000000000000D+06 0.1000000000000000D+01 0.4129000000000000D+06 0.4117000000000000D+06 0.4100000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 MICHIGAN EAST 0 NAD83 2101 0.6378137000000000D+07 0.6694380022900000D-02 -0.8340000000000000D+06 0.9999428571428571D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4130000000000000D+06 0.0000000000000000D+00 0.0000000000000000D+00 MICHIGAN CENTRAL/M 0 NAD83 2102 0.6378137000000000D+07 0.6694380022900000D-02 -0.8545000000000000D+06 0.9999090909090909D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4130000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MICHIGAN WEST 0 NAD83 2103 0.6378137000000000D+07 0.6694380022900000D-02 -0.8845000000000000D+06 0.9999090909090909D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4130000000000000D+06 0.1524003048006096D+06 0.0000000000000000D+00 MICHIGAN NORTH 2 NAD83 2111 0.6378137000000000D+07 0.6694380022900000D-02 -0.8700000000000000D+06 0.1000000000000000D+01 0.4705000000000000D+06 0.4529000000000000D+06 0.4447000000000000D+06 0.8000000000000000D+07 0.0000000000000000D+00 MICHIGAN CENTRAL/L 2 NAD83 2112 0.6378137000000000D+07 0.6694380022900000D-02 -0.8422000000000000D+06 0.1000000000000000D+01 0.4542000000000000D+06 0.4411000000000000D+06 0.4319000000000000D+06 0.6000000000000000D+07 0.0000000000000000D+00 MICHIGAN SOUTH 2 NAD83 2113 0.6378137000000000D+07 0.6694380022900000D-02 -0.8422000000000000D+06 0.1000000000000000D+01 0.4340000000000000D+06 0.4206000000000000D+06 0.4130000000000000D+06 0.4000000000000000D+07 0.0000000000000000D+00 MINNESOTA NORTH 2 NAD83 2201 0.6378137000000000D+07 0.6694380022900000D-02 -0.9306000000000000D+06 0.1000000000000000D+01 0.4838000000000000D+06 0.4702000000000000D+06 0.4630000000000000D+06 0.8000000000000000D+06 0.1000000000000000D+06 MINNESOTA CENTRAL 2 NAD83 2202 0.6378137000000000D+07 0.6694380022900000D-02 -0.9415000000000000D+06 0.1000000000000000D+01 0.4703000000000000D+06 0.4537000000000000D+06 0.4500000000000000D+06 0.8000000000000000D+06 0.1000000000000000D+06 MINNESOTA SOUTH 2 NAD83 2203 0.6378137000000000D+07 0.6694380022900000D-02 -0.9400000000000000D+06 0.1000000000000000D+01 0.4513000000000000D+06 0.4347000000000000D+06 0.4300000000000000D+06 0.8000000000000000D+06 0.1000000000000000D+06 MISSISSIPPI EAST 1 NAD83 2301 0.6378137000000000D+07 0.6694380022900000D-02 -0.8850000000000000D+06 0.9999500000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2930000000000000D+06 0.3000000000000000D+06 0.0000000000000000D+00 MISSISSIPPI WEST 1 NAD83 2302 0.6378137000000000D+07 0.6694380022900000D-02 -0.9020000000000000D+06 0.9999500000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.2930000000000000D+06 0.7000000000000000D+06 0.0000000000000000D+00 MISSOURI EAST 1 NAD83 2401 0.6378137000000000D+07 0.6694380022900000D-02 -0.9030000000000000D+06 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3550000000000000D+06 0.2500000000000000D+06 0.0000000000000000D+00 MISSOURI CENTRAL 1 NAD83 2402 0.6378137000000000D+07 0.6694380022900000D-02 -0.9230000000000000D+06 0.9999333333333333D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3550000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 MISSOURI WEST 1 NAD83 2403 0.6378137000000000D+07 0.6694380022900000D-02 -0.9430000000000000D+06 0.9999411764705882D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3610000000000000D+06 0.8500000000000000D+06 0.0000000000000000D+00 MONTANA 2 NAD83 2500 0.6378137000000000D+07 0.6694380022900000D-02 -0.1093000000000000D+07 0.1000000000000000D+01 0.4900000000000000D+06 0.4500000000000000D+06 0.4415000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 MONTANA 0 NAD83 2502 0.6378137000000000D+07 0.6694380022900000D-02 -0.1093000000000000D+07 0.1000000000000000D+01 0.4900000000000000D+06 0.4500000000000000D+06 0.4415000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 MONTANA 0 NAD83 2503 0.6378137000000000D+07 0.6694380022900000D-02 -0.1093000000000000D+07 0.1000000000000000D+01 0.4900000000000000D+06 0.4500000000000000D+06 0.4415000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 NEBRASKA 2 NAD83 2600 0.6378137000000000D+07 0.6694380022900000D-02 -0.1000000000000000D+07 0.1000000000000000D+01 0.4300000000000000D+06 0.4000000000000000D+06 0.3950000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 NEBRASKA 0 NAD83 2602 0.6378137000000000D+07 0.6694380022900000D-02 -0.1000000000000000D+07 0.1000000000000000D+01 0.4300000000000000D+06 0.4000000000000000D+06 0.3950000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 NEVADA EAST 1 NAD83 2701 0.6378137000000000D+07 0.6694380022900000D-02 -0.1153500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3445000000000000D+06 0.2000000000000000D+06 0.8000000000000000D+07 NEVADA CENTRAL 1 NAD83 2702 0.6378137000000000D+07 0.6694380022900000D-02 -0.1164000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3445000000000000D+06 0.5000000000000000D+06 0.6000000000000000D+07 NEVADA WEST 1 NAD83 2703 0.6378137000000000D+07 0.6694380022900000D-02 -0.1183500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3445000000000000D+06 0.8000000000000000D+06 0.4000000000000000D+07 NEW HAMPSHIRE --- 1 NAD83 2800 0.6378137000000000D+07 0.6694380022900000D-02 -0.7140000000000000D+06 0.9999666666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4230000000000000D+06 0.3000000000000000D+06 0.0000000000000000D+00 NEW JERSEY --- 1 NAD83 2900 0.6378137000000000D+07 0.6694380022900000D-02 -0.7430000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3850000000000000D+06 0.1500000000000000D+06 0.0000000000000000D+00 NEW MEXICO EAST 1 NAD83 3001 0.6378137000000000D+07 0.6694380022900000D-02 -0.1042000000000000D+07 0.9999090909090909D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.1650000000000000D+06 0.0000000000000000D+00 NEW MEXICO CENTRAL 1 NAD83 3002 0.6378137000000000D+07 0.6694380022900000D-02 -0.1061500000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 NEW MEXICO WEST 1 NAD83 3003 0.6378137000000000D+07 0.6694380022900000D-02 -0.1075000000000000D+07 0.9999166666666667D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3100000000000000D+06 0.8300000000000000D+06 0.0000000000000000D+00 NEW YORK EAST 1 NAD83 3101 0.6378137000000000D+07 0.6694380022900000D-02 -0.7430000000000000D+06 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.3850000000000000D+06 0.1500000000000000D+06 0.0000000000000000D+00 NEW YORK CENTRAL 1 NAD83 3102 0.6378137000000000D+07 0.6694380022900000D-02 -0.7635000000000000D+06 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4000000000000000D+06 0.2500000000000000D+06 0.0000000000000000D+00 NEW YORK WEST 1 NAD83 3103 0.6378137000000000D+07 0.6694380022900000D-02 -0.7835000000000000D+06 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4000000000000000D+06 0.3500000000000000D+06 0.0000000000000000D+00 NEW YORK LONG ISLAND 2 NAD83 3104 0.6378137000000000D+07 0.6694380022900000D-02 -0.7400000000000000D+06 0.1000000000000000D+01 0.4102000000000000D+06 0.4040000000000000D+06 0.4010000000000000D+06 0.3000000000000000D+06 0.0000000000000000D+00 NORTH CAROLINA --- 2 NAD83 3200 0.6378137000000000D+07 0.6694380022900000D-02 -0.7900000000000000D+06 0.1000000000000000D+01 0.3610000000000000D+06 0.3420000000000000D+06 0.3345000000000000D+06 0.6096012200000000D+06 0.0000000000000000D+00 NORTH DAKOTA NORTH 2 NAD83 3301 0.6378137000000000D+07 0.6694380022900000D-02 -0.1003000000000000D+07 0.1000000000000000D+01 0.4844000000000000D+06 0.4726000000000000D+06 0.4700000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 NORTH DAKOTA SOUTH 2 NAD83 3302 0.6378137000000000D+07 0.6694380022900000D-02 -0.1003000000000000D+07 0.1000000000000000D+01 0.4729000000000000D+06 0.4611000000000000D+06 0.4540000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 OHIO NORTH 2 NAD83 3401 0.6378137000000000D+07 0.6694380022900000D-02 -0.8230000000000000D+06 0.1000000000000000D+01 0.4142000000000000D+06 0.4026000000000000D+06 0.3940000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 OHIO SOUTH 2 NAD83 3402 0.6378137000000000D+07 0.6694380022900000D-02 -0.8230000000000000D+06 0.1000000000000000D+01 0.4002000000000000D+06 0.3844000000000000D+06 0.3800000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 OKLAHOMA NORTH 2 NAD83 3501 0.6378137000000000D+07 0.6694380022900000D-02 -0.9800000000000000D+06 0.1000000000000000D+01 0.3646000000000000D+06 0.3534000000000000D+06 0.3500000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 OKLAHOMA SOUTH 2 NAD83 3502 0.6378137000000000D+07 0.6694380022900000D-02 -0.9800000000000000D+06 0.1000000000000000D+01 0.3514000000000000D+06 0.3356000000000000D+06 0.3320000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 OREGON NORTH 2 NAD83 3601 0.6378137000000000D+07 0.6694380022900000D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.4600000000000000D+06 0.4420000000000000D+06 0.4340000000000000D+06 0.2500000000000000D+07 0.0000000000000000D+00 OREGON SOUTH 2 NAD83 3602 0.6378137000000000D+07 0.6694380022900000D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.4400000000000000D+06 0.4220000000000000D+06 0.4140000000000000D+06 0.1500000000000000D+07 0.0000000000000000D+00 PENNSYLVANIA NORTH 2 NAD83 3701 0.6378137000000000D+07 0.6694380022900000D-02 -0.7745000000000000D+06 0.1000000000000000D+01 0.4157000000000000D+06 0.4053000000000000D+06 0.4010000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 PENNSYLVANIA SOUTH 2 NAD83 3702 0.6378137000000000D+07 0.6694380022900000D-02 -0.7745000000000000D+06 0.1000000000000000D+01 0.4058000000000000D+06 0.3956000000000000D+06 0.3920000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 RHODE ISLAND --- 1 NAD83 3800 0.6378137000000000D+07 0.6694380022900000D-02 -0.7130000000000000D+06 0.9999937500000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4105000000000000D+06 0.1000000000000000D+06 0.0000000000000000D+00 SOUTH CAROLINA 2 NAD83 3900 0.6378137000000000D+07 0.6694380022900000D-02 -0.8100000000000000D+06 0.1000000000000000D+01 0.3450000000000000D+06 0.3230000000000000D+06 0.3150000000000000D+06 0.6096000000000000D+06 0.0000000000000000D+00 SOUTH CAROLINA 0 NAD83 3902 0.6378137000000000D+07 0.6694380022900000D-02 -0.8100000000000000D+06 0.1000000000000000D+01 0.3450000000000000D+06 0.3230000000000000D+06 0.3150000000000000D+06 0.6096000000000000D+06 0.0000000000000000D+00 SOUTH DAKOTA NORTH 2 NAD83 4001 0.6378137000000000D+07 0.6694380022900000D-02 -0.1000000000000000D+07 0.1000000000000000D+01 0.4541000000000000D+06 0.4425000000000000D+06 0.4350000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 SOUTH DAKOTA SOUTH 2 NAD83 4002 0.6378137000000000D+07 0.6694380022900000D-02 -0.1002000000000000D+07 0.1000000000000000D+01 0.4424000000000000D+06 0.4250000000000000D+06 0.4220000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 TENNESSEE --- 2 NAD83 4100 0.6378137000000000D+07 0.6694380022900000D-02 -0.8600000000000000D+06 0.1000000000000000D+01 0.3625000000000000D+06 0.3515000000000000D+06 0.3420000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 TEXAS NORTH 2 NAD83 4201 0.6378137000000000D+07 0.6694380022900000D-02 -0.1013000000000000D+07 0.1000000000000000D+01 0.3611000000000000D+06 0.3439000000000000D+06 0.3400000000000000D+06 0.2000000000000000D+06 0.1000000000000000D+07 TEXAS NORTH CENTRAL 2 NAD83 4202 0.6378137000000000D+07 0.6694380022900000D-02 -0.9830000000000000D+06 0.1000000000000000D+01 0.3358000000000000D+06 0.3208000000000000D+06 0.3140000000000000D+06 0.6000000000000000D+06 0.2000000000000000D+07 TEXAS CENTRAL 2 NAD83 4203 0.6378137000000000D+07 0.6694380022900000D-02 -0.1002000000000000D+07 0.1000000000000000D+01 0.3153000000000000D+06 0.3007000000000000D+06 0.2940000000000000D+06 0.7000000000000000D+06 0.3000000000000000D+07 TEXAS SOUTH CENTRAL 2 NAD83 4204 0.6378137000000000D+07 0.6694380022900000D-02 -0.9900000000000000D+06 0.1000000000000000D+01 0.3017000000000000D+06 0.2823000000000000D+06 0.2750000000000000D+06 0.6000000000000000D+06 0.4000000000000000D+07 TEXAS SOUTH 2 NAD83 4205 0.6378137000000000D+07 0.6694380022900000D-02 -0.9830000000000000D+06 0.1000000000000000D+01 0.2750000000000000D+06 0.2610000000000000D+06 0.2540000000000000D+06 0.3000000000000000D+06 0.5000000000000000D+07 UTAH NORTH 2 NAD83 4301 0.6378137000000000D+07 0.6694380022900000D-02 -0.1113000000000000D+07 0.1000000000000000D+01 0.4147000000000000D+06 0.4043000000000000D+06 0.4020000000000000D+06 0.5000000000000000D+06 0.1000000000000000D+07 UTAH CENTRAL 2 NAD83 4302 0.6378137000000000D+07 0.6694380022900000D-02 -0.1113000000000000D+07 0.1000000000000000D+01 0.4039000000000000D+06 0.3901000000000000D+06 0.3820000000000000D+06 0.5000000000000000D+06 0.2000000000000000D+07 UTAH SOUTH 2 NAD83 4303 0.6378137000000000D+07 0.6694380022900000D-02 -0.1113000000000000D+07 0.1000000000000000D+01 0.3821000000000000D+06 0.3713000000000000D+06 0.3640000000000000D+06 0.5000000000000000D+06 0.3000000000000000D+07 VERMONT --- 1 NAD83 4400 0.6378137000000000D+07 0.6694380022900000D-02 -0.7230000000000000D+06 0.9999642857142857D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4230000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 VIRGINIA NORTH 2 NAD83 4501 0.6378137000000000D+07 0.6694380022900000D-02 -0.7830000000000000D+06 0.1000000000000000D+01 0.3912000000000000D+06 0.3802000000000000D+06 0.3740000000000000D+06 0.3500000000000000D+07 0.2000000000000000D+07 VIRGINIA SOUTH 2 NAD83 4502 0.6378137000000000D+07 0.6694380022900000D-02 -0.7830000000000000D+06 0.1000000000000000D+01 0.3758000000000000D+06 0.3646000000000000D+06 0.3620000000000000D+06 0.3500000000000000D+07 0.1000000000000000D+07 WASHINGTON NORTH 2 NAD83 4601 0.6378137000000000D+07 0.6694380022900000D-02 -0.1205000000000000D+07 0.1000000000000000D+01 0.4844000000000000D+06 0.4730000000000000D+06 0.4700000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 WASHINGTON SOUTH 2 NAD83 4602 0.6378137000000000D+07 0.6694380022900000D-02 -0.1203000000000000D+07 0.1000000000000000D+01 0.4720000000000000D+06 0.4550000000000000D+06 0.4520000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 WEST VIRGINIA NORTH 2 NAD83 4701 0.6378137000000000D+07 0.6694380022900000D-02 -0.7930000000000000D+06 0.1000000000000000D+01 0.4015000000000000D+06 0.3900000000000000D+06 0.3830000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 WEST VIRGINIA SOUTH 2 NAD83 4702 0.6378137000000000D+07 0.6694380022900000D-02 -0.8100000000000000D+06 0.1000000000000000D+01 0.3853000000000000D+06 0.3729000000000000D+06 0.3700000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 WISCONSIN NORTH 2 NAD83 4801 0.6378137000000000D+07 0.6694380022900000D-02 -0.9000000000000000D+06 0.1000000000000000D+01 0.4646000000000000D+06 0.4534000000000000D+06 0.4510000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 WISCONSIN CENTRAL 2 NAD83 4802 0.6378137000000000D+07 0.6694380022900000D-02 -0.9000000000000000D+06 0.1000000000000000D+01 0.4530000000000000D+06 0.4415000000000000D+06 0.4350000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 WISCONSIN SOUTH 2 NAD83 4803 0.6378137000000000D+07 0.6694380022900000D-02 -0.9000000000000000D+06 0.1000000000000000D+01 0.4404000000000000D+06 0.4244000000000000D+06 0.4200000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 WYOMING EAST 1 NAD83 4901 0.6378137000000000D+07 0.6694380022900000D-02 -0.1051000000000000D+07 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4030000000000000D+06 0.2000000000000000D+06 0.0000000000000000D+00 WYOMING EAST CENTRAL 1 NAD83 4902 0.6378137000000000D+07 0.6694380022900000D-02 -0.1072000000000000D+07 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4030000000000000D+06 0.4000000000000000D+06 0.1000000000000000D+06 WYOMING WEST CENTRAL 1 NAD83 4903 0.6378137000000000D+07 0.6694380022900000D-02 -0.1084500000000000D+07 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4030000000000000D+06 0.6000000000000000D+06 0.0000000000000000D+00 WYOMING WEST 1 NAD83 4904 0.6378137000000000D+07 0.6694380022900000D-02 -0.1100500000000000D+07 0.9999375000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.4030000000000000D+06 0.8000000000000000D+06 0.1000000000000000D+06 ALASKA ZONE NO. 1 4 NAD83 5001 0.6378137000000000D+07 0.6694380022900000D-02 -0.1334000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 -0.3652116315000000D+06 0.5700000000000000D+06 0.8186767344011233D+06 0.5750976888751927D+06 ALASKA ZONE NO. 2 1 NAD83 5002 0.6378137000000000D+07 0.6694380022900000D-02 -0.1420000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 3 1 NAD83 5003 0.6378137000000000D+07 0.6694380022900000D-02 -0.1460000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 4 1 NAD83 5004 0.6378137000000000D+07 0.6694380022900000D-02 -0.1500000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 5 1 NAD83 5005 0.6378137000000000D+07 0.6694380022900000D-02 -0.1540000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 6 1 NAD83 5006 0.6378137000000000D+07 0.6694380022900000D-02 -0.1580000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 7 1 NAD83 5007 0.6378137000000000D+07 0.6694380022900000D-02 -0.1620000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 8 1 NAD83 5008 0.6378137000000000D+07 0.6694380022900000D-02 -0.1660000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 ALASKA ZONE NO. 9 1 NAD83 5009 0.6378137000000000D+07 0.6694380022900000D-02 -0.1700000000000000D+07 0.9999000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 0.5400000000000000D+06 0.5000000000000000D+06 0.0000000000000000D+00 PUERTO RICO AND VIRGIN ISLANDS 2 NAD83 5200 0.6378137000000000D+07 0.6694380022900000D-02 -0.6626000000000000D+06 0.1000000000000000D+01 0.1826000000000000D+06 0.1802000000000000D+06 0.1750000000000000D+06 0.2000000000000000D+06 0.2000000000000000D+06 VIRGIN ISLANDS ST. CROIX 0 NAD83 5202 0.6378137000000000D+07 0.6694380022900000D-02 -0.6626000000000000D+06 0.1000000000000000D+01 0.1826000000000000D+06 0.1802000000000000D+06 0.1750000000000000D+06 0.1524003048006096D+06 0.3048006096012192D+05 GUAM ISLAND 0 NAD83 5400 0.6378137000000000D+07 0.6694380022900000D-02 0.1444455502540000D+07 0.1328208788700000D+06 0.5000000000000000D+05 0.5000000000000000D+05 0.0000000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00 libgctp-1.0.orig/nad27sp0000644000000000000000000016104011236644451012034 0ustar ALABAMA EAST AXT·™™™š?{¹sËÇ^€Á*°?ïÿ¬)ÜrA~`Aš‚p;MQALABAMA WEST AXT·™™™š?{¹sËÇ^€Á*¤P?ïÿt0›AO€Aš‚p;MQALASKA ZONE NO. 10 AXT·™™™š?{¹sËÇ^€Á:Û?ðA S°AnàA ÀA+çèXóúAMERICAN SAMOA AXT·™™™š?{¹sËÇ^€Á9ð ?ðÁIÁIÁIAš‚p;MQ@÷<üÀ¬ARIZONA EAST AXT·™™™š?{¹sËÇ^€Á0ÌÈ?ïÿ.Hè§AëÀAš‚p;MQARIZONA CENTRAL AXT·™™™š?{¹sËÇ^€Á1l?ïÿ.Hè§AëÀAš‚p;MQARIZONA WEST AXT·™™™š?{¹sËÇ^€Á1O¤?ïÿt0›AëÀAš‚p;MQARKANSAS NORTH AXT·™™™š?{¹sËÇ^€Á,€?ðAàAAßÀA"š‚p;MQARKANSAS SOUTH AXT·™™™š?{¹sËÇ^€Á,€?ðA`A@`AÆ€A"š‚p;MQCALIFORNIA I AXT·™™™š?{¹sËÇ^€Á2 ?ðADÀAjAíA"š‚p;MQCALIFORNIA II AXT·™™™š?{¹sËÇ^€Á2 ?ðAàAPÀAÓÀA"š‚p;MQCALIFORNIA III AXT·™™™š?{¹sËÇ^€Á2[8?ðAZ A›€A'àA"š‚p;MQCALIFORNIA IV AXT·™™™š?{¹sËÇ^€Á2(p?ðA¬°AùA|A"š‚p;MQCALIFORNIA V AXT·™™™š?{¹sËÇ^€Á2`?ðAˆ€AàAS A"š‚p;MQCALIFORNIA VI AXT·™™™š?{¹sËÇ^€Á1¹?ðAwAÑpA— A"š‚p;MQCALIFORNIA VII AXT·™™™š?{¹sËÇ^€Á2 0?ðAçAu€AÍA3xÊsZQ‰A3ZÁrbCOLORADO NORTH AXT·™™™š?{¹sËÇ^€Á0H?ðA³pAðAíA"š‚p;MQCOLORADO CENTRAL AXT·™™™š?{¹sËÇ^€Á0H?ðAA[°Aã`A"š‚p;MQCOLORADO SOUTH AXT·™™™š?{¹sËÇ^€Á0H?ðAZ A« A7€A"š‚p;MQCONNECTICUT --- AXT·™™™š?{¹sËÇ^€Á&(?ðAW€AA¸ ASíö`DELAWARE --- AXT·™™™š?{¹sËÇ^€Á&öè?ïÿõƒ¥;ŽA1€Aš‚p;MQFLORIDA EAST AXT·™™™š?{¹sËÇ^€Á(¸ ?ïÿ„£[­šA Š€Aš‚p;MQFLORIDA WEST AXT·™™™š?{¹sËÇ^€Á)@?ïÿ„£[­šA Š€Aš‚p;MQFLORIDA NORTH AXT·™™™š?{¹sËÇ^€Á)¹ð?ðA•ÐAéðA³@A"š‚p;MQGEORGIA EAST AXT·™™™š?{¹sËÇ^€Á)?ïÿ.Hè§AO€Aš‚p;MQGEORGIA WEST AXT·™™™š?{¹sËÇ^€Á)ªP?ïÿ.Hè§AO€Aš‚p;MQHAWAII 1 AXT·™™™š?{¹sËÇ^€Á7²h?ïÿºM A•@Aš‚p;MQHAWAII 2 AXT·™™™š?{¹sËÇ^€Á7Ý`?ïÿºM A¨€Aš‚p;MQHAWAII 3 AXT·™™™š?{¹sËÇ^€Á8à?ïÿëJwA ÁÀAš‚p;MQHAWAII 4 AXT·™™™š?{¹sËÇ^€Á8N¨?ïÿëJwA >ÀAš‚p;MQHAWAII 5 AXT·™™™š?{¹sËÇ^€Á8mè?ðA €Aš‚p;MQIDAHO EAST AXT·™™™š?{¹sËÇ^€Á1è?ïÿ‘Ÿ¢Þ±ADÀAš‚p;MQIDAHO CENTRAL AXT·™™™š?{¹sËÇ^€Á1e ?ïÿ‘Ÿ¢Þ±ADÀAš‚p;MQIDAHO WEST AXT·™™™š?{¹sËÇ^€Á1Ä?ïÿt0›ADÀAš‚p;MQILLINOIS EAST AXT·™™™š?{¹sËÇ^€Á*ê ?ïÿË’:)ÇA7€Aš‚p;MQILLINOIS WEST AXT·™™™š?{¹sËÇ^€Á+?ïÿ„£[­šA7€Aš‚p;MQINDIANA EAST AXT·™™™š?{¹sËÇ^€Á*à?ïÿºM AÄ Aš‚p;MQINDIANA WEST AXT·™™™š?{¹sËÇ^€Á*È?ïÿºM AÄ Aš‚p;MQIOWA NORTH AXT·™™™š?{¹sËÇ^€Á,y?ðAWÀA¨ÀA5 A"š‚p;MQIOWA SOUTH AXT·™™™š?{¹sËÇ^€Á,y?ðAO°A£ÐAjA"š‚p;MQKANSAS NORTH AXT·™™™š?{¹sËÇ^€Á-è@?ðA0At°APÀA"š‚p;MQKANSAS SOUTH AXT·™™™š?{¹sËÇ^€Á-ÿ°?ðAf A®@A7€A"š‚p;MQKENTUCKY NORTH AXT·™™™š?{¹sËÇ^€Á)®8?ðAŒ AïàAÄ A"š‚p;MQKENTUCKY SOUTH AXT·™™™š?{¹sËÇ^€Á*È?ðAìÀA=ÀA@A"š‚p;MQLOUISIANA NORTH AXT·™™™š?{¹sËÇ^€Á,*ð?ðAÆ€Aû`AŽA"š‚p;MQLOUISIANA SOUTH AXT·™™™š?{¹sËÇ^€Á+Õ?ðA‘ AÏ`AU€A"š‚p;MQLOUISIANA OFFSHORE AXT·™™™š?{¹sËÇ^€Á+Õ?ðAÈàAÜ@A€A"š‚p;MQMAINE EAST AXT·™™™š?{¹sËÇ^€Á$×ð?ïÿ.Hè§AŒàAš‚p;MQMAINE WEST AXT·™™™š?{¹sËÇ^€Á%d?ïÿºM Að Aš‚p;MQMARYLAND --- AXT·™™™š?{¹sËÇ^€Á' ?ðA÷ðAM Aã`A ÄæÅH‚MASSACHUSETTS MAINLAND AXT·™™™š?{¹sËÇ^€Á%ÂP?ðAâAIpA@ASíö`MASSACHUSETTS ISLAND AXT·™™™š?{¹sËÇ^€Á%t0?ðA3A ÐA@@íÄæÅHMICHIGAN EAST AXT·™™™š?{¹sËÇ^€Á)s ?ïÿˆ)©„A5 Aš‚p;MQMICHIGAN CENTRAL/M AXT·™™™š?{¹sËÇ^€Á*È?ïÿAY¯2A5 Aš‚p;MQMICHIGAN WEST AXT·™™™š?{¹sËÇ^€Á*þ(?ïÿAY¯2A5 Aš‚p;MQMICHIGAN NORTH AXTôƒ J?{¹sËÇ^€Á*Œà?ðA·A¤A$pA"š‚p;MQMICHIGAN CENTRAL/L AXTôƒ J?{¹sËÇ^€Á)² ?ðA¸àAì0A\pA"š‚p;MQMICHIGAN SOUTH AXTôƒ J?{¹sËÇ^€Á)² ?ðA}@A«àA5 A"š‚p;MQMINNESOTA NORTH AXT·™™™š?{¹sËÇ^€Á,fP?ðA‡`A²àAB`A"š‚p;MQMINNESOTA CENTRAL AXT·™™™š?{¹sËÇ^€Á,»x?ðA´pA±Aw@A"š‚p;MQMINNESOTA SOUTH AXT·™™™š?{¹sËÇ^€Á,¯À?ðA‹Aˆ0A>ÀA"š‚p;MQMISSISSIPPI EAST AXT·™™™š?{¹sËÇ^€Á+?ïÿ¬)ÜrAñÀAš‚p;MQMISSISSIPPI WEST AXT·™™™š?{¹sËÇ^€Á+†à?ïÿ„£[­šA~`Aš‚p;MQMISSOURI EAST AXT·™™™š?{¹sËÇ^€Á+ް?ïÿt0›AªàAš‚p;MQMISSOURI CENTRAL AXT·™™™š?{¹sËÇ^€Á,*ð?ïÿt0›AªàAš‚p;MQMISSOURI WEST AXT·™™™š?{¹sËÇ^€Á,Ç0?ïÿ„£[­šA Aš‚p;MQMONTANA NORTH AXT·™™™š?{¹sËÇ^€Á0­ˆ?ðA0AÿpA¯ÀA"š‚p;MQMONTANA CENTRAL AXT·™™™š?{¹sËÇ^€Á0­ˆ?ðAA=°AÅ`A"š‚p;MQMONTANA SOUTH AXT·™™™š?{¹sËÇ^€Á0­ˆ?ðA9A,@AÛA"š‚p;MQNEBRASKA NORTH AXT·™™™š?{¹sËÇ^€Á.„€?ðAïAUðA%€A"š‚p;MQNEBRASKA SOUTH AXT·™™™š?{¹sËÇ^€Á.MÐ?ðAIpA„A @A"š‚p;MQNEVADA EAST AXT·™™™š?{¹sËÇ^€Á1™Ü?ïÿ.Hè§AÐAš‚p;MQNEVADA CENTRAL AXT·™™™š?{¹sËÇ^€Á1Âà?ïÿ.Hè§AÐAš‚p;MQNEVADA WEST AXT·™™™š?{¹sËÇ^€Á2 ?ïÿ.Hè§AÐAš‚p;MQNEW HAMPSHIRE --- AXT·™™™š?{¹sËÇ^€Á%Ê ?ïÿºM AÑ`Aš‚p;MQNEW JERSEY --- AXT·™™™š?{¹sËÇ^€Á&´€?ïÿË’:)ÇA A"š‚p;MQNEW MEXICO EAST AXT·™™™š?{¹sËÇ^€Á/Ì ?ïÿAY¯2AëÀAš‚p;MQNEW MEXICO CENTRAL AXT·™™™š?{¹sËÇ^€Á02|?ïÿ.Hè§AëÀAš‚p;MQNEW MEXICO WEST AXT·™™™š?{¹sËÇ^€Á0g8?ïÿQ<ÁàšAëÀAš‚p;MQNEW YORK EAST AXT·™™™š?{¹sËÇ^€Á&¤à?ïÿºM AjAš‚p;MQNEW YORK CENTRAL AXT·™™™š?{¹sËÇ^€Á'LØ?ïÿ|í‘hsAjAš‚p;MQNEW YORK WEST AXT·™™™š?{¹sËÇ^€Á'é?ïÿ|í‘hsAjAš‚p;MQNEW YORK LONG ISLAND AXT·™™™š?{¹sËÇ^€Á&•@?ðA `A¨€A˜àA"š‚p;MQ@ÝÄæÅHNORTH CAROLINA --- AXT·™™™š?{¹sËÇ^€Á(à?ðA AßÀAjA"š‚p;MQNORTH DAKOTA NORTH AXT·™™™š?{¹sËÇ^€Á.›ð?ðAÀAØ`A¯ÀA"š‚p;MQNORTH DAKOTA SOUTH AXT·™™™š?{¹sËÇ^€Á.›ð?ðAÝA$°AµÀA"š‚p;MQOHIO NORTH AXT·™™™š?{¹sËÇ^€Á)°?ðAGàA’ A @A"š‚p;MQOHIO SOUTH AXT·™™™š?{¹sËÇ^€Á)°?ðAm Av@A1€A"š‚p;MQOKLAHOMA NORTH AXT·™™™š?{¹sËÇ^€Á-è@?ðA@àA‘àA\ÀA"š‚p;MQOKLAHOMA SOUTH AXT·™™™š?{¹sËÇ^€Á-è@?ðAr A{ÀAC€A"š‚p;MQOREGON NORTH AXT·™™™š?{¹sËÇ^€Á2[8?ðA€Aú@A}@A"š‚p;MQOREGON SOUTH AXT·™™™š?{¹sËÇ^€Á2[8?ðAÛAÁÀADÀA"š‚p;MQPENNSYLVANIA NORTH AXT·™™™š?{¹sËÇ^€Á'¢È?ðA_PA¼ÐAy A"š‚p;MQPENNSYLVANIA SOUTH AXT·™™™š?{¹sËÇ^€Á'¢È?ðAÄ A%@AíA"š‚p;MQRHODE ISLAND --- AXT·™™™š?{¹sËÇ^€Á%ÂP?ïÿò䎊rAAš‚p;MQSOUTH CAROLINA NORTH AXT·™™™š?{¹sËÇ^€Á(¸ ?ðA Al A$@A"š‚p;MQSOUTH CAROLINA SOUTH AXT·™™™š?{¹sËÇ^€Á(¸ ?ðAbÀA§@A9àA"š‚p;MQSOUTH DAKOTA NORTH AXT·™™™š?{¹sËÇ^€Á.„€?ðA·PAAŒàA"š‚p;MQSOUTH DAKOTA SOUTH AXT·™™™š?{¹sËÇ^€Á.” ?ðA€Að AÁÀA"š‚p;MQTENNESSEE --- AXT·™™™š?{¹sËÇ^€Á*>À?ðA At0AÿA"š‚p;MQ@ÝÄæÅHTEXAS NORTH AXT·™™™š?{¹sËÇ^€Á.ê?ðA 0AýpAÀ€A"š‚p;MQTEXAS NORTH CENTRAL AXT·™™™š?{¹sËÇ^€Á-±?ðA~àA”€A*@A"š‚p;MQTEXAS CENTRAL AXT·™™™š?{¹sËÇ^€Á.” ?ðA>AZpAñÀA"š‚p;MQTEXAS SOUTH CENTRAL AXT·™™™š?{¹sËÇ^€Á.6`?ðAjA:ðAÈàA"š‚p;MQTEXAS SOUTH AXT·™™™š?{¹sËÇ^€Á-ÿ°?ðAÈàAÜ@A€A"š‚p;MQUTAH NORTH AXT·™™™š?{¹sËÇ^€Á0û¨?ðAO°A­0A‰@A"š‚p;MQUTAH CENTRAL AXT·™™™š?{¹sËÇ^€Á0û¨?ðA¦ðAÏPAPÀA"š‚p;MQUTAH SOUTH AXT·™™™š?{¹sËÇ^€Á0û¨?ðARPA©A7€A"š‚p;MQVERMONT --- AXT·™™™š?{¹sËÇ^€Á&p?ïÿµ òŠAÑ`Aš‚p;MQVIRGINIA NORTH AXT·™™™š?{¹sËÇ^€Á'å0?ðAà€A4 AÓÀA"š‚p;MQVIRGINIA SOUTH AXT·™™™š?{¹sËÇ^€Á'å0?ðAïàA@àA@A"š‚p;MQWASHINGTON NORTH AXT·™™™š?{¹sËÇ^€Á2c?ðAÀAÞ A¯ÀA"š‚p;MQWASHINGTON SOUTH AXT·™™™š?{¹sËÇ^€Á2[8?ðAÏAÅ`A–€A"š‚p;MQWEST VIRGINIA NORTH AXT·™™™š?{¹sËÇ^€Á(3P?ðApAÍÀA``A"š‚p;MQWEST VIRGINIA SOUTH AXT·™™™š?{¹sËÇ^€Á(¸ ?ðA„PAÂA•@A"š‚p;MQWISCONSIN NORTH AXT·™™™š?{¹sËÇ^€Á+w@?ðA[`A¬`A†àA"š‚p;MQWISCONSIN CENTRAL AXT·™™™š?{¹sËÇ^€Á+w@?ðA¦ AòpAŒàA"š‚p;MQWISCONSIN SOUTH AXT·™™™š?{¹sËÇ^€Á+w@?ðAá@Aç@A¢€A"š‚p;MQWYOMING EAST AXT·™™™š?{¹sËÇ^€Á0 x?ïÿ„£[­šA¨€Aš‚p;MQWYOMING EAST CENTRAL AXT·™™™š?{¹sËÇ^€Á0[€?ïÿ„£[­šA¨€Aš‚p;MQWYOMING WEST CENTRAL AXT·™™™š?{¹sËÇ^€Á0ŒT?ïÿ„£[­šA¨€Aš‚p;MQWYOMING WEST AXT·™™™š?{¹sËÇ^€Á0ÊÔ?ïÿ„£[­šA¨€Aš‚p;MQALASKA ZONE NO. 1 AXT·™™™š?{¹sËÇ^€Á4Zð?ïÿ.Hè§ÁJn†§ïžA!e A(û3"k–êA!æ}~³ALASKA ZONE NO. 2 AXT·™™™š?{¹sËÇ^€Á5ªà?ïÿ.Hè§A zÀAš‚p;MQALASKA ZONE NO. 3 AXT·™™™š?{¹sËÇ^€Á6G ?ïÿ.Hè§A zÀAš‚p;MQALASKA ZONE NO. 4 AXT·™™™š?{¹sËÇ^€Á6ã`?ïÿ.Hè§A zÀAš‚p;MQALASKA ZONE NO. 5 AXT·™™™š?{¹sËÇ^€Á7 ?ïÿ.Hè§A zÀAš‚p;MQALASKA ZONE NO. 6 AXT·™™™š?{¹sËÇ^€Á8à?ïÿ.Hè§A zÀAš‚p;MQALASKA ZONE NO. 7 AXT·™™™š?{¹sËÇ^€Á8¸ ?ïÿ.Hè§A zÀA ƒiìŸpALASKA ZONE NO. 8 AXT·™™™š?{¹sËÇ^€Á9T`?ïÿ.Hè§A zÀAš‚p;MQALASKA ZONE NO. 9 AXT·™™™š?{¹sËÇ^€Á9ð ?ïÿ.Hè§A zÀASíö`PUERTO RICO AND VIRGIN ISLANDS AXT·™™™š?{¹sËÇ^€Á$8?ðAJ@Aÿ@A\ÀAš‚p;MQVIRGIN ISLANDS ST. CROIX AXT·™™™š?{¹sËÇ^€Á$8?ðAJ@Aÿ@A\ÀAš‚p;MQ@ÝÄæÅHGUAM ISLAND AXT·™™™š?{¹sËÇ^€A6 g€¦v!A6§ìþœ@èj@èjlibgctp-1.0.orig/nad83sp0000644000000000000000000016104011236644451012036 0ustar ALABAMA EAST AXT¦@?{kô>àïÁ*°?ïÿ¬)ÜrA~`AjALABAMA WEST AXT¦@?{kô>àïÁ*¤P?ïÿt0›AO€A"O€ALASKA ZONE NO. 10 AXT¦@?{kô>àïÁ:Û?ðA S°AnàA ÀA.„€AMERICAN SAMOA AXT¦@?{kô>àïÁ9ð ?ðÁIÁIÁIAš‚p;MQ@÷<üÀ¬ARIZONA EAST AXT¦@?{kô>àïÁ0ÌÈ?ïÿ.Hè§AëÀA €ARIZONA CENTRAL AXT¦@?{kô>àïÁ1l?ïÿ.Hè§AëÀA €ARIZONA WEST AXT¦@?{kô>àïÁ1O¤?ïÿt0›AëÀA €ARKANSAS NORTH AXT¦@?{kô>àïÁ,€?ðAàAAßÀAjARKANSAS SOUTH AXT¦@?{kô>àïÁ,€?ðA`A@`AÆ€AjAjCALIFORNIA I AXT¦@?{kô>àïÁ2 ?ðADÀAjAíA>„€A„€CALIFORNIA II AXT¦@?{kô>àïÁ2 ?ðAàAPÀAÓÀA>„€A„€CALIFORNIA III AXT¦@?{kô>àïÁ2[8?ðAZ A›€A'àA>„€A„€CALIFORNIA IV AXT¦@?{kô>àïÁ2(p?ðA¬°AùA|A>„€A„€CALIFORNIA V AXT¦@?{kô>àïÁ2`?ðAˆ€AàAS A>„€A„€CALIFORNIA VI AXT¦@?{kô>àïÁ1¹?ðAwAÑpA— A>„€A„€CALIFORNIA VII AXT¦@?{kô>àïÁ2 0?ðAçAu€AÍA3xÊsZQ‰A3ZÁrbCOLORADO NORTH AXT¦@?{kô>àïÁ0H?ðA³pAðAíA+çèe”°Aš‚p:ûCOLORADO CENTRAL AXT¦@?{kô>àïÁ0H?ðAA[°Aã`A+çèe”°Aš‚p:ûCOLORADO SOUTH AXT¦@?{kô>àïÁ0H?ðAZ A« A7€A+çèe”°Aš‚p:ûCONNECTICUT --- AXT¦@?{kô>àïÁ&(?ðAW€AA¸ Aš‚p:ûAš‚p:ûDELAWARE --- AXT¦@?{kô>àïÁ&öè?ïÿõƒ¥;ŽA1€AjFLORIDA EAST AXT¦@?{kô>àïÁ(¸ ?ïÿ„£[­šA Š€AjFLORIDA WEST AXT¦@?{kô>àïÁ)@?ïÿ„£[­šA Š€AjFLORIDA NORTH AXT¦@?{kô>àïÁ)¹ð?ðA•ÐAéðA³@A"O€GEORGIA EAST AXT¦@?{kô>àïÁ)?ïÿ.Hè§AO€AjGEORGIA WEST AXT¦@?{kô>àïÁ)ªP?ïÿ.Hè§AO€A%\ÀHAWAII 1 AXT¦@?{kô>àïÁ7²h?ïÿºM A•@A„€HAWAII 2 AXT¦@?{kô>àïÁ7Ý`?ïÿºM A¨€A„€HAWAII 3 AXT¦@?{kô>àïÁ8à?ïÿëJwA ÁÀA„€HAWAII 4 AXT¦@?{kô>àïÁ8N¨?ïÿëJwA >ÀA„€HAWAII 5 AXT¦@?{kô>àïÁ8mè?ðA €A„€IDAHO EAST AXT¦@?{kô>àïÁ1è?ïÿ‘Ÿ¢Þ±ADÀAjIDAHO CENTRAL AXT¦@?{kô>àïÁ1e ?ïÿ‘Ÿ¢Þ±ADÀA„€IDAHO WEST AXT¦@?{kô>àïÁ1Ä?ïÿt0›ADÀA(jILLINOIS EAST AXT¦@?{kô>àïÁ*ê ?ïÿË’:)ÇA7€AO€ILLINOIS WEST AXT¦@?{kô>àïÁ+?ïÿ„£[­šA7€A%\ÀINDIANA EAST AXT¦@?{kô>àïÁ*à?ïÿºM AÄ @øjA„€INDIANA WEST AXT¦@?{kô>àïÁ*È?ïÿºM AÄ A+w@A„€IOWA NORTH AXT¦@?{kô>àïÁ,y?ðAWÀA¨ÀA5 A6ã`A.„€IOWA SOUTH AXT¦@?{kô>àïÁ,y?ðAO°A£ÐAjA„€KANSAS NORTH AXT¦@?{kô>àïÁ-è@?ðA0At°APÀAjKANSAS SOUTH AXT¦@?{kô>àïÁ-ÿ°?ðAf A®@A7€AjAjKENTUCKY NORTH AXT¦@?{kô>àïÁ)®8?ðAŒ AïàAÄ A„€KENTUCKY SOUTH AXT¦@?{kô>àïÁ*È?ðAìÀA=ÀA@A„€A„€LOUISIANA NORTH AXT¦@?{kô>àïÁ,*ð?ðAÆ€Aû`A~`A.„€LOUISIANA SOUTH AXT¦@?{kô>àïÁ+Õ?ðA‘ AÏ`AEàA.„€LOUISIANA OFFSHORE AXT¦@?{kô>àïÁ+Õ?ðAÈàAÜ@Aâ@A.„€MAINE EAST AXT¦@?{kô>àïÁ$×ð?ïÿ.Hè§A}@AO€MAINE WEST AXT¦@?{kô>àïÁ%d?ïÿºM Að A+w@MARYLAND --- AXT¦@?{kô>àïÁ' ?ðA÷ðAM AÓÀAjMASSACHUSETTS MAINLAND AXT¦@?{kô>àïÁ%ÂP?ðAâAIpA@AjA&ã`MASSACHUSETTS ISLAND AXT¦@?{kô>àïÁ%t0?ðA3A ÐA@A„€MICHIGAN EAST AXT¦@?{kô>àïÁ)s ?ïÿˆ)©„A5 MICHIGAN CENTRAL/M AXT¦@?{kô>àïÁ*È?ïÿAY¯2A5 Aš‚p;MQMICHIGAN WEST AXT¦@?{kô>àïÁ*þ(?ïÿAY¯2A5 Aš‚p;MQMICHIGAN NORTH AXT¦@?{kô>àïÁ*Œà?ðA·A¤A$pA^„€MICHIGAN CENTRAL/L AXT¦@?{kô>àïÁ)³°?ðA¸àAì0A\pAVã`MICHIGAN SOUTH AXT¦@?{kô>àïÁ)³°?ðA}@A«àA5 AN„€MINNESOTA NORTH AXT¦@?{kô>àïÁ,fP?ðA‡`A²àAB`A(j@øjMINNESOTA CENTRAL AXT¦@?{kô>àïÁ,»x?ðA´pA±Aw@A(j@øjMINNESOTA SOUTH AXT¦@?{kô>àïÁ,¯À?ðA‹Aˆ0A>ÀA(j@øjMISSISSIPPI EAST AXT¦@?{kô>àïÁ+?ïÿ—$tSAâ AO€MISSISSIPPI WEST AXT¦@?{kô>àïÁ+†à?ïÿ—$tSAâ A%\ÀMISSOURI EAST AXT¦@?{kô>àïÁ+ް?ïÿt0›AªàA„€MISSOURI CENTRAL AXT¦@?{kô>àïÁ,*ð?ïÿt0›AªàA„€MISSOURI WEST AXT¦@?{kô>àïÁ,Ç0?ïÿ„£[­šA A)ð MONTANA AXT¦@?{kô>àïÁ0­ˆ?ðAè@Aw@AòpA"O€MONTANA AXT¦@?{kô>àïÁ0­ˆ?ðAè@Aw@AòpA"O€MONTANA AXT¦@?{kô>àïÁ0­ˆ?ðAè@Aw@AòpA"O€NEBRASKA AXT¦@?{kô>àïÁ.„€?ðA>ÀAjAàA„€NEBRASKA AXT¦@?{kô>àïÁ.„€?ðA>ÀAjAàA„€NEVADA EAST AXT¦@?{kô>àïÁ1™Ü?ïÿ.Hè§AÐAjA^„€NEVADA CENTRAL AXT¦@?{kô>àïÁ1Âà?ïÿ.Hè§AÐA„€AVã`NEVADA WEST AXT¦@?{kô>àïÁ2 ?ïÿ.Hè§AÐA(jAN„€NEW HAMPSHIRE --- AXT¦@?{kô>àïÁ%Ê ?ïÿºM AÑ`AO€NEW JERSEY --- AXT¦@?{kô>àïÁ&¬°?ïÿ.Hè§A AO€NEW MEXICO EAST AXT¦@?{kô>àïÁ/Ì ?ïÿAY¯2AëÀA$@NEW MEXICO CENTRAL AXT¦@?{kô>àïÁ02|?ïÿ.Hè§AëÀA„€NEW MEXICO WEST AXT¦@?{kô>àïÁ0g8?ïÿQ<ÁàšAëÀA)T`NEW YORK EAST AXT¦@?{kô>àïÁ&¬°?ïÿ.Hè§A AO€NEW YORK CENTRAL AXT¦@?{kô>àïÁ'LØ?ïÿ|í‘hsAjA„€NEW YORK WEST AXT¦@?{kô>àïÁ'é?ïÿ|í‘hsAjA\ÀNEW YORK LONG ISLAND AXT¦@?{kô>àïÁ&•@?ðA `A¨€Ay AO€NORTH CAROLINA --- AXT¦@?{kô>àïÁ(à?ðA AßÀAjA"š‚p£× NORTH DAKOTA NORTH AXT¦@?{kô>àïÁ.›ð?ðAÀAØ`A¯ÀA"O€NORTH DAKOTA SOUTH AXT¦@?{kô>àïÁ.›ð?ðAÝA$°AµÀA"O€OHIO NORTH AXT¦@?{kô>àïÁ)°?ðAGàA’ A @A"O€OHIO SOUTH AXT¦@?{kô>àïÁ)°?ðAm Av@A1€A"O€OKLAHOMA NORTH AXT¦@?{kô>àïÁ-è@?ðA@àA‘àA\ÀA"O€OKLAHOMA SOUTH AXT¦@?{kô>àïÁ-è@?ðAr A{ÀAC€A"O€OREGON NORTH AXT¦@?{kô>àïÁ2[8?ðA€Aú@A}@ACÐOREGON SOUTH AXT¦@?{kô>àïÁ2[8?ðAÛAÁÀADÀA6ã`PENNSYLVANIA NORTH AXT¦@?{kô>àïÁ'¢È?ðA_PA¼ÐAy A"O€PENNSYLVANIA SOUTH AXT¦@?{kô>àïÁ'¢È?ðAÄ A%@AíA"O€RHODE ISLAND --- AXT¦@?{kô>àïÁ%ÂP?ïÿò䎊rA@øjSOUTH CAROLINA AXT¦@?{kô>àïÁ(¸ ?ðA A¶àA9àA"š€SOUTH CAROLINA AXT¦@?{kô>àïÁ(¸ ?ðA A¶àA9àA"š€SOUTH DAKOTA NORTH AXT¦@?{kô>àïÁ.„€?ðA·PAAŒàA"O€SOUTH DAKOTA SOUTH AXT¦@?{kô>àïÁ.” ?ðA€Að AÁÀA"O€TENNESSEE --- AXT¦@?{kô>àïÁ*>À?ðA At0AßÀA"O€TEXAS NORTH AXT¦@?{kô>àïÁ.ê?ðA 0AýpAÀ€AjA.„€TEXAS NORTH CENTRAL AXT¦@?{kô>àïÁ-ÿ°?ðA~àA”€A*@A"O€A>„€TEXAS CENTRAL AXT¦@?{kô>àïÁ.” ?ðA>AZpAñÀA%\ÀAFã`TEXAS SOUTH CENTRAL AXT¦@?{kô>àïÁ.6`?ðAjA:ðAÈàA"O€AN„€TEXAS SOUTH AXT¦@?{kô>àïÁ-ÿ°?ðAÈàAÜ@A€AO€ASÐUTAH NORTH AXT¦@?{kô>àïÁ0û¨?ðAO°A­0A‰@A„€A.„€UTAH CENTRAL AXT¦@?{kô>àïÁ0û¨?ðA¦ðAÏPAPÀA„€A>„€UTAH SOUTH AXT¦@?{kô>àïÁ0û¨?ðARPA©A7€A„€AFã`VERMONT --- AXT¦@?{kô>àïÁ&p?ïÿµ òŠAÑ`A„€VIRGINIA NORTH AXT¦@?{kô>àïÁ'å0?ðAà€A4 AÓÀAJ³ðA>„€VIRGINIA SOUTH AXT¦@?{kô>àïÁ'å0?ðAïàA@àA@AJ³ðA.„€WASHINGTON NORTH AXT¦@?{kô>àïÁ2c?ðAÀAÞ A¯ÀA„€WASHINGTON SOUTH AXT¦@?{kô>àïÁ2[8?ðAÏAÅ`A–€A„€WEST VIRGINIA NORTH AXT¦@?{kô>àïÁ(3P?ðApAÍÀA``A"O€WEST VIRGINIA SOUTH AXT¦@?{kô>àïÁ(¸ ?ðA„PAÂA•@A"O€WISCONSIN NORTH AXT¦@?{kô>àïÁ+w@?ðA[`A¬`A†àA"O€WISCONSIN CENTRAL AXT¦@?{kô>àïÁ+w@?ðA¦ AòpAŒàA"O€WISCONSIN SOUTH AXT¦@?{kô>àïÁ+w@?ðAá@Aç@A¢€A"O€WYOMING EAST AXT¦@?{kô>àïÁ0 x?ïÿ|í‘hsA˜àAjWYOMING EAST CENTRAL AXT¦@?{kô>àïÁ0[€?ïÿ|í‘hsA˜àAj@øjWYOMING WEST CENTRAL AXT¦@?{kô>àïÁ0ŒT?ïÿ|í‘hsA˜àA"O€WYOMING WEST AXT¦@?{kô>àïÁ0ÊÔ?ïÿ|í‘hsA˜àA(j@øjALASKA ZONE NO. 1 AXT¦@?{kô>àïÁ4Zð?ïÿ.Hè§ÁJn†§ïžA!e A(ûéxlŽA!Œó`´?ÐALASKA ZONE NO. 2 AXT¦@?{kô>àïÁ5ªà?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 3 AXT¦@?{kô>àïÁ6G ?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 4 AXT¦@?{kô>àïÁ6ã`?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 5 AXT¦@?{kô>àïÁ7 ?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 6 AXT¦@?{kô>àïÁ8à?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 7 AXT¦@?{kô>àïÁ8¸ ?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 8 AXT¦@?{kô>àïÁ9T`?ïÿ.Hè§A zÀA„€ALASKA ZONE NO. 9 AXT¦@?{kô>àïÁ9ð ?ïÿ.Hè§A zÀA„€PUERTO RICO AND VIRGIN ISLANDS AXT¦@?{kô>àïÁ$8?ðAJ@Aÿ@A\ÀAjAjVIRGIN ISLANDS ST. CROIX AXT¦@?{kô>àïÁ$8?ðAJ@Aÿ@A\ÀAš‚p;MQ@ÝÄæÅHGUAM ISLAND AXT¦@?{kô>àïA6 g€¦v!A6§ìþœ@èj@èjlibgctp-1.0.orig/obleqfor.c0000644000000000000000000000660211236644451012612 0ustar /******************************************************************************* NAME OBLATED EQUAL-AREA PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Oblated Equal Area projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAM HISTORY PROGRAMMER DATE ---------- ---- D. Steinwand May, 1991 ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" static double lon_center; static double lat_o; static double theta; static double m; static double n; static double R; static double sin_lat_o; static double cos_lat_o; static double false_easting; static double false_northing; int obleqforint( double r, double center_long, double center_lat, double shape_m, double shape_n, double angle, double false_east, double false_north) { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; lat_o = center_lat; m = shape_m; n = shape_n; theta = angle; false_easting = false_east; false_northing = false_north; /* Report parameters to the user (to device set up prior to this call) -------------------------------------------------------------------*/ ptitle("OBLATED EQUAL-AREA"); radius(R); cenlon(lon_center); cenlat(lat_o); genrpt(m,"Parameter m: "); genrpt(n,"Parameter n: "); genrpt(theta,"Theta: "); offsetp(false_easting,false_northing); /* Calculate the sine and cosine of the latitude of the center of the map and store in static storage for common use. -------------------------------------------*/ tsincos(lat_o, &sin_lat_o, &cos_lat_o); return(OK); } int obleqfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; double sin_delta_lon; double cos_delta_lon; double sin_lat; double cos_lat; double z; double Az; double sin_Az; double cos_Az; double temp; /* Re-used temporary variable */ double x_prime; double y_prime; double M; double N; /* Forward equations -----------------*/ delta_lon = lon - lon_center; tsincos(lat, &sin_lat, &cos_lat); tsincos(delta_lon, &sin_delta_lon, &cos_delta_lon); z = acos(sin_lat_o * sin_lat + cos_lat_o * cos_lat * cos_delta_lon); Az = atan2(cos_lat * sin_delta_lon , cos_lat_o * sin_lat - sin_lat_o * cos_lat * cos_delta_lon) + theta; tsincos(Az, &sin_Az, &cos_Az); temp = 2.0 * sin(z / 2.0); x_prime = temp * sin_Az; y_prime = temp * cos_Az; M = asin(x_prime / 2.0); temp = y_prime / 2.0 * cos(M) / cos(2.0 * M / m); N = asin(temp); *y = n * R * sin(2.0 * N / n) + false_easting; *x = m * R * sin(2.0 * M / m) * cos(N) / cos(2.0 * N / n) + false_northing; return(OK); } libgctp-1.0.orig/obleqinv.c0000644000000000000000000000674211236644451012625 0ustar /******************************************************************************* NAME OBLATED EQUAL-AREA PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Oblated Equal Area projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAM HISTORY PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand May, 1991 S. Nelson Nov, 1993 Added "double adjust_lon()" function declaration statement. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" static double lon_center; static double lat_o; static double theta; static double m; static double n; static double R; static double sin_lat_o; static double cos_lat_o; static double false_easting; static double false_northing; int obleqinvint( double r, double center_long, double center_lat, double shape_m, double shape_n, double angle, double false_east, double false_north) { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; lat_o = center_lat; m = shape_m; n = shape_n; theta = angle; false_easting = false_east; false_northing = false_north; /* Report parameters to the user (to device set up prior to this call) -------------------------------------------------------------------*/ ptitle("OBLATED EQUAL-AREA"); radius(R); cenlon(lon_center); cenlat(lat_o); genrpt(m,"Parameter m: "); genrpt(n,"Parameter n: "); genrpt(theta,"Theta: "); offsetp(false_easting,false_northing); /* Calculate the sine and cosine of the latitude of the center of the map and store in static storage for common use. -------------------------------------------*/ tsincos(lat_o, &sin_lat_o, &cos_lat_o); return(OK); } int obleqinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double z; double sin_z; double cos_z; double Az; double temp; /* Re-used temporary variable */ double x_prime; double y_prime; double M; double N; double diff_angle; double sin_diff_angle; double cos_diff_angle; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; N = (n / 2.0) * asin(y / (n * R)); temp = x / (m * R) * cos(2.0 * N / n) / cos(N); M = (m / 2.0) * asin(temp); x_prime = 2.0 * sin(M); y_prime = 2.0 * sin(N) * cos(2.0 * M / m) / cos(M); temp = sqrt(x_prime * x_prime + y_prime * y_prime) / 2.0; z = 2.0 * asin(temp); Az = atan2(x_prime, y_prime); diff_angle = Az - theta; tsincos(diff_angle, &sin_diff_angle, &cos_diff_angle); tsincos(z, &sin_z, &cos_z); *lat = asin(sin_lat_o * cos_z + cos_lat_o * sin_z * cos_diff_angle); *lon = adjust_lon(lon_center + atan2((sin_z * sin_diff_angle), (cos_lat_o * cos_z - sin_lat_o * sin_z * cos_diff_angle))); return(OK); } libgctp-1.0.orig/omerfor.c0000644000000000000000000001653111236644451012454 0ustar /******************************************************************************* NAME OBLIQUE MERCATOR (HOTINE) PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Oblique Mercator projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double scale_factor; /* scale factor */ static double lon_origin; /* center longitude */ static double lat_origin; /* center latitude */ static double e,es; /* eccentricity constants */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p20,cos_p20; /* sin and cos values */ static double bl; static double al; static double d; static double el,u; static double singam,cosgam; static double sinaz,cosaz; /* Initialize the Oblique Mercator projection ------------------------------------------*/ int omerforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double scale_fact, /* scale factor */ double azimuth, /* azimuth east of north */ double lon_orig, /* longitude of origin */ double lat_orig, /* center latitude */ double false_east, /* x offset in meters */ double false_north, /* y offset in meters */ double lon1, /* fist point to define central line */ double lat1, /* fist point to define central line */ double lon2, /* second point to define central line */ double lat2, /* second point to define central line */ long mode) /* which format type A or B */ { double temp; /* temporary variable */ double con,com; double ts; double ts1,ts2; double h,l; double j,p,dlon; double f,g,gama; double sinphi; /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; scale_factor = scale_fact; lat_origin = lat_orig; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); tsincos(lat_origin,&sin_p20,&cos_p20); con = 1.0 - es * sin_p20 * sin_p20; com = sqrt(1.0 - es); bl = sqrt(1.0 + es * pow(cos_p20,4.0)/(1.0 - es)); al = r_major * bl * scale_factor * com / con; if (fabs(lat_origin) < EPSLN) { ts = 1.0; d = 1.0; el = 1.0; } else { ts = tsfnz(e,lat_origin,sin_p20); con = sqrt(con); d = bl * com / (cos_p20 * con); if ((d * d - 1.0) > 0.0) { if (lat_origin >= 0.0) f = d + sqrt(d * d - 1.0); else f = d - sqrt(d * d - 1.0); } else f = d; el = f * pow(ts,bl); } /* Report parameters to the user that are the same for both formats ---------------------------------------------------------------*/ ptitle("OBLIQUE MERCATOR (HOTINE)"); radius2(r_major, r_minor); genrpt(scale_factor,"Scale Factor at C. Meridian: "); offsetp(false_easting,false_northing); if (mode != 0) { g = .5 * (f - 1.0/f); gama = asinz(sin(azimuth) / d); lon_origin = lon_orig - asinz(g * tan(gama))/bl; /* Report parameters common to format B -------------------------------------*/ genrpt(azimuth * R2D,"Azimuth of Central Line: "); cenlon(lon_origin); cenlat(lat_origin); con = fabs(lat_origin); if ((con > EPSLN) && (fabs(con - HALF_PI) > EPSLN)) { tsincos(gama,&singam,&cosgam); tsincos(azimuth,&sinaz,&cosaz); if (lat_origin >= 0) u = (al / bl) * atan(sqrt(d*d - 1.0)/cosaz); else u = -(al / bl) * atan(sqrt(d*d - 1.0)/cosaz); } else { p_error("Input data error","omer-init"); return(201); } } else { sinphi = sin(lat1); ts1 = tsfnz(e,lat1,sinphi); sinphi = sin(lat2); ts2 = tsfnz(e,lat2,sinphi); h = pow(ts1,bl); l = pow(ts2,bl); f = el/h; g = .5 * (f - 1.0/f); j = (el * el - l * h)/(el * el + l * h); p = (l - h) / (l + h); dlon = lon1 - lon2; if (dlon < -PI) lon2 = lon2 - 2.0 * PI; if (dlon > PI) lon2 = lon2 + 2.0 * PI; dlon = lon1 - lon2; lon_origin = .5 * (lon1 + lon2) - atan(j * tan(.5 * bl * dlon)/p)/bl; dlon = adjust_lon(lon1 - lon_origin); gama = atan(sin(bl * dlon)/g); azimuth = asinz(d * sin(gama)); /* Report parameters common to format A -------------------------------------*/ genrpt(lon1 * R2D,"Longitude of First Point: "); genrpt(lat1 * R2D,"Latitude of First Point: "); genrpt(lon2 * R2D,"Longitude of Second Point: "); genrpt(lat2 * R2D,"Latitude of Second Point: "); if (fabs(lat1 - lat2) <= EPSLN) { p_error("Input data error","omer-init"); return(202); } else con = fabs(lat1); if ((con <= EPSLN) || (fabs(con - HALF_PI) <= EPSLN)) { p_error("Input data error","omer-init"); return(202); } else if (fabs(fabs(lat_origin) - HALF_PI) <= EPSLN) { p_error("Input data error","omer-init"); return(202); } tsincos(gama,&singam,&cosgam); tsincos(azimuth,&sinaz,&cosaz); if (lat_origin >= 0) u = (al/bl) * atan(sqrt(d * d - 1.0)/cosaz); else u = -(al/bl) * atan(sqrt(d * d - 1.0)/cosaz); } return(OK); } /* Oblique Mercator forward equations--mapping lat,long to x,y ----------------------------------------------------------*/ int omerfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double sin_phi; /* sin */ double t; /* temporary values */ double con; /* cone constant, small m */ double q,us,vl; double ul,vs; double s; double dlon; double ts1; /* Forward equations -----------------*/ sin_phi = sin(lat); dlon = adjust_lon(lon - lon_origin); vl = sin(bl * dlon); if (fabs(fabs(lat) - HALF_PI) > EPSLN) { ts1 = tsfnz(e,lat,sin_phi); q = el / (pow(ts1,bl)); s = .5 * (q - 1.0 / q); t = .5 * (q + 1.0/ q); ul = (s * singam - vl * cosgam) / t; con = cos(bl * dlon); if (fabs(con) < .0000001) { us = al * bl * dlon; } else { us = al * atan((s * cosgam + vl * singam) / con)/bl; if (con < 0) us = us + PI * al / bl; } } else { if (lat >= 0) ul = singam; else ul = -singam; us = al * lat / bl; } if (fabs(fabs(ul) - 1.0) <= EPSLN) { p_error("Point projects into infinity","omer-for"); return(205); } vs = .5 * al * log((1.0 - ul)/(1.0 + ul)) / bl; us = us - u; *x = false_easting + vs * cosaz + us * sinaz; *y = false_northing + us * cosaz - vs * sinaz; return(OK); } libgctp-1.0.orig/omerinv.c0000644000000000000000000001614211236644451012460 0ustar /******************************************************************************* NAME OBLIQUE MERCATOR (HOTINE) PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Oblique Mercator projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double scale_factor; /* scale factor */ static double lon_origin; /* center longitude */ static double lat_origin; /* center latitude */ static double e,es; /* eccentricity constants */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p20,cos_p20; /* sin and cos values */ static double bl; static double al; static double ts; static double d; static double el,u; static double singam,cosgam; static double sinaz,cosaz; /* Initialize the Oblique Mercator projection ------------------------------------------*/ int omerinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double scale_fact, /* scale factor */ double azimuth, /* azimuth east of north */ double lon_orig, /* longitude of origin */ double lat_orig, /* center latitude */ double false_east, /* x offset in meters */ double false_north, /* y offset in meters */ double lon1, /* fist point to define central line */ double lat1, /* fist point to define central line */ double lon2, /* second point to define central line */ double lat2, /* second point to define central line */ long mode) /* which format type A or B */ { double temp; /* temporary variable */ double con,com; double h,l,ts1,ts2; double j,p,dlon; double f,g,gama; double sinphi; /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; scale_factor = scale_fact; lat_origin = lat_orig; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); tsincos(lat_origin,&sin_p20,&cos_p20); con = 1.0 - es * sin_p20 * sin_p20; com = sqrt(1.0 - es); bl = sqrt(1.0 + es * pow(cos_p20,4.0)/(1.0 - es)); al = r_major * bl * scale_factor * com / con; if (fabs(lat_origin) < EPSLN) { ts = 1.0; d = 1.0; el = 1.0; } else { ts = tsfnz(e,lat_origin,sin_p20); con = sqrt(con); d = bl * com / (cos_p20 * con); if ((d * d - 1.0) > 0.0) { if (lat_origin >= 0.0) f = d + sqrt(d * d - 1.0); else f = d - sqrt(d * d - 1.0); } else f = d; el = f * pow(ts,bl); } /* Report parameters to the user that are the same for both formats ---------------------------------------------------------------*/ ptitle("OBLIQUE MERCATOR (HOTINE)"); radius2(r_major, r_minor); genrpt(scale_factor,"Scale Factor at C. Meridian: "); offsetp(false_easting,false_northing); if (mode != 0) { g = .5 * (f - 1.0/f); gama = asinz(sin(azimuth) / d); lon_origin = lon_orig - asinz(g * tan(gama))/bl; /* Report parameters common to format B -------------------------------------*/ genrpt(azimuth * R2D,"Azimuth of Central Line: "); cenlon(lon_origin); cenlat(lat_origin); con = fabs(lat_origin); if ((con > EPSLN) && (fabs(con - HALF_PI) > EPSLN)) { tsincos(gama,&singam,&cosgam); tsincos(azimuth,&sinaz,&cosaz); if (lat_origin >= 0) u = (al / bl) * atan(sqrt(d*d - 1.0)/cosaz); else u = -(al / bl) * atan(sqrt(d*d - 1.0)/cosaz); } else { p_error("Input data error","omer-init"); return(201); } } else { sinphi = sin(lat1); ts1 = tsfnz(e,lat1,sinphi); sinphi = sin(lat2); ts2 = tsfnz(e,lat2,sinphi); h = pow(ts1,bl); l = pow(ts2,bl); f = el/h; g = .5 * (f - 1.0/f); j = (el * el - l * h)/(el * el + l * h); p = (l - h) / (l + h); dlon = lon1 - lon2; if (dlon < -PI) lon2 = lon2 - 2.0 * PI; if (dlon > PI) lon2 = lon2 + 2.0 * PI; dlon = lon1 - lon2; lon_origin = .5 * (lon1 + lon2) - atan(j * tan(.5 * bl * dlon)/p)/bl; dlon = adjust_lon(lon1 - lon_origin); gama = atan(sin(bl * dlon)/g); azimuth = asinz(d * sin(gama)); /* Report parameters common to format A -------------------------------------*/ genrpt(lon1 * R2D,"Longitude of First Point: "); genrpt(lat1 * R2D,"Latitude of First Point: "); genrpt(lon2 * R2D,"Longitude of Second Point: "); genrpt(lat2 * R2D,"Latitude of Second Point: "); if (fabs(lat1 - lat2) <= EPSLN) { p_error("Input data error","omer-init"); return(202); } else con = fabs(lat1); if ((con <= EPSLN) || (fabs(con - HALF_PI) <= EPSLN)) { p_error("Input data error","omer-init"); return(202); } else if (fabs(fabs(lat_origin) - HALF_PI) <= EPSLN) { p_error("Input data error","omer-init"); return(202); } tsincos(gama,&singam,&cosgam); tsincos(azimuth,&sinaz,&cosaz); if (lat_origin >= 0) u = (al/bl) * atan(sqrt(d * d - 1.0)/cosaz); else u = -(al/bl) * atan(sqrt(d * d - 1.0)/cosaz); } return(OK); } /* Oblique Mercator inverse equations--mapping x,y to lat/long ----------------------------------------------------------*/ int omerinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double theta; /* angle */ double t; /* temporary values */ double con; /* cone constant, small m */ double vs,us,q,s,ts1; double vl,ul; long flag; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; flag = 0; vs = x * cosaz - y * sinaz; us = y * cosaz + x * sinaz; us = us + u; q = exp(-bl * vs / al); s = .5 * (q - 1.0/q); t = .5 * (q + 1.0/q); vl = sin(bl * us / al); ul = (vl * cosgam + s * singam)/t; if (fabs(fabs(ul) - 1.0) <= EPSLN) { *lon = lon_origin; if (ul >= 0.0) *lat = HALF_PI; else *lat = -HALF_PI; } else { con = 1.0 / bl; ts1 = pow((el / sqrt((1.0 + ul) / (1.0 - ul))),con); *lat = phi2z(e,ts1,&flag); if (flag != 0) return(flag); con = cos(bl * us /al); theta = lon_origin - atan2((s * cosgam - vl * singam) , con)/bl; *lon = adjust_lon(theta); } return(OK); } libgctp-1.0.orig/orthfor.c0000644000000000000000000000625311236644451012466 0ustar /******************************************************************************* NAME ORTHOGRAPHIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Orthographic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p14; /* sin of center latitude */ static double cos_p14; /* cos of center latitude */ /* Initialize the Orthographic projection -------------------------------------*/ int orthforint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; tsincos(center_lat,&sin_p14,&cos_p14); /* Report parameters to the user -----------------------------*/ ptitle("ORTHOGRAPHIC"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Orthographic forward equations--mapping lat,long to x,y ---------------------------------------------------*/ int orthfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double sinphi, cosphi; /* sin and cos value */ double dlon; /* delta longitude value */ double coslon; /* cos of longitude */ double ksp; /* scale factor */ double g; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); tsincos(lat,&sinphi,&cosphi); coslon = cos(dlon); g = sin_p14 * sinphi + cos_p14 * cosphi * coslon; ksp = 1.0; if ((g > 0) || (fabs(g) <= EPSLN)) { *x = false_easting + r_major * ksp * cosphi * sin(dlon); *y = false_northing + r_major * ksp * (cos_p14 * sinphi - sin_p14 * cosphi * coslon); } else { p_error("Point can not be projected","orth-for"); return(143); } return(OK); } libgctp-1.0.orig/orthinv.c0000644000000000000000000000674611236644451012503 0ustar /******************************************************************************* NAME ORTHOGRAPHIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Orthographic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p14; /* sin of center latitude */ static double cos_p14; /* cos of center latitude */ /* Initialize the Orthographic projection -------------------------------------*/ int orthinvint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; tsincos(center_lat,&sin_p14,&cos_p14); /* Report parameters to the user -----------------------------*/ ptitle("ORTHOGRAPHIC"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Orthographic inverse equations--mapping x,y to lat/long ------------------------------------------------------*/ int orthinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh; /* height above ellipsoid */ double z; /* angle */ double sinz,cosz; /* sin of z and cos of z */ double con; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; rh = sqrt(x * x + y * y); if (rh > r_major + .0000001) { p_error("Input data error","orth-inv"); return(145); } z = asinz(rh / r_major); tsincos(z,&sinz,&cosz); *lon = lon_center; if (fabs(rh) <= EPSLN) { *lat = lat_origin; return(OK); } *lat = asinz(cosz * sin_p14 + (y * sinz * cos_p14)/rh); con = fabs(lat_origin) - HALF_PI; if (fabs(con) <= EPSLN) { if (lat_origin >= 0) { *lon = adjust_lon(lon_center + atan2(x, -y)); return(OK); } else { *lon = adjust_lon(lon_center - atan2(-x, y)); return(OK); } } con = cosz - sin_p14 * sin(*lat); if ((fabs(con) >= EPSLN) || (fabs(x) >= EPSLN)) *lon = adjust_lon(lon_center + atan2((x * sinz * cos_p14), (con * rh))); return(OK); } libgctp-1.0.orig/paksz.c0000644000000000000000000000512211236644451012125 0ustar /******************************************************************************* NAME PAKSZ PURPOSE: This function converts a packed DMS angle to seconds. The standard packed DMS format is: degrees * 1000000 + minutes * 1000 + seconds Example: ang = 120025045.25 yields deg = 120 min = 25 sec = 45.25 The algorithm used for the conversion is as follows: 1. The absolute value of the angle is used. 2. The degrees are separated out: deg = ang/1000000 (fractional portion truncated) 3. The minutes are separated out: min = (ang - deg * 1000000) / 1000 (fractional portion truncated) 4. The seconds are then computed: sec = ang - deg * 1000000 - min * 1000 5. The total angle in seconds is computed: sec = deg * 3600.0 + min * 60.0 + sec 6. The sign of sec is set to that of the input angle. PROGRAMMER DATE ---------- ---- T. Mittan MARCH, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Proffesional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Convert DMS packed angle into deg ----------------------------------*/ double paksz( double ang, /* angle which in DMS */ long *iflg) /* error flag number */ { double fac; /* sign flag */ double deg; /* degree variable */ double min; /* minute variable */ double sec; /* seconds variable */ double tmp; /* temporary variable */ long i; /* temporary variable */ *iflg = 0; if (ang < 0.0) fac = -1; else fac = 1; /* find degrees -------------*/ sec = fabs(ang); tmp = 1000000.0; i = (long) (sec/tmp); if (i > 360) { p_error("Illegal DMS field","paksz-deg"); *iflg = 1116; return(ERROR); } else deg = i; /* find minutes -------------*/ sec = sec - deg * tmp; tmp = 1000; i = (long) (sec / tmp); if (i > 60) { p_error("Illegal DMS field","paksz-min"); *iflg = 1116; return(ERROR); } else min = i; /* find seconds -------------*/ sec = sec - min * tmp; if (sec > 60) { p_error("Illegal DMS field","paksz-sec"); *iflg = 1116; return(ERROR); } else sec = fac * (deg * 3600.0 + min * 60.0 + sec); deg = sec / 3600.0; return(deg); } libgctp-1.0.orig/polyfor.c0000644000000000000000000000663111236644451012475 0ustar /******************************************************************************* NAME POLYCONIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Polyconic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e0,e1,e2,e3; /* eccentricity constants */ static double e,es; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the POLYCONIC projection ----------------------------------*/ int polyforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); ml0 = mlfn(e0, e1, e2, e3, lat_origin); /* Report parameters to the user -----------------------------*/ ptitle("POLYCONIC"); radius2(r_major, r_minor); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Polyconic forward equations--mapping lat,long to x,y ---------------------------------------------------*/ int polyfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double sinphi, cosphi; /* sin and cos value */ double con, ml; /* cone constant, small m */ double ms; /* small m */ /* Forward equations -----------------*/ con = adjust_lon(lon - lon_center); if (fabs(lat) <= .0000001) { *x = false_easting + r_major * con; *y = false_northing - r_major * ml0; } else { tsincos(lat,&sinphi,&cosphi); ml = mlfn(e0, e1, e2, e3, lat); ms = msfnz(e,sinphi,cosphi); con *= sinphi; *x = false_easting + r_major * ms * sin(con)/sinphi; *y = false_northing + r_major * (ml - ml0 + ms * (1.0 - cos(con))/sinphi); } return(OK); } libgctp-1.0.orig/polyinv.c0000644000000000000000000000656011236644451012504 0ustar /******************************************************************************* NAME POLYCONIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Polyconic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e0,e1,e2,e3; /* eccentricity constants */ static double es; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the POLYCONIC projection ----------------------------------*/ int polyinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); ml0 = mlfn(e0, e1, e2, e3, lat_origin); /* Report parameters to the user -----------------------------*/ ptitle("POLYCONIC"); radius2(r_major, r_minor); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Polyconic inverse equations--mapping x,y to lat/long ---------------------------------------------------*/ int polyinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double al; /* temporary values */ double b; /* temporary values */ double c; /* temporary values */ long iflg; /* error flag */ /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; al = ml0 + y/r_major; iflg = 0; if (fabs(al) <= .0000001) { *lon = x/r_major + lon_center; *lat = 0.0; } else { b = al * al + (x/r_major) * (x/r_major); iflg = (long) phi4z(es,e0,e1,e2,e3,al,b,&c,lat); if (iflg != 0) return(74); *lon = adjust_lon((asinz(x * c / r_major) / sin(*lat)) + lon_center); } return(OK); } libgctp-1.0.orig/proj.h0000644000000000000000000000435211236644451011760 0ustar /* 0 = Geographic 1 = Universal Transverse Mercator (UTM) 2 = State Plane Coordinates 3 = Albers Conical Equal Area 4 = Lambert Conformal Conic 5 = Mercator 6 = Polar Stereographic 7 = Polyconic 8 = Equidistant Conic 9 = Transverse Mercator 10 = Stereographic 11 = Lambert Azimuthal Equal Area 12 = Azimuthal Equidistant 13 = Gnomonic 14 = Orthographic 15 = General Vertical Near-Side Perspective 16 = Sinusiodal 17 = Equirectangular 18 = Miller Cylindrical 19 = Van der Grinten 20 = (Hotine) Oblique Mercator 21 = Robinson 22 = Space Oblique Mercator (SOM) 23 = Alaska Conformal 24 = Interrupted Goode Homolosine 25 = Mollweide 26 = Interrupted Mollweide 27 = Hammer 28 = Wagner IV 29 = Wagner VII 30 = Oblated Equal Area 31 = Integerized Sinusoidal Grid (the same as 99) 97 = Cylindrical Equal Area (Grid corners set in meters for EASE grid) 98 = Cylindrical Equal Area (Grid corners set in DMS degs for EASE grid) 99 = Integerized Sinusoidal Grid (added by Raj Gejjagaraguppe ARC for MODIS) */ #ifdef __cplusplus extern "C" { #endif #define GEO 0 #define UTM 1 #define SPCS 2 #define ALBERS 3 #define LAMCC 4 #define MERCAT 5 #define PS 6 #define POLYC 7 #define EQUIDC 8 #define TM 9 #define STEREO 10 #define LAMAZ 11 #define AZMEQD 12 #define GNOMON 13 #define ORTHO 14 #define GVNSP 15 #define SNSOID 16 #define EQRECT 17 #define MILLER 18 #define VGRINT 19 #define HOM 20 #define ROBIN 21 #define SOM 22 #define ALASKA 23 #define GOODE 24 #define MOLL 25 #define IMOLL 26 #define HAMMER 27 #define WAGIV 28 #define WAGVII 29 #define OBEQA 30 #define ISINUS1 31 #define CEA 97 #define BCEA 98 #define ISINUS 99 #define IN_BREAK -2 #define COEFCT 15 /* projection coefficient count */ #define PROJCT 31 /* projection count */ #define DATMCT 20 /* datum count */ #define MAXPROJ 100 /* Maximum projection number */ #define MAXUNIT 5 /* Maximum unit code number */ #define GEO_TERM 0 /* Array index for print-to-term flag */ #define GEO_FILE 1 /* Array index for print-to-file flag */ #define GEO_TRUE 1 /* True value for geometric true/false flags */ #define GEO_FALSE -1 /* False val for geometric true/false flags */ #ifdef __cplusplus } #endif libgctp-1.0.orig/psfor.c0000644000000000000000000000720511236644451012132 0ustar /******************************************************************************* NAME POLAR STEREOGRAPHIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Polar Stereographic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan 2-26-93 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double es; /* eccentricity squared */ static double e; /* eccentricity */ static double e4; /* e4 calculated from eccentricity*/ static double center_lon; /* center longitude */ static double center_lat; /* center latitude */ static double fac; /* sign variable */ static double ind; /* flag variable */ static double mcs; /* small m */ static double tcs; /* small t */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the Polar Stereographic projection --------------------------------------------*/ int psforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double c_lon, /* center longitude */ double c_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ double con1; /* temporary angle */ double sinphi; /* sin value */ double cosphi; /* cos value */ r_major = r_maj; r_minor = r_min; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e4 = e4fn(e); center_lon = c_lon; center_lat = c_lat; if (c_lat < 0) fac = -1.0; else fac = 1.0; ind = 0; if (fabs(fabs(c_lat) - HALF_PI) > EPSLN) { ind = 1; con1 = fac * center_lat; tsincos(con1,&sinphi,&cosphi); mcs = msfnz(e,sinphi,cosphi); tcs = tsfnz(e,con1,sinphi); } /* Report parameters to the user -----------------------------*/ ptitle("POLAR STEREOGRAPHIC"); radius2(r_major, r_minor); cenlon(center_lon); offsetp(false_east,false_north); return(OK); } /* Polar Stereographic forward equations--mapping lat,long to x,y --------------------------------------------------------------*/ int psfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double con1; /* adjusted longitude */ double con2; /* adjusted latitude */ double rh; /* height above ellipsoid */ double sinphi; /* sin value */ double ts; /* value of small t */ con1 = fac * adjust_lon(lon - center_lon); con2 = fac * lat; sinphi = sin(con2); ts = tsfnz(e,con2,sinphi); if (ind != 0) rh = r_major * mcs * ts / tcs; else rh = 2.0 * r_major * ts / e4; *x = fac * rh * sin(con1) + false_easting; *y = -fac * rh * cos(con1) + false_northing;; return(OK); } libgctp-1.0.orig/psinv.c0000644000000000000000000000764711236644451012152 0ustar /******************************************************************************* NAME POLAR STEREOGRAPHIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Polar Stereographic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan 2-26-93 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double e; /* eccentricity */ static double e4; /* e4 calculated from eccentricity*/ static double center_lon; /* center longitude */ static double center_lat; /* center latitude */ static double fac; /* sign variable */ static double ind; /* flag variable */ static double mcs; /* small value m */ static double tcs; /* small value t */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ /* Initialize the Polar Stereographic projection --------------------------------------------*/ int psinvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double c_lon, /* center longitude */ double c_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ double con1; /* temporary angle */ double sinphi; /* sin value */ double cosphi; /* cos value */ double es; /* eccentricity squared */ r_major = r_maj; r_minor = r_min; false_easting = false_east; false_northing = false_north; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e = sqrt(es); e4 = e4fn(e); center_lon = c_lon; center_lat = c_lat; if (c_lat < 0) fac = -1.0; else fac = 1.0; ind = 0; if (fabs(fabs(c_lat) - HALF_PI) > EPSLN) { ind = 1; con1 = fac * center_lat; tsincos(con1,&sinphi,&cosphi); mcs = msfnz(e,sinphi,cosphi); tcs = tsfnz(e,con1,sinphi); } /* Report parameters to the user -----------------------------*/ ptitle("POLAR STEREOGRAPHIC"); radius2(r_major, r_minor); cenlon(center_lon); offsetp(false_east,false_north); return(OK); } /* Polar Stereographic inverse equations--mapping x,y to lat/long --------------------------------------------------------------*/ int psinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh; /* height above ellipsiod */ double ts; /* small value t */ double temp; /* temporary variable */ long flag; /* error flag */ flag = 0; x = (x - false_easting) * fac; y = (y - false_northing) *fac; rh = sqrt(x * x + y * y); if (ind != 0) ts = rh * tcs/(r_major * mcs); else ts = rh * e4 / (r_major * 2.0); *lat = fac * phi2z(e,ts,&flag); if (flag != 0) return(flag); if (rh == 0) *lon = fac * center_lon; else { temp = atan2(x, -y); *lon = adjust_lon(fac *temp + center_lon); } return(OK); } libgctp-1.0.orig/report.c0000644000000000000000000002224511236644451012315 0ustar /******************************************************************************* NAME Projection support routines listed below PURPOSE: The following functions are included in REPORT.C INIT: Initializes the output device for error messages and report headings. P_ERROR: Reports errors to the terminal, a specified file, or both. PTITLE, RADIUS, RADIUS2, CENLON, CENLONMER, CENLAT, ORIGIN, STANPARL, STPARL1, OFFSET, GENRPT, GENRPT_LONG, PBLANK: Reports projection parameters to the terminal, specified file, or both. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS July, 1991 Initial development. T. Mittan Mar, 1993 Adapted code to new "C" version of GCTP library. S. Nelson Jun, 1993 Added inline code. Added error messages if no filename was specified. Carol S. W. Tsai Sep, 1997 Added code for p_errort, a function to report error, to generate the status meassages that is relative to the message file created for PGS GCT tools if it is PGS_TOOLKIT_COMPILE *******************************************************************************/ #ifdef PGS_TOOLKIT_COMPILE /* only TOOLKIT compilation */ #include #include #endif /* only TOOLKIT compilation */ #include #include #include "cproj.h" #define TRUE 1 #ifndef FALSE #define FALSE 0 #endif static long terminal_p; /* flag for printing parameters to terminal */ static long terminal_e; /* flag for printing errors to terminal */ static long file_e; /* flag for printing errors to terminal */ static long file_p; /* flag for printing parameters to file */ static FILE *fptr_p; static FILE *fptr_e; static char parm_file[256]; static char err_file[256]; /* Function to report errors -------------------------*/ void p_error( char *what, char *where) { #ifdef PGS_TOOLKIT_COMPILE PGSt_SMF_status returnStatus = PGSGCT_E_GCTP_ERROR; if(strcmp(what, "Too many iterations in inverse") == 0) returnStatus = PGSGCT_E_ITER_EXCEEDED; else if(strncmp(what, "Point projects into a circle of radius", strlen("Point projects into a circle of radius")) == 0) returnStatus = PGSGCT_E_POINT_PROJECT; else if(strcmp(what, "Input data error") == 0) returnStatus = PGSGCT_E_INPUT_DATA_ERROR; else if(strcmp(what, "Point projects into infinity") == 0) returnStatus = PGSGCT_E_INFINITE; else if(strcmp(what, "Iteration failed to converge") == 0) returnStatus = PGSGCT_E_ITER_FAILED; else if(strcmp(what, "Point can not be projected") == 0) returnStatus = PGSGCT_E_PROJECT_FAILED; else if(strcmp(what, "Point cannot be projected") == 0) returnStatus = PGSGCT_E_PROJECT_FAILED; else if(strcmp(what, "Transformation cannot be computed at the poles") == 0) returnStatus = PGSGCT_E_POINTS_ON_POLES; else if(strcmp(what, "50 iterations without conv") == 0) returnStatus = PGSGCT_E_ITER_SOM; else if(strcmp(what, "50 iterations without convergence") == 0) returnStatus = PGSGCT_E_ITER_SOM; PGS_SMF_SetDynamicMsg(returnStatus,what,where); #else if (terminal_e) printf("[%s] %s\n",where,what); if (file_e) { fptr_e = (FILE *)fopen(err_file,"a"); fprintf(fptr_e,"[%s] %s\n",where,what); fclose(fptr_e); } #endif } /* initialize output device -------------------------*/ int init( long ipr, /* flag for printing errors (0,1,or 2) */ long jpr, /* flag for printing parameters (0,1,or 2) */ char *efile, /* name of error file */ char *pfile) /* name of parameter file */ { if (ipr == 0) { terminal_e = TRUE; file_e = FALSE; } else if (ipr == 1) { terminal_e = FALSE; if (strlen(efile) == 0) { return(6); } file_e = TRUE; strcpy(err_file,efile); } else if (ipr == 2) { terminal_e = TRUE; if (strlen(efile) == 0) { file_e = FALSE; p_error("Output file name not specified","report-file"); return(6); } file_e = TRUE; strcpy(err_file,efile); } else { terminal_e = FALSE; file_e = FALSE; } if (jpr == 0) { terminal_p = TRUE; file_p = FALSE; } else if (jpr == 1) { terminal_p = FALSE; if (strlen(pfile) == 0) { return(6); } file_p = TRUE; strcpy(parm_file,pfile); } else if (jpr == 2) { terminal_p = TRUE; if (strlen(pfile) == 0) { file_p = FALSE; p_error("Output file name not specified","report-file"); return(6); } file_p = TRUE; strcpy(parm_file,pfile); } else { terminal_p = FALSE; file_p = FALSE; } return(0); } void close_file() { if (fptr_e != NULL) fclose(fptr_e); if (fptr_p != NULL) fclose(fptr_p); } /* Functions to report projection parameters -----------------------------------------*/ void ptitle(char *A) { if (terminal_p) printf("\n%s PROJECTION PARAMETERS:\n\n",A); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p,"\n%s PROJECTION PARAMETERS:\n\n",A); fclose(fptr_p); } } void radius(double A) { if (terminal_p) printf(" Radius of Sphere: %lf meters\n",A); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Radius of Sphere: %lf meters\n",A); fclose(fptr_p); } } void radius2(double A, double B) { if (terminal_p) { printf(" Semi-Major Axis of Ellipsoid: %lf meters\n",A); printf(" Semi-Minor Axis of Ellipsoid: %lf meters\n",B); } if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Semi-Major Axis of Ellipsoid: %lf meters\n",A); fprintf(fptr_p," Semi-Minor Axis of Ellipsoid: %lf meters\n",B); fclose(fptr_p); } } void cenlon(double A) { if (terminal_p) printf(" Longitude of Center: %lf degrees\n",A*R2D); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Longitude of Center: %lf degrees\n",A*R2D); fclose(fptr_p); } } void cenlonmer(double A) { if (terminal_p) printf(" Longitude of Central Meridian: %lf degrees\n",A*R2D); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Longitude of Central Meridian: %lf degrees\n",A*R2D); fclose(fptr_p); } } void cenlat(double A) { if (terminal_p) printf(" Latitude of Center: %lf degrees\n",A*R2D); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Latitude of Center: %lf degrees\n",A*R2D); fclose(fptr_p); } } void origin(double A) { if (terminal_p) printf(" Latitude of Origin: %lf degrees\n",A*R2D); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Latitude of Origin: %lf degrees\n",A*R2D); fclose(fptr_p); } } void true_scale(double A) { if (terminal_p) printf(" Latitude of True Scale: %lf degrees\n",A*R2D); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Latitude of True Scale: %lf degrees\n",A*R2D); fclose(fptr_p); } return; } void stanparl(double A, double B) { if (terminal_p) { printf(" 1st Standard Parallel: %lf degrees\n",A*R2D); printf(" 2nd Standard Parallel: %lf degrees\n",B*R2D); } if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," 1st Standard Parallel: %lf degrees\n",A*R2D); fprintf(fptr_p," 2nd Standard Parallel: %lf degrees\n",B*R2D); fclose(fptr_p); } } void stparl1(double A) { if (terminal_p) { printf(" Standard Parallel: %lf degrees\n",A*R2D); } if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," Standard Parallel: %lf degrees\n",A*R2D); fclose(fptr_p); } } void offsetp(double A, double B) { if (terminal_p) { printf(" False Easting: %lf meters \n",A); printf(" False Northing: %lf meters \n",B); } if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," False Easting: %lf meters \n",A); fprintf(fptr_p," False Northing: %lf meters \n",B); fclose(fptr_p); } } void genrpt(double A, char *S) { if (terminal_p) printf(" %s %lf\n", S, A); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," %s %lf\n", S, A); fclose(fptr_p); } } void genrpt_long(long A, char *S) { if (terminal_p) printf(" %s %ld\n", S, A); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p," %s %ld\n", S, A); fclose(fptr_p); } } void pblank() { if (terminal_p) printf("\n"); if (file_p) { fptr_p = (FILE *)fopen(parm_file,"a"); fprintf(fptr_p,"\n"); fclose(fptr_p); } } libgctp-1.0.orig/robfor.c0000644000000000000000000001103511236644451012266 0ustar /******************************************************************************* NAME ROBINSON PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Robinson projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Lambert Azimuthal Equal Area projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ static double pr[21]; static double xlr[21]; /* Initialize the ROBINSON projection ---------------------------------*/ int robforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { long i; /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; pr[1]= -0.062; xlr[1]=0.9986; pr[2]=0.0; xlr[2]=1.0; pr[3]=0.062; xlr[3]=0.9986; pr[4]=0.124; xlr[4]=0.9954; pr[5]=0.186; xlr[5]=0.99; pr[6]=0.248; xlr[6]=0.9822; pr[7]=0.31; xlr[7]=0.973; pr[8]=0.372; xlr[8]=0.96; pr[9]=0.434; xlr[9]=0.9427; pr[10]=0.4958; xlr[10]=0.9216; pr[11]=0.5571; xlr[11]=0.8962; pr[12]=0.6176; xlr[12]=0.8679; pr[13]=0.6769; xlr[13]=0.835; pr[14]=0.7346; xlr[14]=0.7986; pr[15]=0.7903; xlr[15]=0.7597; pr[16]=0.8435; xlr[16]=0.7186; pr[17]=0.8936; xlr[17]=0.6732; pr[18]=0.9394; xlr[18]=0.6213; pr[19]=0.9761; xlr[19]=0.5722; pr[20]=1.0; xlr[20]=0.5322; for (i = 0; i < 21; i++) xlr[i] *= 0.9858; /* Report parameters to the user -----------------------------*/ ptitle("ROBINSON"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Robinson forward equations--mapping lat,long to x,y ------------------------------------------------------------*/ int robfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; double p2; long ip1; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); p2 = fabs(lat / 5.0 / .01745329252); ip1 = (long) (p2 - EPSLN); /* Stirling's interpolation formula (using 2nd Diff.) ---------------------------------------------------*/ p2 -= (double) ip1; *x = R * (xlr[ip1 + 2] + p2 * (xlr[ip1 + 3] - xlr[ip1 + 1]) / 2.0 + p2 * p2 * (xlr[ip1 + 3] - 2.0 * xlr[ip1 + 2] + xlr[ip1 + 1])/2.0) * dlon + false_easting; if (lat >= 0) *y = R * (pr[ip1 + 2] + p2 * (pr[ip1 + 3] - pr[ip1 +1]) / 2.0 + p2 * p2 * (pr[ip1 + 3] - 2.0 * pr[ip1 + 2] + pr[ip1 + 1]) / 2.0) * PI / 2.0 + false_northing; else *y = -R * (pr[ip1 + 2] + p2 * (pr[ip1 + 3] - pr[ip1 +1]) / 2.0 + p2 * p2 * (pr[ip1 + 3] - 2.0 * pr[ip1 + 2] + pr[ip1 + 1]) / 2.0) * PI / 2.0 + false_northing; return(OK); } libgctp-1.0.orig/robinv.c0000644000000000000000000001427411236644451012304 0ustar /******************************************************************************* NAME ROBINSON PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Robinson projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE REASON ---------- ---- ------ T. Mittan March, 1993 Converted from FORTRAN to C. S. Nelson Nov, 1993 Changed number of iterations from 20 to 75. This seemed to give a valid Latitude with less fatal errors. This function was adapted from the Robinson projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ static double pr[21]; static double xlr[21]; /* Initialize the ROBINSON projection ---------------------------------*/ int robinvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { long i; /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; pr[1]= -0.062; xlr[1]=0.9986; pr[2]=0.0; xlr[2]=1.0; pr[3]=0.062; xlr[3]=0.9986; pr[4]=0.124; xlr[4]=0.9954; pr[5]=0.186; xlr[5]=0.99; pr[6]=0.248; xlr[6]=0.9822; pr[7]=0.31; xlr[7]=0.973; pr[8]=0.372; xlr[8]=0.96; pr[9]=0.434; xlr[9]=0.9427; pr[10]=0.4958; xlr[10]=0.9216; pr[11]=0.5571; xlr[11]=0.8962; pr[12]=0.6176; xlr[12]=0.8679; pr[13]=0.6769; xlr[13]=0.835; pr[14]=0.7346; xlr[14]=0.7986; pr[15]=0.7903; xlr[15]=0.7597; pr[16]=0.8435; xlr[16]=0.7186; pr[17]=0.8936; xlr[17]=0.6732; pr[18]=0.9394; xlr[18]=0.6213; pr[19]=0.9761; xlr[19]=0.5722; pr[20]=1.0; xlr[20]=0.5322; for (i = 0; i < 21; i++) xlr[i] *= 0.9858; /* Report parameters to the user -----------------------------*/ ptitle("ROBINSON"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Robinson inverse equations--mapping x,y to lat/long ------------------------------------------------------------*/ int robinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double yy; double p2; double u,v,t,c; double phid; double y1; long ip1; long i; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; yy = 2.0 * y / PI / R; phid = yy * 90.0; p2 = fabs(phid / 5.0); ip1 = (long) (p2 - EPSLN); if (ip1 == 0) ip1 = 1; /* Stirling's interpolation formula as used in forward transformation is reversed for first estimation of LAT. from rectangular coordinates. LAT. is then adjusted by iteration until use of forward series provides correct value of Y within tolerance. ---------------------------------------------------------------------------*/ for (i = 0;;) { u = pr[ip1 + 3] - pr[ip1 + 1]; v = pr[ip1 + 3] - 2.0 * pr[ip1 + 2] + pr[ip1 + 1]; t = 2.0 * (fabs(yy) - pr[ip1 + 2]) / u; c = v / u; p2 = t * (1.0 - c * t * (1.0 - 2.0 * c * t)); if ((p2 >= 0.0) || (ip1 == 1)) { if (y >= 0) phid = (p2 + (double) ip1 ) * 5.0; else phid = -(p2 + (double) ip1 ) * 5.0; do { p2 = fabs(phid / 5.0); ip1 = (long) (p2 - EPSLN); p2 -= (double) ip1; if (y >= 0) y1 = R * (pr[ip1 +2] + p2 *(pr[ip1 + 3] - pr[ip1 +1]) / 2.0 + p2 * p2 * (pr[ip1 + 3] - 2.0 * pr[ip1 + 2] + pr[ip1 + 1])/2.0) * PI / 2.0; else y1 = -R * (pr[ip1 +2] + p2 *(pr[ip1 + 3] - pr[ip1 +1]) / 2.0 + p2 * p2 * (pr[ip1 + 3] - 2.0 * pr[ip1 + 2] + pr[ip1 + 1])/2.0) * PI / 2.0; phid += -180.0 * (y1 - y) / PI / R; i++; if (i > 75) { p_error("Too many iterations in inverse","robinv-conv"); return(234); } } while (fabs(y1 - y) > .00001); break; } else { ip1 -= 1; if (ip1 < 0) { p_error("Too many iterations in inverse","robinv-conv"); return(234); } } } *lat = phid * .01745329252; /* calculate LONG. using final LAT. with transposed forward Stirling's interpolation formula. ---------------------------------------------------------------------*/ *lon = lon_center + x / R / (xlr[ip1 + 2] + p2 * (xlr[ip1 + 3] - xlr[ip1 + 1]) / 2.0 + p2 * p2 * (xlr[ip1 + 3] - 2.0 * xlr[ip1 + 2] + xlr[ip1 + 1]) / 2.0); *lon = adjust_lon(*lon); return(OK); } libgctp-1.0.orig/sinfor.c0000644000000000000000000000525211236644451012301 0ustar /******************************************************************************* NAME SINUSOIDAL PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Sinusoidal projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991 This function was adapted from the Sinusoidal projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Sinusoidal projection ------------------------------------*/ int sinforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("SINUSOIDAL"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Sinusoidal forward equations--mapping lat,long to x,y -----------------------------------------------------*/ int sinfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); *x = R * delta_lon * cos(lat) + false_easting; *y = R * lat + false_northing; return(OK); } libgctp-1.0.orig/sininv.c0000644000000000000000000000553411236644451012312 0ustar /******************************************************************************* NAME SINUSOIDAL PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Sinusoidal projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991 This function was adapted from the Sinusoidal projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Sinusoidal projection ------------------------------------*/ int sininvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("SINUSOIDAL"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Sinusoidal inverse equations--mapping x,y to lat,long -----------------------------------------------------*/ int sininv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double temp; /* Re-used temporary variable */ /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; *lat = y / R; if (fabs(*lat) > HALF_PI) { p_error("Input data error","sinusoidal-inverse"); return(164); } temp = fabs(*lat) - HALF_PI; if (fabs(temp) > EPSLN) { temp = lon_center + x / (R * cos(*lat)); *lon = adjust_lon(temp); } else *lon = lon_center; return(OK); } libgctp-1.0.orig/somfor.c0000644000000000000000000001754311236644451012314 0ustar /******************************************************************************* NAME SPACE OBLIQUE MERCATOR (SOM) PURPOSE: The first method of Transforming input longitude and latitude to Easting and Northing for the SOM projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAM HISTORY PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand July, 1992 T. Mittan Mar, 1993 S. Nelson Nov, 1993 Changed error message Raj Gejjagaraguppe(ARC) Aug, 1996 Landsat Ratio is removed as hard coded value. Now this ratio can be an input from the user through the projection parameter array element number 9. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" static double lon_center,a,b,a2,a4,c1,c3,q,t,w,xj,p21,sa,ca,es,s,start; static double false_easting; static double false_northing; static void som_series(double *fb, double *fa2, double *fa4, double *fc1, double *fc3, double *dlam); double gsat_ratio; int somforint( double r_major, /* major axis */ double r_minor, /* minor axis */ long satnum, /* Landsat satellite number (1,2,3,4,5) */ long path, /* Landsat path number */ double alf_in, double lon, double false_east, /* x offset in meters */ double false_north, /* y offset in meters */ double time, long start1, long flag, double sat_ratio) /* satellite ratio which specify the start point of x,y reading within an orbit */ { long i; double alf,e2c,e2s,one_es; double dlam,fb,fa2,fa4,fc1,fc3,suma2,suma4,sumc1,sumc3,sumb; double adjust_lon(); /* Assign satellite ratio to a global variable ------------------------------------------- */ gsat_ratio = sat_ratio; /* Place parameters in static storage for common use -------------------------------------------------*/ false_easting = false_east; false_northing = false_north; a = r_major; b = r_minor; es = 1.0 - SQUARE(r_minor/r_major); if (flag != 0) { alf = alf_in; p21 = time / 1440.0; lon_center = lon; start = start1; } else { if (satnum < 4) { alf = 99.092 * D2R; p21=103.2669323/1440.0; lon_center = (128.87 - (360.0/251.0 * path)) * D2R; gsat_ratio = 0.5201613; } else { alf = 98.2 * D2R; p21=98.8841202/1440.0; lon_center = (129.30 - (360.0/233.0 * path)) * D2R; gsat_ratio = 0.5201613; /* lon_center = (-129.30557714 - (360.0/233.0 * path)) * D2R; */ } start=0.0; } /* Report parameters to the user (to device set up prior to this call) -------------------------------------------------------------------*/ ptitle("SPACE OBLIQUE MERCATOR"); radius2(a,b); if (flag == 0) { genrpt_long(path, "Path Number: "); genrpt_long(satnum, "Satellite Number: "); } genrpt(alf*R2D, "Inclination of Orbit: "); genrpt(lon_center*R2D,"Longitude of Ascending Orbit: "); offsetp(false_easting,false_northing); genrpt(gsat_ratio, "Landsat Ratio: "); ca=cos(alf); if (fabs(ca)<1.e-9) ca=1.e-9; sa=sin(alf); e2c=es*ca*ca; e2s=es*sa*sa; w=(1.0-e2c)/(1.0-es); w=w*w-1.0; one_es=1.0-es; q = e2s / one_es; t = (e2s*(2.0-es)) / (one_es*one_es); xj = one_es*one_es*one_es; dlam=0.0; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=fa2; suma4=fa4; sumb=fb; sumc1=fc1; sumc3=fc3; for(i=9;i<=81;i+=18) { dlam=i; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=suma2+4.0*fa2; suma4=suma4+4.0*fa4; sumb=sumb+4.0*fb; sumc1=sumc1+4.0*fc1; sumc3=sumc3+4.0*fc3; } for(i=18; i<=72; i+=18) { dlam=i; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=suma2+2.0*fa2; suma4=suma4+2.0*fa4; sumb=sumb+2.0*fb; sumc1=sumc1+2.0*fc1; sumc3=sumc3+2.0*fc3; } dlam=90.0; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=suma2+fa2; suma4=suma4+fa4; sumb=sumb+fb; sumc1=sumc1+fc1; sumc3=sumc3+fc3; a2=suma2/30.0; a4=suma4/60.0; b=sumb/30.0; c1=sumc1/15.0; c3=sumc3/45.0; return(OK); } int somfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *y, /* (O) X projection coordinate */ double *x) /* (O) Y projection coordinate */ { long n,l; double delta_lon; double rlm,tabs,tlam,xlam,c,xlamt,ab2,ab1,xlamp,sav; double d,sdsq,sd,tanlg,xtan,tphi,dp,rlm2; double scl,tlamp,conv,delta_lat,radlt,radln; double temp; char errorbuf[80]; /* Forward equations -----------------*/ conv=1.e-7; delta_lat=lat; delta_lon= lon-lon_center; /* Test for latitude and longitude approaching 90 degrees ----------------------------------------------------*/ if (delta_lat>1.570796) delta_lat=1.570796; if (delta_lat<-1.570796) delta_lat= -1.570796; radlt=delta_lat; radln=delta_lon; if(delta_lat>=0.0)tlamp=PI/2.0; if(start!= 0.0)tlamp=2.5*PI; if(delta_lat<0.0) tlamp=1.5*PI; n=0; L230: sav=tlamp; l=0; xlamp=radln+p21*tlamp; ab1=cos(xlamp); if(fabs(ab1)=0.0) scl=1.0; if(ab1<0.0) scl= -1.0; ab2=tlamp-(scl)*sin(tlamp)*HALF_PI; L240: xlamt=radln+p21*sav; c=cos(xlamt); if (fabs(c)<1.e-7) xlamt=xlamt-1.e-7; xlam=(((1.0-es)*tan(radlt)*sa)+sin(xlamt)*ca)/c; tlam=atan(xlam); tlam=tlam+ab2; tabs=fabs(sav)-fabs(tlam); if(fabs(tabs) 50) goto L260; sav=tlam; goto L240; /* Adjust for confusion at beginning and end of landsat orbits -----------------------------------------------------------*/ L250: rlm=PI * gsat_ratio; rlm2=rlm+2.0*PI; n++; if(n>=3) goto L300; if(tlam>rlm&&tlam=rlm2) tlamp=HALF_PI; goto L230; L260: sprintf(errorbuf,"50 iterations without conv\n"); p_error(errorbuf,"som-forward"); return(214); /* tlam computed - now compute tphi --------------------------------*/ L300: dp=sin(radlt); tphi=asin(((1.0-es)*ca*dp-sa*cos(radlt)*sin(xlamt))/sqrt(1.0-es*dp*dp)); /* compute x and y ---------------*/ xtan = (PI/4.0) + (tphi/2.0); tanlg = log(tan(xtan)); sd=sin(tlam); sdsq=sd*sd; s=p21*sa*cos(tlam)*sqrt((1.0+t*sdsq)/((1.0+w*sdsq)*(1.0+q*sdsq))); d=sqrt(xj*xj+s*s); *x=b*tlam+a2*sin(2.0*tlam)+a4*sin(4.0*tlam)-tanlg*s/d; *x = a* *x; *y=c1*sd+c3*sin(3.0*tlam)+tanlg*xj/d; *y = a* *y; /* Negate x & swap x,y -------------------*/ temp= *x; *x= *y + false_easting; *y=temp + false_northing;; return(OK); } /* Series to calculate a,b,c coefficients to convert from transform latitude,longitude to Space Oblique Mercator (SOM) rectangular coordinates Mathematical analysis by John Snyder 6/82 --------------------------------------------------------------------------*/ static void som_series( double *fb, double *fa2, double *fa4, double *fc1, double *fc3, double *dlam) { double sd,sdsq,h,sq,fc; *dlam= *dlam*0.0174532925; /* Convert dlam to radians */ sd=sin(*dlam); sdsq=sd*sd; s=p21*sa*cos(*dlam)*sqrt((1.0+t*sdsq)/((1.0+w*sdsq)*(1.0+q*sdsq))); h=sqrt((1.0+q*sdsq)/(1.0+w*sdsq))*(((1.0+w*sdsq)/((1.0+q*sdsq)*(1.0+ q*sdsq)))-p21*ca); sq=sqrt(xj*xj+s*s); *fb=(h*xj-s*s)/sq; *fa2= *fb*cos(2.0* *dlam); *fa4= *fb*cos(4.0* *dlam); fc=s*(h+xj)/sq; *fc1=fc*cos(*dlam); *fc3=fc*cos(3.0* *dlam); } libgctp-1.0.orig/sominv.c0000644000000000000000000001545711236644451012324 0ustar /******************************************************************************* NAME SPACE OBLIQUE MERCATOR (SOM) PURPOSE: The first method to Transform input Easting and Northing to longitude and latitude for the SOM projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAM HISTORY PROGRAMMER DATE ---------- ---- D. Steinwand July, 1992 T. Mittan Mar, 1993 Raj Gejjagaraguppe(ARC) Aug, 1996 Landsat Ratio is removed as hard coded value. Now this ratio can be an input from the user through the projection parameter array element number 9. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" static double lon_center,a,b,a2,a4,c1,c3,q,t,u,w,xj,p21,sa,ca,es,s; static double som_series(double *fb, double *fa2, double *fa4, double *fc1, double *fc3, double *dlam); static double false_easting; static double false_northing; int sominvint( double r_major, /* major axis */ double r_minor, /* minor axis */ long satnum, /* Landsat satellite number (1,2,3,4,5) */ long path, /* Landsat path number */ double alf_in, double lon, double false_east, /* x offset in meters */ double false_north, /* y offset in meters */ double time, long flag, double sat_ratio) { long i; double alf,e2c,e2s,one_es; double dlam,fb,fa2,fa4,fc1,fc3,suma2,suma4,sumc1,sumc3,sumb; /* Place parameters in static storage for common use -------------------------------------------------*/ false_easting = false_east; false_northing = false_north; a = r_major; b = r_minor; es = 1.0 - SQUARE(r_minor/r_major); if (flag != 0) { alf = alf_in; lon_center = lon; p21 = time/1440.0; } else { if (satnum < 4) { alf = 99.092 * D2R; p21=103.2669323/1440.0; lon_center = (128.87 - (360.0/251.0 * path)) * D2R; } else { alf = 98.2 * D2R; p21=98.8841202/1440.0; lon_center = (129.30 - (360.0/233.0 * path)) * D2R; /* lon_center = (129.30557714 - (360.0/233.0 * path)) * D2R; */ } } /* Report parameters to the user (to device set up prior to this call) -------------------------------------------------------------------*/ ptitle("SPACE OBLIQUE MERCATOR"); radius2(a,b); genrpt_long(path, "Path Number: "); genrpt_long(satnum, "Satellite Number: "); genrpt(alf*R2D, "Inclination of Orbit: "); genrpt(lon_center*R2D, "Longitude of Ascending Orbit: "); offsetp(false_easting,false_northing); genrpt(sat_ratio, "Landsat Ratio: "); ca=cos(alf); if (fabs(ca)<1.e-9) ca=1.e-9; sa=sin(alf); e2c=es*ca*ca; e2s=es*sa*sa; w=(1.0-e2c)/(1.0-es); w=w*w-1.0; one_es=1.0-es; q = e2s / one_es; t = (e2s*(2.0-es)) / (one_es*one_es); u= e2c / one_es; xj = one_es*one_es*one_es; dlam=0.0; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=fa2; suma4=fa4; sumb=fb; sumc1=fc1; sumc3=fc3; for(i=9;i<=81;i+=18) { dlam=i; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=suma2+4.0*fa2; suma4=suma4+4.0*fa4; sumb=sumb+4.0*fb; sumc1=sumc1+4.0*fc1; sumc3=sumc3+4.0*fc3; } for(i=18; i<=72; i+=18) { dlam=i; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=suma2+2.0*fa2; suma4=suma4+2.0*fa4; sumb=sumb+2.0*fb; sumc1=sumc1+2.0*fc1; sumc3=sumc3+2.0*fc3; } dlam=90.0; som_series(&fb,&fa2,&fa4,&fc1,&fc3,&dlam); suma2=suma2+fa2; suma4=suma4+fa4; sumb=sumb+fb; sumc1=sumc1+fc1; sumc3=sumc3+fc3; a2=suma2/30.0; a4=suma4/60.0; b=sumb/30.0; c1=sumc1/15.0; c3=sumc3/45.0; return(OK); } int sominv( double y, /* (I) Y projection coordinate */ double x, /* (I) X projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double tlon,conv,sav,sd,sdsq,blon,dif,st,defac,actan,tlat,dd,bigk,bigk2,xlamt; double sl,scl,dlat,dlon,temp; long inumb; /* Inverse equations. Begin inverse computation with approximation for tlon. Solve for transformed long. ---------------------------*/ temp=y; y=x - false_easting; x= temp - false_northing; tlon= x/(a*b); conv=1.e-9; for(inumb=0;inumb<50;inumb++) { sav=tlon; sd=sin(tlon); sdsq=sd*sd; s=p21*sa*cos(tlon)*sqrt((1.0+t*sdsq)/((1.0+w*sdsq)*(1.0+q*sdsq))); blon=(x/a)+(y/a)*s/xj-a2*sin(2.0*tlon)-a4*sin(4.0*tlon)-(s/xj)*(c1* sin(tlon)+c3*sin(3.0*tlon)); tlon=blon/b; dif=tlon-sav; if(fabs(dif)=50) { p_error("50 iterations without convergence","som-inverse"); return(214); } /* Compute transformed lat. ------------------------*/ st=sin(tlon); defac=exp(sqrt(1.0+s*s/xj/xj)*(y/a-c1*st-c3*sin(3.0*tlon))); actan=atan(defac); tlat=2.0*(actan-(PI/4.0)); /* Compute geodetic longitude --------------------------*/ dd=st*st; if(fabs(cos(tlon))<1.e-7) tlon=tlon-1.e-7; bigk=sin(tlat); bigk2=bigk*bigk; xlamt=atan(((1.0-bigk2/(1.0-es))*tan(tlon)*ca-bigk*sa*sqrt((1.0+q*dd) *(1.0-bigk2)-bigk2*u)/cos(tlon))/(1.0-bigk2*(1.0+u))); /* Correct inverse quadrant ------------------------*/ if(xlamt>=0.0) sl=1.0; if(xlamt<0.0) sl= -1.0; if(cos(tlon)>=0.0) scl=1.0; if(cos(tlon)<0.0) scl= -1.0; xlamt=xlamt-((PI/2.0)*(1.0-scl)*sl); dlon=xlamt-p21*tlon; /* Compute geodetic latitude -------------------------*/ if(fabs(sa)<1.e-7)dlat=asin(bigk/sqrt((1.0-es)*(1.0-es)+es*bigk2)); if(fabs(sa)>=1.e-7)dlat=atan((tan(tlon)*cos(xlamt)-ca*sin(xlamt))/((1.0-es)*sa)); *lon = adjust_lon(dlon+lon_center); *lat = dlat; return(OK); } /* Series to calculate a,b,c coefficients to convert from transform latitude,longitude to Space Oblique Mercator (SOM) rectangular coordinates Mathematical analysis by John Snyder 6/82 --------------------------------------------------------------------------*/ static double som_series( double *fb, double *fa2, double *fa4, double *fc1, double *fc3, double *dlam) { double sd,sdsq,h,sq,fc; *dlam= *dlam*0.0174532925; /* Convert dlam to radians */ sd=sin(*dlam); sdsq=sd*sd; s=p21*sa*cos(*dlam)*sqrt((1.0+t*sdsq)/((1.0+w*sdsq)*(1.0+q*sdsq))); h=sqrt((1.0+q*sdsq)/(1.0+w*sdsq))*(((1.0+w*sdsq)/((1.0+q*sdsq)*(1.0+ q*sdsq)))-p21*ca); sq=sqrt(xj*xj+s*s); *fb=(h*xj-s*s)/sq; *fa2= *fb*cos(2.0* *dlam); *fa4= *fb*cos(4.0* *dlam); fc=s*(h+xj)/sq; *fc1=fc*cos(*dlam); *fc3=fc*cos(3.0* *dlam); return(0); } libgctp-1.0.orig/sphdz.c0000644000000000000000000001513411236644451012131 0ustar /******************************************************************************* NAME SPHDZ PURPOSE: This function assigns values to the semimajor axis, semiminor axis, and radius of sphere. If the datum code is negative, the first two values in the parameter array (parm) are used to define the values as follows: --If parm[0] is a non-zero value and parm[1] is greater than one, the semimajor axis and radius are set to parm[0] and the semiminor axis is set to parm[1]. --If parm[0] is nonzero and parm[1] is greater than zero but less than or equal to one, the semimajor axis and radius are set to parm[0] and the semiminor axis is computed from the eccentricity squared value parm[1]. This algorithm is given below. --If parm[0] is nonzero and parm[1] is equal to zero, the semimajor axis, radius, and semiminor axis are set to parm[0]. --If parm[0] equals zero and parm[1] is greater than zero, the default Clarke 1866 is used to assign values to the semimajor axis, radius and semiminor axis. --If parm[0] and parm[1] equals zero, the semimajor axis and radius are set to 6370997.0 (This value is represented as the next to last value in the datum code array) and the semiminor axis is set to zero. For datum (-20), used for BCEA and/or CEA projections, the corresponding values will be 6371228.0 m. if a datum code is zero or greater, the semimajor and semiminor axis are defined by the datum code as found in Table A and the radius is set to 6370997.0 (except for datum code of 20, where it will be 6371228.0). If the datum code is greater than DATMCT+1 the default datum, Clarke 1866, is used to define the semimajor and semiminor axis and radius is set to 6370997.0 (except for datum code of 20, where it will be 6371228.0). The algorithm to define the semiminor axis using the eccentricity squared value is as follows: semiminor = sqrt(1.0 - ES) * semimajor where ES = eccentricity squared Table A: SUPPORTED DATUMS 0: Clarke 1866 (default) 1: Clarke 1880 2: Bessel 3: International 1967 4: International 1909 5: WGS 72 6: Everest 7: WGS 66 8: GRS 1980/WGS 84 9: Airy 10: Modified Everest 11: Modified Airy 12: Walbeck 13: Southeast Asia 14: Australian National 15: Krassovsky 16: Hough 17: Mercury 1960 18: Modified Mercury 1968 19: Sphere of Radius 6370997 meters 20: Sphere of Radius 21: Sphere of Radius 6371228 meters 6371007.181 meters Note: Datum code of 20 is added by Abe Taaheri for 25 km global EASE grid that assumes an earth raius of 6371228 meters. Note: Datum code of 21 is added by Sharon Ni for MODIS Sinusoidal data that assumes an earth raius of 6371007.181 meters. PROGRAMMER DATE ---------- ---- T. Mittan MARCH, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include #include "cproj.h" #include "proj.h" static double major[22] = {6378206.4, 6378249.145, 6377397.155, 6378157.5, 6378388.0, 6378135.0, 6377276.3452, 6378145.0, 6378137.0, 6377563.396, 6377304.063, 6377340.189, 6378137.0, 6378155.0, 6378160.0, 6378245.0, 6378270.0, 6378166.0, 6378150.0, 6370997.0, 6371228.0, 6371007.181}; static double minor[22] = {6356583.8, 6356514.86955, 6356078.96284, 6356772.2, 6356911.94613, 6356750.519915, 6356075.4133, 6356759.769356, 6356752.31414, 6356256.91, 6356103.039, 6356034.448, 6356752.314245, 6356773.3205, 6356774.719, 6356863.0188, 6356794.343479, 6356784.283666, 6356768.337303, 6370997.0, 6371228.0, 6371007.181}; /* Finds the correct ellipsoid axis ---------------------------------*/ int sphdz( long isph, /* spheroid code number also known as datum */ double *parm, /* projection parameters */ double *r_major, /* major axis */ double *r_minor, /* minor axis */ double *radius) /* radius */ { double t_major; /* temporary major axis */ double t_minor; /* temporary minor axis */ long jsph; /* spheroid code number */ if (isph < 0) { t_major = fabs(parm[0]); t_minor = fabs(parm[1]); if (t_major > 0.0) { if (t_minor > 1.0) { *r_major = t_major; *r_minor = t_minor; *radius = t_major; } else if (t_minor > 0.0) { *r_major = t_major; *radius = t_major; *r_minor = (sqrt(1.0 - t_minor)) * t_major; } else { *r_major = t_major; *radius = t_major; *r_minor = t_major; } } else /* t_major <= 0 */ if (t_minor > 0.0) { *r_major = major[0]; *radius = major[0]; *r_minor = minor[0]; } else /* t_minor <= 0 */ if(isph == -21 ) /* MODIS Sphere*/ { *r_major = major[DATMCT + 1]; *radius = major[DATMCT + 1]; *r_minor = 6371007.181; } else if(isph == -20 ) /*BCEA or CEA */ { *r_major = major[DATMCT]; *radius = major[DATMCT]; *r_minor = 6371228.0; } else { *r_major = major[DATMCT - 1]; *radius = major[DATMCT - 1]; *r_minor = 6370997.0; } } else /* isph >= 0 */ { jsph = labs(isph); if (jsph > 21) { p_error("Invalid spheroid selection","INFORMATIONAL"); p_error("Reset to 0","INFORMATIONAL"); isph = 1; jsph = 0; } else if (jsph == 21) /* check for the Modis sphere*/ { *r_major = major[jsph]; *r_minor = minor[jsph]; *radius = major[jsph]; } else if (jsph == 20) /* BCEA defaults to spherical earth with radius 6371228.0 */ { *r_major = major[jsph]; *r_minor = minor[jsph]; *radius = major[DATMCT]; } else { *r_major = major[jsph]; *r_minor = minor[jsph]; *radius = major[DATMCT - 1]; } } return(OK); } libgctp-1.0.orig/spload.f0000644000000000000000000001304611236644451012266 0ustar C **********************************************************************SPLD 1 C ** PROGRAM SPLOAD - LOADS NAD 1927 AND NAD 1983 DIRECT ACCESS FILES **SPLD 2 C ** U. S. GEOLOGICAL SURVEY - CHIPPEAUX AND LINCK 09/19/89 **SPLD 3 C **********************************************************************SPLD 4 PROGRAM SPLOAD SPLD 5 C SPLD 6 C PROGRAM TO COPY NAD 1927 AND NAD 1983 SEQUENTIAL FILES TO DIRECT SPLD 7 C ACCESS FILES FOR USE BY GCTP SPLD 8 C SPLD 9 REAL*8 PARM(9) SPLD 10 INTEGER*4 I, ID, IZONE, LENGTH SPLD 11 CHARACTER*32 ZNAME, GETF27, GETF83, PUTF27, PUTF83 SPLD 12 CHARACTER*3 STAT27, STAT83 SPLD 13 C SPLD 14 C IPR = LOGICAL UNIT NUMBER OF PRINTER SPLD 15 C GETF27 = NAME OF NAD 1927 INPUT FILE SPLD 16 C PUTF27 = NAME OF NAD 1927 OUTPUT FILE SPLD 17 C GETF83 = NAME OF NAD 1983 INPUT FILE SPLD 18 C PUTF83 = NAME OF NAD 1983 OUTPUT FILE SPLD 19 C STAT27 = STATUS OF NAD 1927 OUTPUT FILE SPLD 20 C STAT83 = STATUS OF NAD 1983 OUTPUT FILE SPLD 21 C LENGTH = LENGTH IN BYTES OR WORDS OF OUTPUT RECORDS SPLD 22 C SPLD 23 PARAMETER (IPR = 6) SPLD 24 PARAMETER (GETF27 = 'nad1927', GETF83 = 'nad1983') SPLD 25 PARAMETER (PUTF27 = 'nad27sp', PUTF83 = 'nad83sp') SPLD 26 PARAMETER (STAT27 = 'NEW', STAT83 = 'NEW') SPLD 27 PARAMETER (LENGTH = 108) SPLD 28 C SPLD 29 OPEN(UNIT=2,FILE=GETF27,STATUS='OLD', SPLD 30 . ACCESS='SEQUENTIAL') SPLD 31 OPEN(UNIT=3,FILE=PUTF27,STATUS=STAT27,RECL=LENGTH, SPLD 32 . ACCESS='DIRECT') SPLD 33 C SPLD 34 OPEN(UNIT=12,FILE=GETF83,STATUS='OLD', SPLD 35 . ACCESS='SEQUENTIAL') SPLD 36 OPEN(UNIT=13,FILE=PUTF83,STATUS=STAT83,RECL=LENGTH, SPLD 37 . ACCESS='DIRECT') SPLD 38 C SPLD 39 1 FORMAT(A32,7X,I1,31X,I4) SPLD 40 2 FORMAT(3D25.16) SPLD 41 3 FORMAT(1X,I3,5X,A32,5X,I4,5X,I1) SPLD 42 C SPLD 43 I = 0 SPLD 44 10 READ(2,1,END=20) ZNAME, ID, IZONE SPLD 45 I = I + 1 SPLD 46 READ(2,2) PARM(1), PARM(2), PARM(3) SPLD 47 READ(2,2) PARM(4), PARM(5), PARM(6) SPLD 48 READ(2,2) PARM(7), PARM(8), PARM(9) SPLD 49 WRITE(3,REC=I) ZNAME, ID, PARM SPLD 50 WRITE(IPR,3) I, ZNAME, IZONE, ID SPLD 51 GO TO 10 SPLD 52 C SPLD 53 20 I = 0 SPLD 54 30 READ(12,1,END=40) ZNAME, ID, IZONE SPLD 55 I = I + 1 SPLD 56 READ(12,2) PARM(1), PARM(2), PARM(3) SPLD 57 READ(12,2) PARM(4), PARM(5), PARM(6) SPLD 58 READ(12,2) PARM(7), PARM(8), PARM(9) SPLD 59 WRITE(13,REC=I) ZNAME, ID, PARM SPLD 60 WRITE(IPR,3) I, ZNAME, IZONE, ID SPLD 61 GO TO 30 SPLD 62 C SPLD 63 40 CLOSE(2) SPLD 64 CLOSE(3) SPLD 65 CLOSE(12) SPLD 66 CLOSE(13) SPLD 67 C SPLD 68 STOP SPLD 69 END SPLD 70 libgctp-1.0.orig/sterfor.c0000644000000000000000000000630111236644451012461 0ustar /******************************************************************************* NAME STEREOGRAPHIC PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Stereographic projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p10; /* sin of center latitude */ static double cos_p10; /* cos of center latitude */ /* Initialize the Stereographic projection --------------------------------------*/ int sterforint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; tsincos(center_lat,&sin_p10,&cos_p10); /* Report parameters to the user -----------------------------*/ ptitle("STEREOGRAPHIC"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Stereographic forward equations--mapping lat,long to x,y ---------------------------------------------------*/ int sterfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double sinphi, cosphi; /* sin and cos value */ double dlon; /* delta longitude value */ double coslon; /* cos of longitude */ double ksp; /* scale factor */ double g; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); tsincos(lat,&sinphi,&cosphi); coslon = cos(dlon); g = sin_p10 * sinphi + cos_p10 * cosphi * coslon; if (fabs(g + 1.0) <= EPSLN) { p_error("Point projects into infinity","ster-for"); return(103); } else { ksp = 2.0 / (1.0 + g); *x = false_easting + r_major * ksp * cosphi * sin(dlon); *y = false_northing + r_major * ksp * (cos_p10 * sinphi - sin_p10 * cosphi * coslon); } return(OK); } libgctp-1.0.orig/sterinv.c0000644000000000000000000000700311236644451012467 0ustar /******************************************************************************* NAME STEREOGRAPHIC PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Stereographic projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Mar, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double sin_p10; /* sin of center latitude */ static double cos_p10; /* cos of center latitude */ /* Initialize the Stereographic projection --------------------------------------*/ int sterinvint( double r_maj, /* major axis */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; tsincos(center_lat,&sin_p10,&cos_p10); /* Report parameters to the user -----------------------------*/ ptitle("STEREOGRAPHIC"); radius(r_major); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Stereographic inverse equations--mapping x,y to lat/long -------------------------------------------------------*/ int sterinv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double rh; /* height above ellipsoid */ double z; /* angle */ double sinz,cosz; /* sin of z and cos of z */ double con; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; rh = sqrt(x * x + y * y); z = 2.0 * atan(rh / (2.0 * r_major)); tsincos(z,&sinz,&cosz); *lon = lon_center; if (fabs(rh) <= EPSLN) { *lat = lat_origin; return(OK); } else { *lat = asin(cosz * sin_p10 + (y * sinz * cos_p10) / rh); con = fabs(lat_origin) - HALF_PI; if (fabs(con) <= EPSLN) { if (lat_origin >= 0.0) { *lon = adjust_lon(lon_center + atan2(x, -y)); return(OK); } else { *lon = adjust_lon(lon_center - atan2(-x, y)); return(OK); } } else { con = cosz - sin_p10 * sin(*lat); if ((fabs(con) < EPSLN) && (fabs(x) < EPSLN)) return(OK); else *lon = adjust_lon(lon_center + atan2((x * sinz * cos_p10), (con * rh))); } } return(OK); } libgctp-1.0.orig/stplnfor.c0000644000000000000000000001662311236644451012654 0ustar /******************************************************************************* NAME STATE PLANE PURPOSE: Transforms input longitude and latitude to Easting and Northing for the State Plane projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan Apr, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. HISTORY 15-Nov-2005 TR NCR 44092 - Added defined(CYGWIN) *******************************************************************************/ #include #include "cproj.h" static int id; static long inzone = 0; static long NAD27[134] = {101,102,5010,5300,201,202,203,301,302,401,402,403,404, 405,406,407,501,502,503,600,700,901,902,903,1001,1002,5101, 5102,5103,5104,5105,1101,1102,1103,1201,1202,1301,1302,1401, 1402,1501,1502,1601,1602,1701,1702,1703,1801,1802,1900,2001, 2002,2101,2102,2103,2111,2112,2113,2201,2202,2203,2301,2302, 2401,2402,2403,2501,2502,2503,2601,2602,2701,2702,2703,2800, 2900,3001,3002,3003,3101,3102,3103,3104,3200,3301,3302,3401, 3402,3501,3502,3601,3602,3701,3702,3800,3901,3902,4001,4002, 4100,4201,4202,4203,4204,4205,4301,4302,4303,4400,4501,4502, 4601,4602,4701,4702,4801,4802,4803,4901,4902,4903,4904,5001, 5002,5003,5004,5005,5006,5007,5008,5009,5201,5202,5400}; static long NAD83[134] = {101,102,5010,5300,201,202,203,301,302,401,402,403, 404,405,406,0000,501,502,503,600,700,901,902,903,1001,1002, 5101,5102,5103,5104,5105,1101,1102,1103,1201,1202,1301,1302, 1401,1402,1501,1502,1601,1602,1701,1702,1703,1801,1802,1900, 2001,2002,2101,2102,2103,2111,2112,2113,2201,2202,2203,2301, 2302,2401,2402,2403,2500,0000,0000,2600,0000,2701,2702,2703, 2800,2900,3001,3002,3003,3101,3102,3103,3104,3200,3301,3302, 3401,3402,3501,3502,3601,3602,3701,3702,3800,3900,0000,4001, 4002,4100,4201,4202,4203,4204,4205,4301,4302,4303,4400,4501, 4502,4601,4602,4701,4702,4801,4802,4803,4901,4902,4903,4904, 5001,5002,5003,5004,5005,5006,5007,5008,5009,5200,0000,5400}; /* Initialize the State Plane projection ------------------------------------*/ int stplnforint( long zone, long sphere, char *fn27, char *fn83) { long ind; long i; long nadval; double table[9]; char pname[32]; char buf[100]; double r_maj,r_min,scale_fact,center_lon; double center_lat,false_east,false_north; double azimuth,lat_orig,lon_orig,lon1,lat1,lon2,lat2; long mode,iflg; FILE *ptr; #if defined(DEC_ALPHA) || defined(SCO) || defined(LINUX) || defined(CYGWIN) char swap[16]; char* swapPtr; long j; #endif ind = -1; if (inzone != zone) inzone = zone; else return(OK); if (zone > 0) { if (sphere == 0) { for (i = 0; i < 134; i++) { if (zone == NAD27[i]) { ind = i; break; } } } else if (sphere == 8) { for (i = 0; i < 134; i++) { if (zone == NAD83[i]) { ind = i; break; } } } } if (ind == -1) { sprintf(buf,"Illegal zone #%4ld for spheroid #%4ld",zone,sphere); p_error(buf,"state-init"); return(21); } if (sphere == 0) ptr = fopen(fn27,"r"); else ptr = fopen(fn83,"r"); if (ptr == NULL) { p_error("Error opening State Plane parameter file","state-for"); return(22); } fseek(ptr,(ind) * 432, 0); fread(pname,1,32,ptr); fread(&id,sizeof(int),1,ptr); fread(table,sizeof(double),9,ptr); fclose(ptr); #if defined(DEC_ALPHA) || defined(SCO) || defined(LINUX) || defined(CYGWIN) /* swap bytes as necessary */ swapPtr = (char*) (&id); for (i=0;i 0 setting lat1 and lat2 to zero do make any difference in omerforint */ lat2 = 0.0; omerforint(r_maj,r_min,scale_fact,azimuth,lon_orig,lat_orig,false_east, false_north,lon1,lat1,lon2,lat2,mode); } return(OK); } /* State plane forward equations--mapping lat,long to x,y -----------------------------------------------------*/ int stplnfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { long iflg; /* Forward equations -----------------*/ if (id == 1) { if ((iflg = tmfor(lon, lat, x, y)) != 0) return(iflg); } else if (id == 2) { if ((iflg = lamccfor(lon, lat, x, y)) != 0) return(iflg); } else if (id == 3) { if ((iflg = polyfor(lon, lat, x, y)) != 0) return(iflg); } else if (id == 4) { if ((iflg = omerfor(lon, lat, x, y)) != 0) return(iflg); } return(OK); } libgctp-1.0.orig/stplninv.c0000644000000000000000000001663211236644451012662 0ustar /******************************************************************************* NAME STATE PLANE PURPOSE: Transforms input Easting and Northing to longitude and latitude for the State Plane projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan Apr, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" static int id; static long inzone = 0; static long nad27[134] = {101,102,5010,5300,201,202,203,301,302,401,402,403, 404,405,406,407,501,502,503,600,700,901,902,903,1001,1002, 5101,5102,5103,5104,5105,1101,1102,1103,1201,1202,1301,1302, 1401,1402,1501,1502,1601,1602,1701,1702,1703,1801,1802,1900, 2001,2002,2101,2102,2103,2111,2112,2113,2201,2202,2203,2301, 2302,2401,2402,2403,2501,2502,2503,2601,2602,2701,2702,2703, 2800,2900,3001,3002,3003,3101,3102,3103,3104,3200,3301,3302, 3401,3402,3501,3502,3601,3602,3701,3702,3800,3901,3902,4001, 4002,4100,4201,4202,4203,4204,4205,4301,4302,4303,4400,4501, 4502,4601,4602,4701,4702,4801,4802,4803,4901,4902,4903,4904, 5001,5002,5003,5004,5005,5006,5007,5008,5009,5201,5202,5400}; static long nad83[134] = {101,102,5010,5300,201,202,203,301,302,401,402,403, 404,405,406,0000,501,502,503,600,700,901,902,903,1001,1002, 5101,5102,5103,5104,5105,1101,1102,1103,1201,1202,1301,1302, 1401,1402,1501,1502,1601,1602,1701,1702,1703,1801,1802,1900, 2001,2002,2101,2102,2103,2111,2112,2113,2201,2202,2203,2301, 2302,2401,2402,2403,2500,0000,0000,2600,0000,2701,2702,2703, 2800,2900,3001,3002,3003,3101,3102,3103,3104,3200,3301,3302, 3401,3402,3501,3502,3601,3602,3701,3702,3800,3900,0000,4001, 4002,4100,4201,4202,4203,4204,4205,4301,4302,4303,4400,4501, 4502,4601,4602,4701,4702,4801,4802,4803,4901,4902,4903,4904, 5001,5002,5003,5004,5005,5006,5007,5008,5009,5200,0000,5400}; /* Initialize the State Plane projection ------------------------------------*/ int stplninvint( long zone, long sphere, char *fn27, char *fn83) { long ind; long i; long nadval; double table[9]; char pname[33]; char buf[100]; double r_maj,r_min,scale_fact,center_lon; double center_lat,false_east,false_north; double azimuth,lat_orig,lon_orig,lon1,lat1,lon2,lat2; long mode,iflg; FILE *ptr; #if defined(DEC_ALPHA) || defined(SCO) || defined(LINUX) char swap[16]; char* swapPtr; long j; #endif ind = -1; if (inzone != zone) inzone = zone; else return(OK); if (zone > 0) { if (sphere == 0) { for (i = 0; i < 134; i++) { if (zone == nad27[i]) { ind = i; break; } } } else if (sphere == 8) { for (i = 0; i < 134; i++) { if (zone == nad83[i]) { ind = i; break; } } } } if (ind == -1) { sprintf(buf,"Illegal zone #%4ld for spheroid #%4ld",zone,sphere); p_error(buf,"state-init"); return(21); } if (sphere == 0) ptr = fopen(fn27,"r"); else ptr = fopen(fn83,"r"); if (ptr == NULL) { p_error("Error opening State Plane parameter file","state-inv"); return(22); } fseek(ptr,ind * 432, 0); ftell(ptr); fread(pname,sizeof(char),32,ptr); fread(&id,sizeof(int),1,ptr); fread(table,sizeof(double),9,ptr); fclose(ptr); #if defined(DEC_ALPHA) || defined(SCO) || defined(LINUX) /* swap bytes as necessary */ swapPtr = (char*) (&id); for (i=0;i 0 setting lat1 and lat2 to zero do make any difference in omerinvint */ lat2 = 0.0; omerinvint(r_maj,r_min,scale_fact,azimuth,lon_orig,lat_orig,false_east, false_north,lon1,lat1,lon2,lat2,mode); } return(OK); } /* State Plane inverse equations--mapping x,y to lat/long -----------------------------------------------------*/ int stplninv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { long iflg; /* Inverse equations -----------------*/ if (id == 1) { if ((iflg = tminv(x, y, lon, lat)) != 0) return(iflg); } else if (id == 2) { if ((iflg = lamccinv(x, y, lon, lat)) != 0) return(iflg); } else if (id == 3) { if ((iflg = polyinv(x, y, lon, lat)) != 0) return(iflg); } else if (id == 4) { if ((iflg = omerinv(x, y, lon, lat)) != 0) return(iflg); } return(OK); } libgctp-1.0.orig/tmfor.c0000644000000000000000000001235011236644451012125 0ustar /******************************************************************************* NAME TRANSVERSE MERCATOR PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Transverse Mercator projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 S. Nelson Feb, 1995 Divided tmfor.c into two files, one for UTM (utmfor.c) and one for TM (tmfor.c). This was a necessary change to run forward projection conversions for both UTM and TM in the same process. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double scale_factor; /* scale factor */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e0,e1,e2,e3; /* eccentricity constants */ static double es,esp; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double ind; /* spherical flag */ /* Initialize the Transverse Mercator (TM) projection -------------------------------------------------*/ int tmforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double scale_fact, /* scale factor */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; scale_factor = scale_fact; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); ml0 = r_major * mlfn(e0, e1, e2, e3, lat_origin); esp = es / (1.0 - es); if (es < .00001) ind = 1; else ind = 0; /* Report parameters to the user -----------------------------*/ ptitle("TRANSVERSE MERCATOR (TM)"); radius2(r_major, r_minor); genrpt(scale_factor,"Scale Factor at C. Meridian: "); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Transverse Mercator forward equations--mapping lat,long to x,y Note: The algorithm for TM is exactly the same as UTM and therefore if a change is implemented, also make the change to UTMFOR.c --------------------------------------------------------------*/ int tmfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double sin_phi, cos_phi;/* sin and cos value */ double al, als; /* temporary values */ double b; /* temporary values */ double c, t, tq; /* temporary values */ double con, n, ml; /* cone constant, small m */ /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); tsincos(lat, &sin_phi, &cos_phi); /* This part was in the fortran code and is for the spherical form ----------------------------------------------------------------*/ if (ind != 0) { b = cos_phi * sin(delta_lon); if ((fabs(fabs(b) - 1.0)) < .0000000001) { p_error("Point projects into infinity","tm-for"); return(93); } else { *x = .5 * r_major * scale_factor * log((1.0 + b)/(1.0 - b)); con = acos(cos_phi * cos(delta_lon)/sqrt(1.0 - b*b)); if (lat < 0) con = - con; *y = r_major * scale_factor * (con - lat_origin); return(OK); } } al = cos_phi * delta_lon; als = SQUARE(al); c = esp * SQUARE(cos_phi); tq = tan(lat); t = SQUARE(tq); con = 1.0 - es * SQUARE(sin_phi); n = r_major / sqrt(con); ml = r_major * mlfn(e0, e1, e2, e3, lat); *x = scale_factor * n * al * (1.0 + als / 6.0 * (1.0 - t + c + als / 20.0 * (5.0 - 18.0 * t + SQUARE(t) + 72.0 * c - 58.0 * esp))) + false_easting; *y = scale_factor * (ml - ml0 + n * tq * (als * (0.5 + als / 24.0 * (5.0 - t + 9.0 * c + 4.0 * SQUARE(c) + als / 30.0 * (61.0 - 58.0 * t + SQUARE(t) + 600.0 * c - 330.0 * esp))))) + false_northing; return(OK); } libgctp-1.0.orig/tminv.c0000644000000000000000000001376711236644451012150 0ustar /******************************************************************************* NAME TRANSVERSE MERCATOR PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Transverse Mercator projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 S. Nelson Feb, 1995 Divided tminv.c into two files, one for UTM (utminv.c) and one for TM (tminv.c). This was a necessary change to run inverse projection conversions for both UTM and TM in the same process. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double scale_factor; /* scale factor */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e0,e1,e2,e3; /* eccentricity constants */ static double es,esp; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static long ind; /* sphere flag value */ /* Initialize the Transverse Mercator (TM) projection -------------------------------------------------------------*/ int tminvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double scale_fact, /* scale factor */ double center_lon, /* center longitude */ double center_lat, /* center latitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { double temp; /* temporary variable */ /* Place parameters in static storage for common use -------------------------------------------------*/ r_major = r_maj; r_minor = r_min; scale_factor = scale_fact; lon_center = center_lon; lat_origin = center_lat; false_northing = false_north; false_easting = false_east; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); ml0 = r_major * mlfn(e0, e1, e2, e3, lat_origin); esp = es / (1.0 - es); if (es < .00001) ind = 1; /* Report parameters to the user -----------------------------*/ ptitle("TRANSVERSE MERCATOR (TM)"); radius2(r_major, r_minor); genrpt(scale_factor,"Scale Factor at C. Meridian: "); cenlonmer(lon_center); origin(lat_origin); offsetp(false_easting,false_northing); return(OK); } /* Transverse Mercator inverse equations--mapping x,y to lat,long Note: The algorithm for UTM is exactly the same as TM and therefore if a change is implemented, also make the change to UTMINV.c --------------------------------------------------------------*/ int tminv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double con,phi; /* temporary angles */ double delta_phi; /* difference between longitudes */ long i; /* counter variable */ double sin_phi, cos_phi, tan_phi; /* sin cos and tangent values */ double c, cs, t, ts, n, r, d, ds; /* temporary variables */ double f, h, g, temp; /* temporary variables */ long max_iter = 6; /* maximun number of iterations */ /* fortran code for spherical form --------------------------------*/ if (ind != 0) { f = exp(x/(r_major * scale_factor)); g = .5 * (f - 1/f); temp = lat_origin + y/(r_major * scale_factor); h = cos(temp); con = sqrt((1.0 - h * h)/(1.0 + g * g)); *lat = asinz(con); if (temp < 0) *lat = -*lat; if ((g == 0) && (h == 0)) { *lon = lon_center; return(OK); } else { *lon = adjust_lon(atan2(g,h) + lon_center); return(OK); } } /* Inverse equations -----------------*/ x = x - false_easting; y = y - false_northing; con = (ml0 + y / scale_factor) / r_major; phi = con; for (i=0;;i++) { delta_phi = ((con + e1 * sin(2.0*phi) - e2 * sin(4.0*phi) + e3 * sin(6.0*phi)) / e0) - phi; /* delta_phi = ((con + e1 * sin(2.0*phi) - e2 * sin(4.0*phi)) / e0) - phi; */ phi += delta_phi; if (fabs(delta_phi) <= EPSLN) break; if (i >= max_iter) { p_error("Latitude failed to converge","TM-INVERSE"); return(95); } } if (fabs(phi) < HALF_PI) { tsincos(phi, &sin_phi, &cos_phi); tan_phi = tan(phi); c = esp * SQUARE(cos_phi); cs = SQUARE(c); t = SQUARE(tan_phi); ts = SQUARE(t); con = 1.0 - es * SQUARE(sin_phi); n = r_major / sqrt(con); r = n * (1.0 - es) / con; d = x / (n * scale_factor); ds = SQUARE(d); *lat = phi - (n * tan_phi * ds / r) * (0.5 - ds / 24.0 * (5.0 + 3.0 * t + 10.0 * c - 4.0 * cs - 9.0 * esp - ds / 30.0 * (61.0 + 90.0 * t + 298.0 * c + 45.0 * ts - 252.0 * esp - 3.0 * cs))); *lon = adjust_lon(lon_center + (d * (1.0 - ds / 6.0 * (1.0 + 2.0 * t + c - ds / 20.0 * (5.0 - 2.0 * c + 28.0 * t - 3.0 * cs + 8.0 * esp + 24.0 * ts))) / cos_phi)); } else { *lat = HALF_PI * sign(y); *lon = lon_center; } return(OK); } libgctp-1.0.orig/untfz.c0000644000000000000000000000354211236644451012147 0ustar /******************************************************************************* NAME UNTFZ PURPOSE: This function determines the convergence factor between the input unit type and the output unit type. Valid types include: 0 = Radians 3 = Seconds of arc 1 = U.S. feet 4 = Degrees of arc 2 = Meters 5 = International feet PROGRAMMER DATE ---------- ---- T. Mittan MARCH, 1993 ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include "cproj.h" #include "proj.h" static double factors[6][6] = {{1.0, 0.0, 0.0, 206264.8062470963, 57.29577951308231, 0.0}, {0.0, 1.0, .3048006096012192, 0.0, 0.0, 1.000002000004}, {0.0, 3.280833333333333, 1.0, 0.0, 0.0, 3.280839895013124}, {.484813681109536e-5, 0.0, 0.0, 1.0, .27777777777778e-3, 0.0}, {.0174532925199433, 0.0, 0.0, 3600, 1.0, 0.0}, {0.0, .999998, .3048, 0.0, 0.0, 1.0}}; /* Convert DMS packed angle into deg ----------------------------------*/ long untfz( long inunit, long outunit, double *factor) { if ((outunit >= 0) && (outunit <= MAXUNIT) && (inunit >= 0) && (inunit <= MAXUNIT)) { *factor = factors[inunit][outunit]; if (*factor == 0.0) { p_error("Uncompatable unit codes","untfz-code"); return(1101); } } else { p_error("Illegal source or target unit code","untfz-unit"); return(5); } return(OK); } libgctp-1.0.orig/utmfor.c0000644000000000000000000001211711236644451012313 0ustar /******************************************************************************* NAME UNIVERSAL TRANSVERSE MERCATOR PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Universal Transverse Mercator projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 S. Nelson Feb, 1995 Divided tmfor.c into two files, one for UTM (utmfor.c) and one for TM (tmfor.c). This was a necessary change to run forward projection conversions for both UTM and TM in the same process. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double scale_factor; /* scale factor */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e0,e1,e2,e3; /* eccentricity constants */ static double es,esp; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static double ind; /* spherical flag */ /* Initialize the Universal Transverse Mercator (UTM) projection -------------------------------------------------------------*/ int utmforint( double r_maj, /* major axis */ double r_min, /* minor axis */ double scale_fact, /* scale factor */ long zone) /* zone number */ { double temp; /* temporary variable */ if ((labs(zone) < 1) || (labs(zone) > 60)) { p_error("Illegal zone number","utm-forint"); return(11); } r_major = r_maj; r_minor = r_min; scale_factor = scale_fact; lat_origin = 0.0; lon_center = ((6 * labs(zone)) - 183) * D2R; false_easting = 500000.0; false_northing = (zone < 0) ? 10000000.0 : 0.0; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); ml0 = r_major * mlfn(e0, e1, e2, e3, lat_origin); esp = es / (1.0 - es); if (es < .00001) ind = 1; /* Report parameters to the user -----------------------------*/ ptitle("UNIVERSAL TRANSVERSE MERCATOR (UTM)"); genrpt_long(zone, "Zone: "); radius2(r_major, r_minor); genrpt(scale_factor,"Scale Factor at C. Meridian: "); cenlonmer(lon_center); return(OK); } /* Universal Transverse Mercator forward equations--mapping lat,long to x,y Note: The algorithm for UTM is exactly the same as TM and therefore if a change is implemented, also make the change to TMFOR.c -----------------------------------------------------------------------*/ int utmfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double sin_phi, cos_phi;/* sin and cos value */ double al, als; /* temporary values */ double b; /* temporary values */ double c, t, tq; /* temporary values */ double con, n, ml; /* cone constant, small m */ /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); tsincos(lat, &sin_phi, &cos_phi); /* This part was in the fortran code and is for the spherical form ----------------------------------------------------------------*/ if (ind != 0) { b = cos_phi * sin(delta_lon); if ((fabs(fabs(b) - 1.0)) < .0000000001) { p_error("Point projects into infinity","utm-for"); return(93); } else { *x = .5 * r_major * scale_factor * log((1.0 + b)/(1.0 - b)); con = acos(cos_phi * cos(delta_lon)/sqrt(1.0 - b*b)); if (lat < 0) con = - con; *y = r_major * scale_factor * (con - lat_origin); return(OK); } } al = cos_phi * delta_lon; als = SQUARE(al); c = esp * SQUARE(cos_phi); tq = tan(lat); t = SQUARE(tq); con = 1.0 - es * SQUARE(sin_phi); n = r_major / sqrt(con); ml = r_major * mlfn(e0, e1, e2, e3, lat); *x = scale_factor * n * al * (1.0 + als / 6.0 * (1.0 - t + c + als / 20.0 * (5.0 - 18.0 * t + SQUARE(t) + 72.0 * c - 58.0 * esp))) + false_easting; *y = scale_factor * (ml - ml0 + n * tq * (als * (0.5 + als / 24.0 * (5.0 - t + 9.0 * c + 4.0 * SQUARE(c) + als / 30.0 * (61.0 - 58.0 * t + SQUARE(t) + 600.0 * c - 330.0 * esp))))) + false_northing; return(OK); } libgctp-1.0.orig/utminv.c0000644000000000000000000001371011236644451012321 0ustar /******************************************************************************* NAME UNIVERSAL TRANSVERSE MERCATOR PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Universal Transverse Mercator projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS Nov, 1991 T. Mittan Mar, 1993 S. Nelson Feb, 1995 Divided tminv.c into two files, one for UTM (utminv.c) and one for TM (tminv.c). This was a necessary change to run inverse projection conversions for both UTM and TM in the same process. ALGORITHM REFERENCES 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. *******************************************************************************/ #include #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double r_major; /* major axis */ static double r_minor; /* minor axis */ static double scale_factor; /* scale factor */ static double lon_center; /* Center longitude (projection center) */ static double lat_origin; /* center latitude */ static double e0,e1,e2,e3; /* eccentricity constants */ static double es,esp; /* eccentricity constants */ static double ml0; /* small value m */ static double false_northing; /* y offset in meters */ static double false_easting; /* x offset in meters */ static long ind; /* sphere flag value */ /* Initialize the Universal Transverse Mercator (UTM) projection -------------------------------------------------------------*/ int utminvint( double r_maj, /* major axis */ double r_min, /* minor axis */ double scale_fact, /* scale factor */ long zone) /* zone number */ { double temp; /* temprorary variables */ if ((labs(zone) < 1) || (labs(zone) > 60)) { p_error("Illegal zone number","utm-invint"); return(11); } r_major = r_maj; r_minor = r_min; scale_factor = scale_fact; lat_origin = 0.0; lon_center = ((6 * labs(zone)) - 183) * D2R; false_easting = 500000.0; false_northing = (zone < 0) ? 10000000.0 : 0.0; temp = r_minor / r_major; es = 1.0 - SQUARE(temp); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); e3 = e3fn(es); ml0 = r_major * mlfn(e0, e1, e2, e3, lat_origin); esp = es / (1.0 - es); if (es < .00001) ind = 1; else ind = 0; /* Report parameters to the user -----------------------------*/ ptitle("UNIVERSAL TRANSVERSE MERCATOR (UTM)"); genrpt_long(zone, "Zone: "); radius2(r_major, r_minor); genrpt(scale_factor,"Scale Factor at C. Meridian: "); cenlonmer(lon_center); return(OK); } /* Universal Transverse Mercator inverse equations--mapping x,y to lat,long Note: The algorithm for UTM is exactly the same as TM and therefore if a change is implemented, also make the change to TMINV.c -----------------------------------------------------------------------*/ int utminv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double con,phi; /* temporary angles */ double delta_phi; /* difference between longitudes */ long i; /* counter variable */ double sin_phi, cos_phi, tan_phi; /* sin cos and tangent values */ double c, cs, t, ts, n, r, d, ds; /* temporary variables */ double f, h, g, temp; /* temporary variables */ long max_iter = 6; /* maximun number of iterations */ /* fortran code for spherical form --------------------------------*/ if (ind != 0) { f = exp(x/(r_major * scale_factor)); g = .5 * (f - 1/f); temp = lat_origin + y/(r_major * scale_factor); h = cos(temp); con = sqrt((1.0 - h * h)/(1.0 + g * g)); *lat = asinz(con); if (temp < 0) *lat = -*lat; if ((g == 0) && (h == 0)) { *lon = lon_center; return(OK); } else { *lon = adjust_lon(atan2(g,h) + lon_center); return(OK); } } /* Inverse equations -----------------*/ x = x - false_easting; y = y - false_northing; con = (ml0 + y / scale_factor) / r_major; phi = con; for (i=0;;i++) { delta_phi=((con + e1 * sin(2.0*phi) - e2 * sin(4.0*phi) + e3 * sin(6.0*phi)) / e0) - phi; /* delta_phi = ((con + e1 * sin(2.0*phi) - e2 * sin(4.0*phi)) / e0) - phi; */ phi += delta_phi; if (fabs(delta_phi) <= EPSLN) break; if (i >= max_iter) { p_error("Latitude failed to converge","UTM-INVERSE"); return(95); } } if (fabs(phi) < HALF_PI) { tsincos(phi, &sin_phi, &cos_phi); tan_phi = tan(phi); c = esp * SQUARE(cos_phi); cs = SQUARE(c); t = SQUARE(tan_phi); ts = SQUARE(t); con = 1.0 - es * SQUARE(sin_phi); n = r_major / sqrt(con); r = n * (1.0 - es) / con; d = x / (n * scale_factor); ds = SQUARE(d); *lat = phi - (n * tan_phi * ds / r) * (0.5 - ds / 24.0 * (5.0 + 3.0 * t + 10.0 * c - 4.0 * cs - 9.0 * esp - ds / 30.0 * (61.0 + 90.0 * t + 298.0 * c + 45.0 * ts - 252.0 * esp - 3.0 * cs))); *lon = adjust_lon(lon_center + (d * (1.0 - ds / 6.0 * (1.0 + 2.0 * t + c - ds / 20.0 * (5.0 - 2.0 * c + 28.0 * t - 3.0 * cs + 8.0 * esp + 24.0 * ts))) / cos_phi)); } else { *lat = HALF_PI * sign(y); *lon = lon_center; } return(OK); } libgctp-1.0.orig/vandgfor.c0000644000000000000000000000735211236644451012612 0ustar /******************************************************************************* NAME VAN DER GRINTEN PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Van der Grinten projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Lambert Azimuthal Equal Area projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Van Der Grinten projection ----------------------------------------*/ int vandgforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("VAN DER GRINTEN"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Van Der Grinten forward equations--mapping lat,long to x,y ---------------------------------------------------------*/ int vandgfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double dlon; double theta; double al,asq; double g,gsq; double m,msq; double con; double costh,sinth; /* Forward equations -----------------*/ dlon = adjust_lon(lon - lon_center); if (fabs(lat) <= EPSLN) { *x = false_easting + R * dlon; *y = false_northing; return (OK); } theta = asinz(2.0 * fabs(lat / PI)); if ((fabs(dlon) <= EPSLN) || (fabs(fabs(lat) - HALF_PI) <= EPSLN)) { *x = false_easting; if (lat >= 0) *y = false_northing + PI * R * tan(.5 * theta); else *y = false_northing + PI * R * -tan(.5 * theta); return(OK); } al = .5 * fabs((PI / dlon) - (dlon / PI)); asq = al * al; tsincos(theta,&sinth,&costh); g = costh / (sinth + costh - 1.0); gsq = g * g; m = g * (2.0 / sinth - 1.0); msq = m * m; con = PI * R * (al * (g - msq) + sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq); if (dlon < 0) con = -con; *x = false_easting + con; con = fabs(con / (PI * R)); if (lat >= 0) *y = false_northing + PI * R * sqrt(1.0 - con * con - 2.0 * al * con); else *y = false_northing - PI * R * sqrt(1.0 - con * con - 2.0 * al * con); return(OK); } libgctp-1.0.orig/vandginv.c0000644000000000000000000000711211236644451012612 0ustar /******************************************************************************* NAME VAN DER GRINTEN PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Van der Grinten projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- T. Mittan March, 1993 This function was adapted from the Van Der Grinten projection code (FORTRAN) in the General Cartographic Transformation Package software which is available from the U.S. Geological Survey National Mapping Division. ALGORITHM REFERENCES 1. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. 2. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United State Government Printing Office, Washington D.C., 1987. 3. "Software Documentation for GCTP General Cartographic Transformation Package", U.S. Geological Survey National Mapping Division, May 1982. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset in meters */ static double false_northing; /* y offset in meters */ /* Initialize the Van Der Grinten projection ----------------------------------------*/ int vandginvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset in meters */ double false_north) /* y offset in meters */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("VAN DER GRINTEN"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Van Der Grinten inverse equations--mapping x,y to lat/long ---------------------------------------------------------*/ int vandginv( double x, /* (O) X projection coordinate */ double y, /* (O) Y projection coordinate */ double *lon, /* (I) Longitude */ double *lat) /* (I) Latitude */ { double xx,yy,xys,c1,c2,c3; double a1; double m1; double con; double th1; double d; /* inverse equations -----------------*/ x -= false_easting; y -= false_northing; con = PI * R; xx = x / con; yy = y / con; xys = xx * xx + yy * yy; c1 = -fabs(yy) * (1.0 + xys); c2 = c1 - 2.0 * yy * yy + xx * xx; c3 = -2.0 * c1 + 1.0 + 2.0 * yy * yy + xys * xys; d = yy * yy / c3 + (2.0 * c2 * c2 * c2 / c3 / c3 / c3 - 9.0 * c1 * c2 / c3 /c3) / 27.0; a1 = (c1 - c2 * c2 / 3.0 / c3) / c3; m1 = 2.0 * sqrt( -a1 / 3.0); con = ((3.0 * d) / a1) / m1; if (fabs(con) > 1.0) { if (con >= 0.0) con = 1.0; else con = -1.0; } th1 = acos(con) / 3.0; if (y >= 0) *lat = (-m1 * cos(th1 + PI / 3.0) - c2 / 3.0 / c3) * PI; else *lat = -(-m1 * cos(th1 + PI / 3.0) - c2 / 3.0 / c3) * PI; if (fabs(xx) < EPSLN) { *lon = lon_center; return(OK); } *lon = adjust_lon(lon_center + PI * (xys - 1.0 + sqrt(1.0 + 2.0 * (xx * xx - yy * yy) + xys * xys)) / 2.0 / xx); return(OK); } libgctp-1.0.orig/wivfor.c0000644000000000000000000000564111236644451012317 0ustar /******************************************************************************* NAME WAGNER IV PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Wagner IV projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE REASON ---------- ---- ------ D. Steinwand, EROS May, 1991 S. Nelson, EROS Feb, 1995 Changed perror to p_error. This function was implemented with formulas supplied by John P. Snyder. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., Personal correspondence, January 1991. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset */ static double false_northing; /* y offset */ /* Initialize the Wagner IV projection ------------------------------------*/ int wivforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset */ double false_north) /* y offset */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("WAGNER IV"); radius(r); cenlon(center_long); offsetp(false_east,false_north); return(OK); } /* Wagner IV forward equations--mapping lat,long to x,y ----------------------------------------------------*/ int wivfor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double theta; double delta_theta; double con; long i; /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); theta = lat; con = 2.9604205062 * sin(lat); /* Iterate using the Newton-Raphson method to find theta -----------------------------------------------------*/ for (i=0;;i++) { delta_theta = -(theta + sin(theta) - con) / (1.0 + cos(theta)); theta += delta_theta; if (fabs(delta_theta) < EPSLN) break; if (i >= 30) p_error("Iteration failed to converge","wagneriv-forward"); } theta /= 2.0; *x = 0.86310 * R * delta_lon * cos(theta) + false_easting; *y = 1.56548 * R * sin(theta) + false_northing; return(OK); } libgctp-1.0.orig/wivinv.c0000644000000000000000000000461411236644451012324 0ustar /******************************************************************************* NAME WAGNER IV PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Wagner IV projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991 This function was implemented with formulas supplied by John P. Snyder. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., Personal correspondence, January 1991. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset */ static double false_northing; /* y offset */ /* Initialize the Wagner IV projection ------------------------------------*/ int wivinvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset */ double false_north) /* y offset */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("WAGNER IV"); radius(r); cenlon(center_long); offsetp(false_east,false_north); return(OK); } /* Wagner IV inverse equations--mapping x,y to lat,long ----------------------------------------------------*/ int wivinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double theta; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; theta = asin(y / (1.56548 * R)); *lon = adjust_lon(lon_center + (x / (0.86310 * R * cos(theta)))); *lat = asin((2.0 * theta + sin(2.0 * theta)) / 2.9604205062); return(OK); } libgctp-1.0.orig/wviifor.c0000644000000000000000000000512311236644451012463 0ustar /******************************************************************************* NAME WAGNER VII PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Wagner VII projection. The longitude and latitude must be in radians. The Easting and Northing values will be returned in meters. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991 This function was implemented with formulas supplied by John P. Snyder. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., Personal correspondence, January 1991. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset */ static double false_northing; /* y offset */ /* Initialize the Wagner VII projection ------------------------------------*/ int wviiforint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset */ double false_north) /* y offset */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("WAGNER VII"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Wagner VII forward equations--mapping lat,long to x,y -----------------------------------------------------*/ int wviifor( double lon, /* (I) Longitude */ double lat, /* (I) Latitude */ double *x, /* (O) X projection coordinate */ double *y) /* (O) Y projection coordinate */ { double delta_lon; /* Delta longitude (Given longitude - center */ double sin_lon, cos_lon; double s, c0, c1; /* Forward equations -----------------*/ delta_lon = adjust_lon(lon - lon_center); tsincos((delta_lon/3.0), &sin_lon, &cos_lon); s = 0.90631 * sin(lat); c0 = sqrt(1-s*s); c1 = sqrt(2.0 / (1.0 + c0 * cos_lon)); *x = 2.66723 * R * c0 * c1 * sin_lon + false_easting; *y = 1.24104 * R * s * c1 + false_northing; return(OK); } libgctp-1.0.orig/wviiinv.c0000644000000000000000000000536411236644451012500 0ustar /******************************************************************************* NAME WAGNER VII PURPOSE: Transforms input Easting and Northing to longitude and latitude for the Wagner VII projection. The Easting and Northing must be in meters. The longitude and latitude values will be returned in radians. PROGRAMMER DATE ---------- ---- D. Steinwand, EROS May, 1991 S. Nelson, EROS Dec, 1993 Added function call to "asinz" to fix errors at 90 and -90 deg lat. This replaced calls to "asin". This function was implemented with formulas supplied by John P. Snyder. ALGORITHM REFERENCES 1. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", U.S. Geological Survey Professional Paper 1453 , United State Government Printing Office, Washington D.C., 1989. 2. Snyder, John P., Personal correspondence, January 1991. *******************************************************************************/ #include #include "cproj.h" /* Variables common to all subroutines in this code file -----------------------------------------------------*/ static double lon_center; /* Center longitude (projection center) */ static double R; /* Radius of the earth (sphere) */ static double false_easting; /* x offset */ static double false_northing; /* y offset */ /* Initialize the Wagner VII projection ------------------------------------*/ int wviiinvint( double r, /* (I) Radius of the earth (sphere) */ double center_long, /* (I) Center longitude */ double false_east, /* x offset */ double false_north) /* y offset */ { /* Place parameters in static storage for common use -------------------------------------------------*/ R = r; lon_center = center_long; false_easting = false_east; false_northing = false_north; /* Report parameters to the user -----------------------------*/ ptitle("WAGNER VII"); radius(r); cenlon(center_long); offsetp(false_easting,false_northing); return(OK); } /* Wagner VII inverse equations--mapping x,y to lat,long -----------------------------------------------------*/ int wviiinv( double x, /* (I) X projection coordinate */ double y, /* (I) Y projection coordinate */ double *lon, /* (O) Longitude */ double *lat) /* (O) Latitude */ { double t1, t2, p, c; /* Inverse equations -----------------*/ x -= false_easting; y -= false_northing; t1 = x / 2.66723; t2 = y / 1.24104; t1 *= t1; t2 *= t2; p = sqrt(t1 + t2); c = 2.0 * asinz(p / (2.0 * R)); *lat = asinz(y * sin(c) / (1.24104 * 0.90631 * p)); *lon = adjust_lon(lon_center + 3.0 * atan2(x * tan(c), 2.66723 * p)); return(OK); }