summaryrefslogtreecommitdiffstats
path: root/misc/gctpc/files
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-05-31 12:45:33 +0000
committersobomax <sobomax@FreeBSD.org>2001-05-31 12:45:33 +0000
commitf1fd8a9dbf1b664c1e41b88fe298880b2085ae6d (patch)
tree8ae06c04ab6581a653370bc272b72118db45f83b /misc/gctpc/files
parent806d4e0ee2efa63c42bedb0b28474afb97ee2efb (diff)
downloadFreeBSD-ports-f1fd8a9dbf1b664c1e41b88fe298880b2085ae6d.zip
FreeBSD-ports-f1fd8a9dbf1b664c1e41b88fe298880b2085ae6d.tar.gz
Add gctpc 1.3, an USGS General Cartographic Transformation Package
(GCTP). PR: 26927 Submitted by: Randall Hopper <aa8vb@nc.rr.com>
Diffstat (limited to 'misc/gctpc/files')
-rw-r--r--misc/gctpc/files/for_init.h9
-rw-r--r--misc/gctpc/files/gctp.h7
-rw-r--r--misc/gctpc/files/gctpc.h440
-rw-r--r--misc/gctpc/files/inv_init.h8
-rw-r--r--misc/gctpc/files/patch-aa35
-rw-r--r--misc/gctpc/files/patch-ab42
-rw-r--r--misc/gctpc/files/patch-ac8
-rw-r--r--misc/gctpc/files/patch-ad10
-rw-r--r--misc/gctpc/files/report.h55
-rw-r--r--misc/gctpc/files/sphdz.h7
-rw-r--r--misc/gctpc/files/untfz.h7
11 files changed, 628 insertions, 0 deletions
diff --git a/misc/gctpc/files/for_init.h b/misc/gctpc/files/for_init.h
new file mode 100644
index 0000000..38f0241
--- /dev/null
+++ b/misc/gctpc/files/for_init.h
@@ -0,0 +1,9 @@
+#ifndef INCLUDED_FOR_INIT_H
+#define INCLUDED_FOR_INIT_H
+
+void
+for_init(long int outsys, long int outzone, double *outparm,
+ long int outdatum, char *fn27, char *fn83, long int *iflg,
+ ForwardTransFunc for_trans[]);
+
+#endif /* INCLUDED_FOR_INIT_H */
diff --git a/misc/gctpc/files/gctp.h b/misc/gctpc/files/gctp.h
new file mode 100644
index 0000000..7d33ed2
--- /dev/null
+++ b/misc/gctpc/files/gctp.h
@@ -0,0 +1,7 @@
+#ifndef INCLUDED_GCTP_H
+#define INCLUDED_GCTP_H
+
+typedef long (*ForwardTransFunc)(double, double, double*, double*);
+typedef long (*InverseTransFunc)(double, double, double*, double*);
+
+#endif /* INCLUDED_GCTP_H */
diff --git a/misc/gctpc/files/gctpc.h b/misc/gctpc/files/gctpc.h
new file mode 100644
index 0000000..3f71440
--- /dev/null
+++ b/misc/gctpc/files/gctpc.h
@@ -0,0 +1,440 @@
+#ifndef GCTPC_H
+#define GCTPC_H
+
+#include "proj.h"
+
+/* This didn't come with the original gctpc distribution.
+ But it *should* have. -- jamie 2/14/95 */
+
+void gctp(double* incoor,
+ long* insys,
+ long* inzone,
+ double* inparm,
+ long* inunit,
+ long* indatum,
+ long* ipr,
+ char* efile,
+ long* jpr,
+ char* pfile,
+ double* outcoor,
+ long* outsys,
+ long* outzone,
+ double* outparm,
+ long* outunit,
+ long* outdatum,
+ char* fn27,
+ char* fn83,
+ long* iflg);
+
+long
+alberforint(double r_maj, double r_min, double lat1, double lat2, double lon0,
+ double lat0, double false_east, double false_north);
+
+long
+alberfor(double lon, double lat, double *x, double *y);
+
+long
+alberinvint(double r_maj, double r_min, double lat1, double lat2, double lon0,
+ double lat0, double false_east, double false_north);
+
+long
+alberinvint(double r_maj, double r_min, double lat1, double lat2, double lon0,
+ double lat0, double false_east, double false_north);
+
+long
+alberinvint(double r_maj, double r_min, double lat1, double lat2, double lon0,
+ double lat0, double false_east, double false_north);
+
+long
+alberinv(double x, double y, double *lon, double *lat);
+
+long
+alconforint(double r_maj, double r_min, double false_east, double false_north);
+
+long
+alconfor(double lon, double lat, double *x, double *y);
+
+long
+alconinvint(double r_maj, double r_min, double false_east, double false_north);
+
+long
+alconinv(double x, double y, double *lon, double *lat);
+
+long
+azimforint(double r_maj, double center_lon, double center_lat, double false_east,
+ double false_north);
+
+long
+azimfor(double lon, double lat, double *x, double *y);
+
+long
+aziminvint(double r_maj, double center_lon, double center_lat, double false_east,
+ double false_north);
+
+long
+aziminv(double x, double y, double *lon, double *lat);
+
+long
+eqconforint(double r_maj, double r_min, double lat1, double lat2,
+ double center_lon, double center_lat, double false_east,
+ double false_north, long int mode);
+
+long
+eqconfor(double lon, double lat, double *x, double *y);
+
+long
+eqconinvint(double r_maj, double r_min, double lat1, double lat2,
+ double center_lon, double center_lat, double false_east,
+ double false_north, long int mode);
+
+long
+eqconinv(double x, double y, double *lon, double *lat);
+
+long
+equiforint(double r_maj, double center_lon, double lat1, double false_east,
+ double false_north);
+
+long
+equifor(double lon, double lat, double *x, double *y);
+
+long
+equiinvint(double r_maj, double center_lon, double lat1,
+ double false_east, double false_north);
+
+long
+equiinv(double x, double y, double *lon, double *lat);
+
+long
+gnomforint(double r, double center_long, double center_lat,
+ double false_east, double false_north);
+
+long
+gnomfor(double lon, double lat, double *x, double *y);
+
+long
+gnominvint(double r, double center_long, double center_lat, double false_east,
+ double false_north);
+
+long
+gnominv(double x, double y, double *lon, double *lat);
+
+long
+goodforint(double r);
+
+long
+goodfor(double lon, double lat, double *x, double *y);
+
+long
+goodinvint(double r);
+
+long
+goodinv(double x, double y, double *lon, double *lat);
+
+long
+gvnspforint(double r, double h, double center_long, double center_lat,
+ double false_east, double false_north);
+
+long
+gvnspfor(double lon, double lat, double *x, double *y);
+
+long
+gvnspinvint(double r, double h, double center_long, double center_lat,
+ double false_east, double false_north);
+
+long
+gvnspinv(double x, double y, double *lon, double *lat);
+
+long
+hamforint(double r, double center_long, double false_east, double false_north);
+
+long
+hamfor(double lon, double lat, double *x, double *y);
+
+long
+haminvint(double r, double center_long, double false_east, double false_north);
+
+long
+haminv(double x, double y, double *lon, double *lat);
+
+long
+imolwforint(double r);
+
+long
+imolwfor(double lon, double lat, double *x, double *y);
+
+long
+imolwinvint(double r);
+
+long
+imolwinv(double x, double y, double *lon, double *lat);
+
+long
+lamazforint(double r, double center_long, double center_lat, double false_east,
+ double false_north);
+
+long
+lamazfor(double lon, double lat, double *x, double *y);
+
+long
+lamazinvint(double r, double center_long, double center_lat, double false_east,
+ double false_north);
+
+long
+lamazinv(double x, double y, double *lon, double *lat);
+
+long
+lamccforint(double r_maj, double r_min, double lat1, double lat2, double c_lon,
+ double c_lat, double false_east, double false_north);
+
+long
+lamccfor(double lon, double lat, double *x, double *y);
+
+long
+lamccinvint(double r_maj, double r_min, double lat1, double lat2, double c_lon,
+ double c_lat, double false_east, double false_north);
+
+long
+lamccinv(double x, double y, double *lon, double *lat);
+
+long
+merforint(double r_maj, double r_min, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+merfor(double lon, double lat, double *x, double *y);
+
+long
+merinvint(double r_maj, double r_min, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+merinv(double x, double y, double *lon, double *lat);
+
+long
+millforint(double r, double center_long, double false_east, double false_north);
+
+long
+millfor(double lon, double lat, double *x, double *y);
+
+long
+millinvint(double r, double center_long, double false_east, double false_north);
+
+long
+millinv(double x, double y, double *lon, double *lat);
+
+long
+molwforint(double r, double center_long, double false_east, double false_north);
+
+long
+molwfor(double lon, double lat, double *x, double *y);
+
+long
+molwinvint(double r, double center_long, double false_east, double false_north);
+
+long
+molwinv(double x, double y, double *lon, double *lat);
+
+long
+obleqforint(double r, double center_long, double center_lat, double shape_m,
+ double shape_n, double angle, double false_east, double false_north);
+
+long
+obleqfor(double lon, double lat, double *x, double *y);
+
+long
+obleqinvint(double r, double center_long, double center_lat, double shape_m,
+ double shape_n, double angle, double false_east, double false_north);
+
+long
+obleqinv(double x, double y, double *lon, double *lat);
+
+long
+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 int mode);
+
+long
+omerfor(double lon, double lat, double *x, double *y);
+
+long
+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 int mode);
+
+long
+omerinv(double x, double y, double *lon, double *lat);
+
+long
+orthforint(double r_maj, double center_lon, double center_lat, double false_east,
+ double false_north);
+
+long
+orthfor(double lon, double lat, double *x, double *y);
+
+long
+orthinvint(double r_maj, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+orthinv(double x, double y, double *lon, double *lat);
+
+long
+polyforint(double r_maj, double r_min, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+polyfor(double lon, double lat, double *x, double *y);
+
+long
+polyinvint(double r_maj, double r_min, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+polyinv(double x, double y, double *lon, double *lat);
+
+long
+psforint(double r_maj, double r_min, double c_lon, double c_lat,
+ double false_east, double false_north);
+
+long
+psfor(double lon, double lat, double *x, double *y);
+
+long
+psinvint(double r_maj, double r_min, double c_lon, double c_lat, double false_east,
+ double false_north);
+
+long
+psinv(double x, double y, double *lon, double *lat);
+
+long
+robforint(double r, double center_long, double false_east, double false_north);
+
+long
+robfor(double lon, double lat, double *x, double *y);
+
+long
+robinvint(double r, double center_long, double false_east, double false_north);
+
+long
+robinv(double x, double y, double *lon, double *lat);
+
+long
+sinforint(double r, double center_long, double false_east, double false_north);
+
+long
+sinfor(double lon, double lat, double *x, double *y);
+
+long
+sininvint(double r, double center_long, double false_east, double false_north);
+
+long
+sininv(double x, double y, double *lon, double *lat);
+
+long
+somforint(double r_major, double r_minor, long int satnum, long int path,
+ double alf_in, double lon, double false_east, double false_north,
+ double time, long int start1, long int flag);
+
+long
+somfor(double lon, double lat, double *y, double *x);
+
+long
+sominvint(double r_major, double r_minor, long int satnum, long int path,
+ double alf_in, double lon, double false_east, double false_north,
+ double time, long int start1, long int flag);
+
+long
+sominv(double y, double x, double *lon, double *lat);
+
+long
+sterforint(double r_maj, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+sterfor(double lon, double lat, double *x, double *y);
+
+long
+sterinvint(double r_maj, double center_lon, double center_lat,
+ double false_east, double false_north);
+
+long
+sterinv(double x, double y, double *lon, double *lat);
+
+long
+stplnforint(long int zone, long int sphere, char *fn27, char *fn83);
+
+long
+stplnfor(double lon, double lat, double *x, double *y);
+
+long
+stplninvint(long int zone, long int sphere, char *fn27, char *fn83);
+
+long
+stplninv(double x, double y, double *lon, double *lat);
+
+long
+utmforint(double r_maj, double r_min, double scale_fact, long int zone);
+
+long
+utmfor(double lon, double lat, double *x, double *y);
+
+long
+tmforint(double r_maj, double r_min, double scale_fact, double center_lon,
+ double center_lat, double false_east, double false_north);
+
+long
+tmfor(double lon, double lat, double *x, double *y);
+
+long
+utminvint(double r_maj, double r_min, double scale_fact, long int zone);
+
+long
+utminv(double x, double y, double *lon, double *lat);
+
+long
+tminvint(double r_maj, double r_min, double scale_fact, double center_lon,
+ double center_lat, double false_east, double false_north);
+
+long
+tminv(double x, double y, double *lon, double *lat);
+
+long
+vandgforint(double r, double center_long, double false_east, double false_north);
+
+long
+vandgfor(double lon, double lat, double *x, double *y);
+
+long
+vandginvint(double r, double center_long, double false_east, double false_north);
+
+long
+vandginv(double x, double y, double *lon, double *lat);
+
+long
+wivforint(double r, double center_long, double false_east, double false_north);
+
+long
+wivfor(double lon, double lat, double *x, double *y);
+
+long
+wivinvint(double r, double center_long, double false_east, double false_north);
+
+long
+wivinv(double x, double y, double *lon, double *lat);
+
+long
+wviiforint(double r, double center_long, double false_east, double false_north);
+
+long
+wviifor(double lon, double lat, double *x, double *y);
+
+long
+wviiinvint(double r, double center_long, double false_east, double false_north);
+
+long
+wviiinv(double x, double y, double *lon, double *lat);
+
+
+#endif /* GCTPC_H */
diff --git a/misc/gctpc/files/inv_init.h b/misc/gctpc/files/inv_init.h
new file mode 100644
index 0000000..aef42bf
--- /dev/null
+++ b/misc/gctpc/files/inv_init.h
@@ -0,0 +1,8 @@
+#ifndef INCLUDED_INV_INIT_H
+#define INCLUDED_INV_INIT_H
+
+void
+inv_init(long int insys, long int inzone, double *inparm, long int indatum,
+ char *fn27, char *fn83, long int *iflg, InverseTransFunc inv_trans[]);
+
+#endif /* INCLUDED_INV_INIT_H */
diff --git a/misc/gctpc/files/patch-aa b/misc/gctpc/files/patch-aa
new file mode 100644
index 0000000..978ef06
--- /dev/null
+++ b/misc/gctpc/files/patch-aa
@@ -0,0 +1,35 @@
+
+$FreeBSD$
+
+--- Makefile.orig Fri Feb 24 17:05:37 1995
++++ Makefile Thu May 31 15:33:40 2001
+@@ -1,10 +1,12 @@
+
+ INCDIR =
+-ARCHIVE = geolib.a
++SHLIB = libgctpc.so.1
++ARCHIVE = libgctpc.a
+ LIBDIR =
+ SRCDIR = .
+ INCS = cproj.h proj.h
+-CC = cc
++CC ?= cc
++CFLAGS += -fPIC -DPIC
+
+ OBJECTS= \
+ $(ARCHIVE)(alberfor.o) $(ARCHIVE)(alberinv.o) \
+@@ -56,8 +58,13 @@
+ cproj.c report.c lamccfor.c lamccinv.c paksz.c untfz.c sphdz.c \
+ br_gctp.c Makefile cproj.h proj.h
+
++$(SHLIB): $(ARCHIVE)
++ mkdir objs
++ cd objs && ar x ../$(ARCHIVE) && $(CC) -shared -o ../$(SHLIB) *.o
++ rm -rf objs
++
+ $(ARCHIVE): $(OBJECTS)
+- ranlib geolib.a
++ ranlib libgctpc.a
+
+
+ $(ARCHIVE)(gctp.o): $(INCS)
diff --git a/misc/gctpc/files/patch-ab b/misc/gctpc/files/patch-ab
new file mode 100644
index 0000000..8bb0c3e
--- /dev/null
+++ b/misc/gctpc/files/patch-ab
@@ -0,0 +1,42 @@
+--- ../work/gctpc/source/cproj.h Fri Nov 19 14:32:06 1993
++++ cproj.h Sun Feb 11 12:32:19 2001
+@@ -1,3 +1,6 @@
++#ifndef INCLUDED_CPROJ_H
++#define INCLUDED_CPROJ_H
++
+ #include <math.h>
+
+ #define PI 3.141592653589793238
+@@ -26,3 +29,32 @@
+
+ #define IMOD(A, B) (A) - (((A) / (B)) * (B)) /* Integer mod function */
+
++/* Not part of the original gctpc distribution. */
++
++#ifdef NEED_SINCOS
++void
++sincos(double val, double *sin_val, double *cos_val);
++#endif
++
++double asinz (double con);
++double msfnz (double eccent, double sinphi, double cosphi);
++double qsfnz (double eccent, double sinphi, double cosphi);
++double phi1z (double eccent, double qs, long int *flag);
++double phi2z(double eccent, double ts, long int *flag);
++double phi3z(double ml, double e0, double e1, double e2, double e3, long int *flag);
++double phi4z (double eccent, double e0, double e1, double e2, double e3,
++ double a, double b, double *c, double *phi);
++double pakcz(double pak);
++double pakr2dm(double pak);
++double tsfnz(double eccent, double phi, double sinphi);
++int sign(double x);
++double adjust_lon(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);
++long calc_utm_zone(double lon);
++
++#endif // INCLUDED_CPROJ_H
diff --git a/misc/gctpc/files/patch-ac b/misc/gctpc/files/patch-ac
new file mode 100644
index 0000000..fcd2c56
--- /dev/null
+++ b/misc/gctpc/files/patch-ac
@@ -0,0 +1,8 @@
+--- ORIG/cproj.c Mon Nov 22 16:39:46 1993
++++ cproj.c Thu Apr 26 18:40:10 2001
+@@ -408,4 +408,4 @@
+
+ /* Function to calculate UTM zone number--NOTE Longitude entered in DEGREES!!!
+ ---------------------------------------------------------------------------*/
+-calc_utm_zone(lon) double lon; { return((long)(((lon + 180.0) / 6.0) + 1.0)); }
++long calc_utm_zone(lon) double lon; { return((long)(((lon + 180.0) / 6.0) + 1.0)); }
diff --git a/misc/gctpc/files/patch-ad b/misc/gctpc/files/patch-ad
new file mode 100644
index 0000000..1d76fa5
--- /dev/null
+++ b/misc/gctpc/files/patch-ad
@@ -0,0 +1,10 @@
+--- ORIG/gctp.c Fri Feb 24 16:06:16 1995
++++ gctp.c Thu Apr 26 18:42:52 2001
+@@ -95,7 +95,6 @@
+ double lon; /* longitude */
+ double lat; /* latitude */
+ double temp; /* dummy variable */
+-double sign();
+ double pakr2dm();
+ long i,j; /* loop counters */
+ long ininit_flag; /* input initilization flag */
diff --git a/misc/gctpc/files/report.h b/misc/gctpc/files/report.h
new file mode 100644
index 0000000..cb3fa8c
--- /dev/null
+++ b/misc/gctpc/files/report.h
@@ -0,0 +1,55 @@
+#ifndef INCLUDED_REPORT_H
+#define INCLUDED_REPORT_H
+
+// Functions declartions for report.cc.
+// Was not provided in the original gctpc distribution.
+
+int
+init(long int ipr, long int jpr, char *efile, char *pfile);
+
+void
+close_file(void);
+
+void
+ptitle(char *A);
+
+void
+radius(double A);
+
+void
+radius2(double A, double B);
+
+void
+cenlon(double A);
+
+void
+cenlonmer(double A);
+
+void
+cenlat(double A);
+
+void
+origin(double A);
+
+void
+stanparl(double A, double B);
+
+void
+stparl1(double A);
+
+void
+offsetp(double A, double B);
+
+void
+genrpt(double A, char *S);
+
+void
+genrpt_long(long int A, char *S);
+
+void
+pblank(void);
+
+void
+p_error(char *what, char *where);
+
+#endif // INCLUDED_REPORT_H
diff --git a/misc/gctpc/files/sphdz.h b/misc/gctpc/files/sphdz.h
new file mode 100644
index 0000000..76efa2c
--- /dev/null
+++ b/misc/gctpc/files/sphdz.h
@@ -0,0 +1,7 @@
+#ifndef INCLUDED_SPHDZ_H
+#define INCLUDED_SPHDZ_H
+
+int
+sphdz(long int isph, double *parm, double *r_major, double *r_minor, double *radius);
+
+#endif /* INCLUDED_SPHDZ_H */
diff --git a/misc/gctpc/files/untfz.h b/misc/gctpc/files/untfz.h
new file mode 100644
index 0000000..e8acf31
--- /dev/null
+++ b/misc/gctpc/files/untfz.h
@@ -0,0 +1,7 @@
+#ifndef INCLUDED_UNTFZ_H
+#define INCLUDED_UNTFZ_H
+
+long
+untfz(long int inunit, long int outunit, double *factor);
+
+#endif /* INCLUDED_UNTFZ_H */
OpenPOWER on IntegriCloud