Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nsper.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nsper.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nsper.c	(revision 256)
@@ -0,0 +1,152 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_nsper.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	height; \
+	double	sinph0; \
+	double	cosph0; \
+	double	p; \
+	double	rp; \
+	double	pn1; \
+	double	pfact; \
+	double	h; \
+	double	cg; \
+	double	sg; \
+	double	sw; \
+	double	cw; \
+	int		mode; \
+	int		tilt;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(nsper, "Near-sided perspective") "\n\tAzi, Sph\n\th=";
+PROJ_HEAD(tpers, "Tilted perspective") "\n\tAzi, Sph\n\ttilt= azi= h=";
+# define EPS10 1.e-10
+# define N_POLE	0
+# define S_POLE 1
+# define EQUIT	2
+# define OBLIQ	3
+FORWARD(s_forward); /* spheroid */
+	double  coslam, cosphi, sinphi;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	switch (P->mode) {
+	case OBLIQ:
+		xy.y = P->sinph0 * sinphi + P->cosph0 * cosphi * coslam;
+		break;
+	case EQUIT:
+		xy.y = cosphi * coslam;
+		break;
+	case S_POLE:
+		xy.y = - sinphi;
+		break;
+	case N_POLE:
+		xy.y = sinphi;
+		break;
+	}
+	if (xy.y < P->rp) F_ERROR;
+	xy.y = P->pn1 / (P->p - xy.y);
+	xy.x = xy.y * cosphi * sin(lp.lam);
+	switch (P->mode) {
+	case OBLIQ:
+		xy.y *= (P->cosph0 * sinphi -
+		   P->sinph0 * cosphi * coslam);
+		break;
+	case EQUIT:
+		xy.y *= sinphi;
+		break;
+	case N_POLE:
+		coslam = - coslam;
+	case S_POLE:
+		xy.y *= cosphi * coslam;
+		break;
+	}
+	if (P->tilt) {
+		double yt, ba;
+
+		yt = xy.y * P->cg + xy.x * P->sg;
+		ba = 1. / (yt * P->sw * P->h + P->cw);
+		xy.x = (xy.x * P->cg - xy.y * P->sg) * P->cw * ba;
+		xy.y = yt * ba;
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double  rh, cosz, sinz;
+
+	if (P->tilt) {
+		double bm, bq, yt;
+
+		yt = 1./(P->pn1 - xy.y * P->sw);
+		bm = P->pn1 * xy.x * yt;
+		bq = P->pn1 * xy.y * P->cw * yt;
+		xy.x = bm * P->cg + bq * P->sg;
+		xy.y = bq * P->cg - bm * P->sg;
+	}
+	rh = hypot(xy.x, xy.y);
+	if ((sinz = 1. - rh * rh * P->pfact) < 0.) I_ERROR;
+	sinz = (P->p - sqrt(sinz)) / (P->pn1 / rh + rh / P->pn1);
+	cosz = sqrt(1. - sinz * sinz);
+	if (fabs(rh) <= EPS10) {
+		lp.lam = 0.;
+		lp.phi = P->phi0;
+	} else {
+		switch (P->mode) {
+		case OBLIQ:
+			lp.phi = asin(cosz * P->sinph0 + xy.y * sinz * P->cosph0 / rh);
+			xy.y = (cosz - P->sinph0 * sin(lp.phi)) * rh;
+			xy.x *= sinz * P->cosph0;
+			break;
+		case EQUIT:
+			lp.phi = asin(xy.y * sinz / rh);
+			xy.y = cosz * rh;
+			xy.x *= sinz;
+			break;
+		case N_POLE:
+			lp.phi = asin(cosz);
+			xy.y = -xy.y;
+			break;
+		case S_POLE:
+			lp.phi = - asin(cosz);
+			break;
+		}
+		lp.lam = atan2(xy.x, xy.y);
+	}
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	if ((P->height = pj_param(P->params, "dh").f) <= 0.) E_ERROR(-30);
+	if (fabs(fabs(P->phi0) - HALFPI) < EPS10)
+		P->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+	else if (fabs(P->phi0) < EPS10)
+		P->mode = EQUIT;
+	else {
+		P->mode = OBLIQ;
+		P->sinph0 = sin(P->phi0);
+		P->cosph0 = cos(P->phi0);
+	}
+	P->pn1 = P->height / P->a; /* normalize by radius */
+	P->p = 1. + P->pn1;
+	P->rp = 1. / P->p;
+	P->h = 1. / P->pn1;
+	P->pfact = (P->p + 1.) * P->h;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+	return P;
+}
+ENTRY0(nsper)
+	P->tilt = 0;
+ENDENTRY(setup(P))
+ENTRY0(tpers)
+	double omega, gamma;
+
+	omega = pj_param(P->params, "dtilt").f * DEG_TO_RAD;
+	gamma = pj_param(P->params, "dazi").f * DEG_TO_RAD;
+	P->tilt = 1;
+	P->cg = cos(gamma); P->sg = sin(gamma);
+	P->cw = cos(omega); P->sw = sin(omega);
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_urm5.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_urm5.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_urm5.c	(revision 256)
@@ -0,0 +1,31 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_urm5.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double m, rmn, q3, n;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph.\n\tn= q= alphi=";
+FORWARD(s_forward); /* spheroid */
+	double t;
+
+	t = lp.phi = aasin(P->n * sin(lp.phi));
+	xy.x = P->m * lp.lam * cos(lp.phi);
+	t *= t;
+	xy.y = lp.phi * (1. + t * P->q3) * P->rmn;
+	return xy;
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(urm5)
+	double alpha, t;
+
+	P->n = pj_param(P->params, "dn").f;
+	P->q3 = pj_param(P->params, "dq").f / 3.;
+	alpha = pj_param(P->params, "ralpha").f;
+	t = P->n * sin(alpha);
+	P->m = cos(alpha) / sqrt(1. - t * t);
+	P->rmn = 1. / (P->m * P->n);
+	P->es = 0.;
+	P->inv = 0;
+	P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gins8.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gins8.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gins8.c	(revision 256)
@@ -0,0 +1,20 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_gins8.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)") "\n\tPCyl, Sph., no inv.";
+#define	Cl 0.000952426
+#define	Cp 0.162388
+#define	C12 0.08333333333333333
+FORWARD(s_forward); /* spheroid */
+	double t = lp.phi * lp.phi;
+
+	xy.y = lp.phi * (1. + t * C12);
+	xy.x = lp.lam * (1. - Cp * t);
+	t = lp.lam * lp.lam;
+	xy.x *= (0.87 - Cl * t * t);
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(gins8) P->es = 0.; P->inv = 0; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_mlfn.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_mlfn.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_mlfn.c	(revision 256)
@@ -0,0 +1,60 @@
+#ifndef lint
+static const char SCCSID[]="@(#)pj_mlfn.c	4.5	95/07/06	GIE	REL";
+#endif
+#include <projects.h>
+/* meridinal distance for ellipsoid and inverse
+**	8th degree - accurate to < 1e-5 meters when used in conjuction
+**		with typical major axis values.
+**	Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.
+*/
+#define C00 1.
+#define C02 .25
+#define C04 .046875
+#define C06 .01953125
+#define C08 .01068115234375
+#define C22 .75
+#define C44 .46875
+#define C46 .01302083333333333333
+#define C48 .00712076822916666666
+#define C66 .36458333333333333333
+#define C68 .00569661458333333333
+#define C88 .3076171875
+#define EPS 1e-11
+#define MAX_ITER 10
+#define EN_SIZE 5
+	double *
+pj_enfn(double es) {
+	double t, *en;
+
+	if (en = (double *)pj_malloc(EN_SIZE * sizeof(double))) {
+		en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
+		en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
+		en[2] = (t = es * es) * (C44 - es * (C46 + es * C48));
+		en[3] = (t *= es) * (C66 - es * C68);
+		en[4] = t * es * C88;
+	} /* else return NULL if unable to allocate memory */
+	return en;
+}
+	double
+pj_mlfn(double phi, double sphi, double cphi, double *en) {
+	cphi *= sphi;
+	sphi *= sphi;
+	return(en[0] * phi - cphi * (en[1] + sphi*(en[2]
+		+ sphi*(en[3] + sphi*en[4]))));
+}
+	double
+pj_inv_mlfn(double arg, double es, double *en) {
+	double s, t, phi, k = 1./(1.-es);
+	int i;
+
+	phi = arg;
+	for (i = MAX_ITER; i ; --i) { /* rarely goes over 2 iterations */
+		s = sin(phi);
+		t = 1. - es * s * s;
+		phi -= t = (pj_mlfn(phi, s, cos(phi), en) - arg) * (t * sqrt(t)) * k;
+		if (fabs(t) < EPS)
+			return phi;
+	}
+	pj_errno = -17;
+	return phi;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_goode.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_goode.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_goode.c	(revision 256)
@@ -0,0 +1,49 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_goode.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PROJ_PARMS__ \
+	struct PJconsts	*sinu; \
+	struct PJconsts	*moll;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph.";
+	C_NAMESPACE PJ
+*pj_sinu(PJ *), *pj_moll(PJ *);
+#define Y_COR		0.05280
+#define PHI_LIM	.71093078197902358062
+FORWARD(s_forward); /* spheroid */
+	if (fabs(lp.phi) <= PHI_LIM)
+		xy = P->sinu->fwd(lp, P->sinu);
+	else {
+		xy = P->moll->fwd(lp, P->moll);
+		xy.y -= lp.phi >= 0.0 ? Y_COR : -Y_COR;
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	if (fabs(xy.y) <= PHI_LIM)
+		lp = P->sinu->inv(xy, P->sinu);
+	else {
+		xy.y += xy.y >= 0.0 ? Y_COR : -Y_COR;
+		lp = P->moll->inv(xy, P->moll);
+	}
+	return (lp);
+}
+FREEUP;
+	if (P) {
+		if (P->sinu)
+			(*(P->sinu->pfree))(P->sinu);
+		if (P->moll)
+			(*(P->moll->pfree))(P->moll);
+		pj_dalloc(P);
+	}
+}
+ENTRY2(goode, sinu, moll)
+	P->es = 0.;
+	if (!(P->sinu = pj_sinu(0)) || !(P->moll = pj_moll(0)))
+		E_ERROR_0;
+	if (!(P->sinu = pj_sinu(P->sinu)) || !(P->moll = pj_moll(P->moll)))
+		E_ERROR_0;
+	P->fwd = s_forward;
+	P->inv = s_inverse;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mill.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mill.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mill.c	(revision 256)
@@ -0,0 +1,18 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_mill.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(mill, "Miller Cylindrical") "\n\tCyl, Sph";
+FORWARD(s_forward); /* spheroid */
+	xy.x = lp.lam;
+	xy.y = log(tan(FORTPI + lp.phi * .4)) * 1.25;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.lam = xy.x;
+	lp.phi = 2.5 * (atan(exp(.8 * xy.y)) - FORTPI);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(mill) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/biveval.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/biveval.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/biveval.c	(revision 256)
@@ -0,0 +1,89 @@
+/* procedures for evaluating Tseries */
+#ifndef lint
+static const char SCCSID[]="@(#)biveval.c	4.4	93/06/12	GIE	REL";
+#endif
+# include <projects.h>
+# define NEAR_ONE	1.00001
+	static projUV
+w2, w;
+static double ceval(struct PW_COEF *C, int n) {
+	double d=0, dd=0, vd, vdd, tmp, *c;
+	int j;
+
+	for (C += n ; n-- ; --C ) {
+		if (j = C->m) {
+			vd = vdd = 0.;
+			for (c = C->c + --j; j ; --j ) {
+				vd = w2.v * (tmp = vd) - vdd + *c--;
+				vdd = tmp;
+			}
+			d = w2.u * (tmp = d) - dd + w.v * vd - vdd + 0.5 * *c;
+		} else
+			d = w2.u * (tmp = d) - dd;
+		dd = tmp;
+	}
+	if (j = C->m) {
+		vd = vdd = 0.;
+		for (c = C->c + --j; j ; --j ) {
+			vd = w2.v * (tmp = vd) - vdd + *c--;
+			vdd = tmp;
+		}
+		return (w.u * d - dd + 0.5 * ( w.v * vd - vdd + 0.5 * *c ));
+	} else
+		return (w.u * d - dd);
+}
+	projUV /* bivariate Chebyshev polynomial entry point */
+bcheval(projUV in, Tseries *T) {
+	projUV out;
+		/* scale to +-1 */
+ 	w.u = ( in.u + in.u - T->a.u ) * T->b.u;
+ 	w.v = ( in.v + in.v - T->a.v ) * T->b.v;
+	if (fabs(w.u) > NEAR_ONE || fabs(w.v) > NEAR_ONE) {
+		out.u = out.v = HUGE_VAL;
+		pj_errno = -36;
+	} else { /* double evaluation */
+		w2.u = w.u + w.u;
+		w2.v = w.v + w.v;
+		out.u = ceval(T->cu, T->mu);
+		out.v = ceval(T->cv, T->mv);
+	}
+	return out;
+}
+	projUV /* bivariate power polynomial entry point */
+bpseval(projUV in, Tseries *T) {
+	projUV out;
+	double *c, row;
+	int i, m;
+
+	out.u = out.v = 0.;
+	for (i = T->mu; i >= 0; --i) {
+		row = 0.;
+		if (m = T->cu[i].m) {
+			c = T->cu[i].c + m;
+			while (m--)
+				row = *--c + in.v * row;
+		}
+		out.u = row + in.u * out.u;
+	}
+	for (i = T->mv; i >= 0; --i) {
+		row = 0.;
+		if (m = T->cv[i].m) {
+			c = T->cv[i].c + m;
+			while (m--)
+				row = *--c + in.v * row;
+		}
+		out.v = row + in.u * out.v;
+	}
+	return out;
+}
+
+projUV /* general entry point selecting evaluation mode */
+biveval(projUV in, Tseries *T) {
+
+    if (T->power) {
+        return bpseval(in, T);
+    } else {
+        return bcheval(in, T);
+    }
+}
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_set.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_set.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_set.c	(revision 256)
@@ -0,0 +1,77 @@
+#ifndef lint
+static const char SCCSID[]="@(#)geod_set.c	4.8	95/09/23	GIE	REL";
+#endif
+
+#define _IN_GEOD_SET
+
+#include <string.h>
+#include "projects.h"
+#include "geodesic.h"
+#include "emess.h"
+	void
+geod_set(int argc, char **argv) {
+	paralist *start = 0, *curr;
+	double es;
+	char *name;
+	int i;
+
+    /* put arguments into internal linked list */
+	if (argc <= 0)
+		emess(1, "no arguments in initialization list");
+	for (i = 0; i < argc; ++i)
+		if (i)
+			curr = curr->next = pj_mkparam(argv[i]);
+		else
+			start = curr = pj_mkparam(argv[i]);
+	/* set elliptical parameters */
+	if (pj_ell_set(start, &geod_a, &es)) emess(1,"ellipse setup failure");
+	/* set units */
+	if (name = pj_param(start, "sunits").s) {
+		char *s;
+                struct PJ_UNITS *unit_list = pj_get_units_ref();
+		for (i = 0; (s = unit_list[i].id) && strcmp(name, s) ; ++i) ;
+		if (!s)
+			emess(1,"%s unknown unit conversion id", name);
+		fr_meter = 1. / (to_meter = atof(unit_list[i].to_meter));
+	} else
+		to_meter = fr_meter = 1.;
+	if (ellipse = es != 0.) {
+		onef = sqrt(1. - es);
+		geod_f = 1 - onef;
+		f2 = geod_f/2;
+		f4 = geod_f/4;
+		f64 = geod_f*geod_f/64;
+	} else {
+		onef = 1.;
+		geod_f = f2 = f4 = f64 = 0.;
+	}
+	/* check if line or arc mode */
+	if (pj_param(start, "tlat_1").i) {
+		double del_S;
+#undef f
+		phi1 = pj_param(start, "rlat_1").f;
+		lam1 = pj_param(start, "rlon_1").f;
+		if (pj_param(start, "tlat_2").i) {
+			phi2 = pj_param(start, "rlat_2").f;
+			lam2 = pj_param(start, "rlon_2").f;
+			geod_inv();
+			geod_pre();
+		} else if (geod_S = pj_param(start, "dS").f) {
+			al12 = pj_param(start, "rA").f;
+			geod_pre();
+			geod_for();
+		} else emess(1,"incomplete geodesic/arc info");
+		if ((n_alpha = pj_param(start, "in_A").i) > 0) {
+			if (!(del_alpha = pj_param(start, "rdel_A").f))
+				emess(1,"del azimuth == 0");
+		} else if (del_S = fabs(pj_param(start, "ddel_S").f)) {
+			n_S = geod_S / del_S + .5;
+		} else if ((n_S = pj_param(start, "in_S").i) <= 0)
+			emess(1,"no interval divisor selected");
+	}
+	/* free up linked list */
+	for ( ; start; start = curr) {
+		curr = start->next;
+		pj_dalloc(start);
+	}
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_collg.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_collg.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_collg.c	(revision 256)
@@ -0,0 +1,32 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_collg.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph.";
+#define FXC	1.12837916709551257390
+#define FYC	1.77245385090551602729
+#define ONEEPS	1.0000001
+FORWARD(s_forward); /* spheroid */
+	if ((xy.y = 1. - sin(lp.phi)) <= 0.)
+		xy.y = 0.;
+	else
+		xy.y = sqrt(xy.y);
+	xy.x = FXC * lp.lam * xy.y;
+	xy.y = FYC * (1. - xy.y);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / FYC - 1.;
+	if (fabs(lp.phi = 1. - lp.phi * lp.phi) < 1.)
+		lp.phi = asin(lp.phi);
+	else if (fabs(lp.phi) > ONEEPS) I_ERROR
+	else	lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+	if ((lp.lam = 1. - sin(lp.phi)) <= 0.)
+		lp.lam = 0.;
+	else
+		lp.lam = xy.x / (FXC * sqrt(lp.lam));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(collg) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_moll.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_moll.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_moll.c	(revision 256)
@@ -0,0 +1,65 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_moll.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	C_x, C_y, C_p;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(moll, "Mollweide") "\n\tPCyl., Sph.";
+PROJ_HEAD(wag4, "Wagner IV") "\n\tPCyl., Sph.";
+PROJ_HEAD(wag5, "Wagner V") "\n\tPCyl., Sph.";
+#define MAX_ITER	10
+#define LOOP_TOL	1e-7
+FORWARD(s_forward); /* spheroid */
+	double k, V;
+	int i;
+
+	k = P->C_p * sin(lp.phi);
+	for (i = MAX_ITER; i ; --i) {
+		lp.phi -= V = (lp.phi + sin(lp.phi) - k) /
+			(1. + cos(lp.phi));
+		if (fabs(V) < LOOP_TOL)
+			break;
+	}
+	if (!i)
+		lp.phi = (lp.phi < 0.) ? -HALFPI : HALFPI;
+	else
+		lp.phi *= 0.5;
+	xy.x = P->C_x * lp.lam * cos(lp.phi);
+	xy.y = P->C_y * sin(lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double th, s;
+
+	lp.phi = aasin(xy.y / P->C_y);
+	lp.lam = xy.x / (P->C_x * cos(lp.phi));
+	lp.phi += lp.phi;
+	lp.phi = aasin((lp.phi + sin(lp.phi)) / P->C_p);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P, double p) {
+	double r, sp, p2 = p + p;
+
+	P->es = 0;
+	sp = sin(p);
+	r = sqrt(TWOPI * sp / (p2 + sin(p2)));
+	P->C_x = 2. * r / PI;
+	P->C_y = r / sp;
+	P->C_p = p2 + sin(p2);
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	return P;
+}
+ENTRY0(moll) ENDENTRY(setup(P, HALFPI))
+ENTRY0(wag4) ENDENTRY(setup(P, PI/3.))
+ENTRY0(wag5)
+	P->es = 0;
+	P->C_x = 0.90977;
+	P->C_y = 1.65014;
+	P->C_p = 3.00896;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_airy.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_airy.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_airy.c	(revision 256)
@@ -0,0 +1,130 @@
+/******************************************************************************
+ * $Id: PJ_airy.c,v 1.2 2002/12/14 19:30:40 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the airy (Airy) projection.
+ * Author:   Gerald Evenden
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: PJ_airy.c,v $
+ * Revision 1.2  2002/12/14 19:30:40  warmerda
+ * updated header
+ *
+ */
+
+#define PROJ_PARMS__ \
+	double	p_halfpi; \
+	double	sinph0; \
+	double	cosph0; \
+	double	Cb; \
+	int		mode; \
+	int		no_cut;	/* do not cut at hemisphere limit */
+#define PJ_LIB__
+#include <projects.h>
+
+PJ_CVSID("$Id: PJ_airy.c,v 1.2 2002/12/14 19:30:40 warmerda Exp $");
+
+PROJ_HEAD(airy, "Airy") "\n\tMisc Sph, no inv.\n\tno_cut lat_b=";
+
+# define EPS 1.e-10
+# define N_POLE	0
+# define S_POLE 1
+# define EQUIT	2
+# define OBLIQ	3
+FORWARD(s_forward); /* spheroid */
+	double  sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz;
+
+	sinlam = sin(lp.lam);
+	coslam = cos(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+	case OBLIQ:
+		sinphi = sin(lp.phi);
+		cosphi = cos(lp.phi);
+		cosz = cosphi * coslam;
+		if (P->mode == OBLIQ)
+			cosz = P->sinph0 * sinphi + P->cosph0 * cosz;
+		if (!P->no_cut && cosz < -EPS)
+			F_ERROR;
+		if (fabs(s = 1. - cosz) > EPS) {
+			t = 0.5 * (1. + cosz);
+			Krho = -log(t)/s - P->Cb / t;
+		} else
+			Krho = 0.5 - P->Cb;
+		xy.x = Krho * cosphi * sinlam;
+		if (P->mode == OBLIQ)
+			xy.y = Krho * (P->cosph0 * sinphi -
+				P->sinph0 * cosphi * coslam);
+		else
+			xy.y = Krho * sinphi;
+		break;
+	case S_POLE:
+	case N_POLE:
+		lp.phi = fabs(P->p_halfpi - lp.phi);
+		if (!P->no_cut && (lp.phi - EPS) > HALFPI)
+			F_ERROR;
+		if ((lp.phi *= 0.5) > EPS) {
+			t = tan(lp.phi);
+			Krho = -2.*(log(cos(lp.phi)) / t + t * P->Cb);
+			xy.x = Krho * sinlam;
+			xy.y = Krho * coslam;
+			if (P->mode == N_POLE)
+				xy.y = -xy.y;
+		} else
+			xy.x = xy.y = 0.;
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(airy)
+	double beta;
+
+	P->no_cut = pj_param(P->params, "bno_cut").i;
+	beta = 0.5 * (HALFPI - pj_param(P->params, "rlat_b").f);
+	if (fabs(beta) < EPS)
+		P->Cb = -0.5;
+	else {
+		P->Cb = 1./tan(beta);
+		P->Cb *= P->Cb * log(cos(beta));
+	}
+	if (fabs(fabs(P->phi0) - HALFPI) < EPS)
+		if (P->phi0 < 0.) {
+			P->p_halfpi = -HALFPI;
+			P->mode = S_POLE;
+		} else {
+			P->p_halfpi =  HALFPI;
+			P->mode = N_POLE;
+		}
+	else {
+		if (fabs(P->phi0) < EPS)
+			P->mode = EQUIT;
+		else {
+			P->mode = OBLIQ;
+			P->sinph0 = sin(P->phi0);
+			P->cosph0 = cos(P->phi0);
+		}
+	}
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_rpoly.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_rpoly.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_rpoly.c	(revision 256)
@@ -0,0 +1,38 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_rpoly.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	phi1; \
+	double	fxa; \
+	double	fxb; \
+	int		mode;
+#define EPS	1e-9
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(rpoly, "Rectangular Polyconic")
+	"\n\tConic, Sph., no inv.\n\tlat_ts=";
+FORWARD(s_forward); /* spheroid */
+	double fa;
+
+	if (P->mode)
+		fa = tan(lp.lam * P->fxb) * P->fxa;
+	else
+		fa = 0.5 * lp.lam;
+	if (fabs(lp.phi) < EPS) {
+		xy.x = fa + fa;
+		xy.y = - P->phi0;
+	} else {
+		xy.y = 1. / tan(lp.phi);
+		xy.x = sin(fa = 2. * atan(fa * sin(lp.phi))) * xy.y;
+		xy.y = lp.phi - P->phi0 + (1. - cos(fa)) * xy.y;
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(rpoly)
+	if ((P->mode = (P->phi1 = fabs(pj_param(P->params, "rlat_ts").f)) > EPS)) {
+		P->fxb = 0.5 * sin(P->phi1);
+		P->fxa = 0.5 / P->fxb;
+	}
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_qsfn.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_qsfn.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_qsfn.c	(revision 256)
@@ -0,0 +1,19 @@
+/* determine small q */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_qsfn.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <math.h>
+#include <projects.h>
+
+# define EPSILON 1.0e-7
+	double
+pj_qsfn(double sinphi, double e, double one_es) {
+	double con;
+
+	if (e >= EPSILON) {
+		con = e * sinphi;
+		return (one_es * (sinphi / (1. - con * con) -
+		   (.5 / e) * log ((1. - con) / (1. + con))));
+	} else
+		return (sinphi + sinphi);
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lagrng.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lagrng.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lagrng.c	(revision 256)
@@ -0,0 +1,38 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_lagrng.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	hrw; \
+	double	rw; \
+	double	a1;
+#define TOL	1e-10
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(lagrng, "Lagrange") "\n\tMisc Sph, no inv.\n\tW=";
+FORWARD(s_forward); /* spheroid */
+	double v, c;
+
+	if (fabs(fabs(lp.phi) - HALFPI) < TOL) {
+		xy.x = 0;
+		xy.y = lp.phi < 0 ? -2. : 2.;
+	} else {
+		lp.phi = sin(lp.phi);
+		v = P->a1 * pow((1. + lp.phi)/(1. - lp.phi), P->hrw);
+		if ((c = 0.5 * (v + 1./v) + cos(lp.lam *= P->rw)) < TOL)
+			F_ERROR;
+		xy.x = 2. * sin(lp.lam) / c;
+		xy.y = (v - 1./v) / c;
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(lagrng)
+	double phi1;
+
+	if ((P->rw = pj_param(P->params, "dW").f) <= 0) E_ERROR(-27);
+	P->hrw = 0.5 * (P->rw = 1. / P->rw);
+	phi1 = pj_param(P->params, "rlat_1").f;
+	if (fabs(fabs(phi1 = sin(phi1)) - 1.) < TOL) E_ERROR(-22);
+	P->a1 = pow((1. - phi1)/(1. + phi1), P->hrw);
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tpeqd.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tpeqd.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tpeqd.c	(revision 256)
@@ -0,0 +1,79 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_tpeqd.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double cp1, sp1, cp2, sp2, ccs, cs, sc, r2z0, z02, dlam2; \
+	double hz0, thz0, rhshz0, ca, sa, lp, lamc;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(tpeqd, "Two Point Equidistant")
+	"\n\tMisc Sph\n\tlat_1= lon_1= lat_2= lon_2=";
+FORWARD(s_forward); /* sphere */
+	double t, z1, z2, dl1, dl2, sp, cp;
+
+	sp = sin(lp.phi);
+	cp = cos(lp.phi);
+	z1 = aacos(P->sp1 * sp + P->cp1 * cp * cos(dl1 = lp.lam + P->dlam2));
+	z2 = aacos(P->sp2 * sp + P->cp2 * cp * cos(dl2 = lp.lam - P->dlam2));
+	z1 *= z1;
+	z2 *= z2;
+	xy.x = P->r2z0 * (t = z1 - z2);
+	t = P->z02 - t;
+	xy.y = P->r2z0 * asqrt(4. * P->z02 * z2 - t * t);
+	if ((P->ccs * sp - cp * (P->cs * sin(dl1) - P->sc * sin(dl2))) < 0.)
+		xy.y = -xy.y;
+	return xy;
+}
+INVERSE(s_inverse); /* sphere */
+	double cz1, cz2, s, d, cp, sp;
+
+	cz1 = cos(hypot(xy.y, xy.x + P->hz0));
+	cz2 = cos(hypot(xy.y, xy.x - P->hz0));
+	s = cz1 + cz2;
+	d = cz1 - cz2;
+	lp.lam = - atan2(d, (s * P->thz0));
+	lp.phi = aacos(hypot(P->thz0 * s, d) * P->rhshz0);
+	if ( xy.y < 0. )
+		lp.phi = - lp.phi;
+	/* lam--phi now in system relative to P1--P2 base equator */
+	sp = sin(lp.phi);
+	cp = cos(lp.phi);
+	lp.phi = aasin(P->sa * sp + P->ca * cp * (s = cos(lp.lam -= P->lp)));
+	lp.lam = atan2(cp * sin(lp.lam), P->sa * cp * s - P->ca * sp) + P->lamc;
+	return lp;
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(tpeqd)
+	double lam_1, lam_2, phi_1, phi_2, A12, pp;
+
+	/* get control point locations */
+	phi_1 = pj_param(P->params, "rlat_1").f;
+	lam_1 = pj_param(P->params, "rlon_1").f;
+	phi_2 = pj_param(P->params, "rlat_2").f;
+	lam_2 = pj_param(P->params, "rlon_2").f;
+	if (phi_1 == phi_2 && lam_1 == lam_2) E_ERROR(-25);
+	P->lam0 = adjlon(0.5 * (lam_1 + lam_2));
+	P->dlam2 = adjlon(lam_2 - lam_1);
+	P->cp1 = cos(phi_1);
+	P->cp2 = cos(phi_2);
+	P->sp1 = sin(phi_1);
+	P->sp2 = sin(phi_2);
+	P->cs = P->cp1 * P->sp2;
+	P->sc = P->sp1 * P->cp2;
+	P->ccs = P->cp1 * P->cp2 * sin(P->dlam2);
+	P->z02 = aacos(P->sp1 * P->sp2 + P->cp1 * P->cp2 * cos(P->dlam2));
+	P->hz0 = .5 * P->z02;
+	A12 = atan2(P->cp2 * sin(P->dlam2),
+		P->cp1 * P->sp2 - P->sp1 * P->cp2 * cos(P->dlam2));
+	P->ca = cos(pp = aasin(P->cp1 * sin(A12)));
+	P->sa = sin(pp);
+	P->lp = adjlon(atan2(P->cp1 * cos(A12), P->sp1) - P->hz0);
+	P->dlam2 *= .5;
+	P->lamc = HALFPI - atan2(sin(A12) * P->sp1, cos(A12)) - P->dlam2;
+	P->thz0 = tan(P->hz0);
+	P->rhshz0 = .5 / sin(P->hz0);
+	P->r2z0 = 0.5 / P->z02;
+	P->z02 *= P->z02;
+	P->inv = s_inverse; P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/p_series.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/p_series.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/p_series.c	(revision 256)
@@ -0,0 +1,42 @@
+/* print row coefficients of Tseries structure */
+#ifndef lint
+static const char SCCSID[]="@(#)p_series.c	4.6	95/08/19	GIE	REL";
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <projects.h>
+#define NF 20 /* length of final format string */
+#define CUT 60 /* check length of line */
+	void
+p_series(Tseries *T, FILE *file, char *fmt) {
+	int i, j, n, L;
+	char format[NF+1];
+
+	*format = ' ';
+	strncpy(format + 1, fmt, NF - 3);
+	strcat(format, "%n");
+	fprintf(file, "u: %d\n", T->mu+1);
+	for (i = 0; i <= T->mu; ++i)
+		if (T->cu[i].m) {
+			fprintf(file, "%d %d%n", i, T->cu[i].m, &L);
+			n = 0;
+			for (j = 0; j < T->cu[i].m; ++j) {
+				if ((L += n) > CUT)
+					fprintf(file, "\n %n", &L);
+				fprintf(file, format, T->cu[i].c[j], &n);
+			}
+			fputc('\n', file);
+		}
+	fprintf(file, "v: %d\n", T->mv+1);
+	for (i = 0; i <= T->mv; ++i)
+		if (T->cv[i].m) {
+			fprintf(file, "%d %d%n", i, T->cv[i].m, &L);
+			n = 0;
+			for (j = 0; j < T->cv[i].m; ++j) {
+				if ((L += n) > 60)
+					fprintf(file, "\n %n", &L);
+				fprintf(file, format, T->cv[i].c[j], &n);
+			}
+			fputc('\n', file);
+		}
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg2.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg2.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg2.c	(revision 256)
@@ -0,0 +1,48 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_vandg2.c	4.1	94/02/15	GIE	REL";
+#endif
+# define TOL	1e-10
+# define TWORPI	0.63661977236758134308
+#define PROJ_PARMS__ \
+	int	vdg3;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(vandg2, "van der Grinten II") "\n\tMisc Sph, no inv.";
+PROJ_HEAD(vandg3, "van der Grinten III") "\n\tMisc Sph, no inv.";
+FORWARD(s_forward); /* spheroid */
+	double x1, at, bt, ct;
+
+	bt = fabs(TWORPI * lp.phi);
+	if ((ct = 1. - bt * bt) < 0.)
+		ct = 0.;
+	else
+		ct = sqrt(ct);
+	if (fabs(lp.lam) < TOL) {
+		xy.x = 0.;
+		xy.y = PI * (lp.phi < 0. ? -bt : bt) / (1. + ct);
+	} else {
+		at = 0.5 * fabs(PI / lp.lam - lp.lam / PI);
+		if (P->vdg3) {
+			x1 = bt / (1. + ct);
+			xy.x = PI * (sqrt(at * at + 1. - x1 * x1) - at);
+			xy.y = PI * x1;
+		} else {
+			x1 = (ct * sqrt(1. + at * at) - at * ct * ct) /
+				(1. + at * at * bt * bt);
+			xy.x = PI * x1;
+			xy.y = PI * sqrt(1. - x1 * (x1 + 2. * at) + TOL);
+		}
+		if ( lp.lam < 0.) xy.x = -xy.x;
+		if ( lp.phi < 0.) xy.y = -xy.y;
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(vandg2)
+	P->vdg3 = 0;
+	P->inv = 0; P->fwd = s_forward;
+ENDENTRY(P)
+ENTRY0(vandg3)
+	P->vdg3 = 1;
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/emess.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/emess.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/emess.c	(revision 256)
@@ -0,0 +1,51 @@
+/* Error message processing */
+#ifndef lint
+static const char SCCSID[]="@(#)emess.c	4.6	94/05/24	GIE	REL";
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <string.h>
+#include <proj_api.h>
+#define EMESS_ROUTINE
+#include "emess.h"
+	void
+emess(int code, char *fmt, ...) {
+	va_list args;
+
+	va_start(args, fmt);
+	/* prefix program name, if given */
+	if (fmt != NULL)
+		(void)fprintf(stderr,"%s\n<%s>: ",pj_get_release(),
+                              emess_dat.Prog_name);
+	/* print file name and line, if given */
+	if (emess_dat.File_name != NULL && *emess_dat.File_name) {
+		(void)fprintf(stderr,"while processing file: %s", emess_dat.File_name);
+		if (emess_dat.File_line > 0)
+			(void)fprintf(stderr,", line %d\n", emess_dat.File_line);
+		else
+			(void)fputc('\n', stderr);
+	} else
+		putc('\n', stderr);
+	/* if |code|==2, print errno code data */
+	if (code == 2 || code == -2)
+		(void)fprintf(stderr, "Sys errno: %d: %s\n",
+			errno,
+#ifdef HAVE_STRERROR
+			strerror(errno));
+#else
+			"<system mess. texts unavail.>");
+#endif
+	/* post remainder of call data */
+	(void)vfprintf(stderr,fmt,args);
+	va_end(args);
+	/* die if code positive */
+	if (code > 0) {
+		(void)fputs("\nprogram abnormally terminated\n", stderr);
+		exit(code);
+	}
+	else
+		putc('\n', stderr);
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ob_tran.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ob_tran.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ob_tran.c	(revision 256)
@@ -0,0 +1,147 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_ob_tran.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	struct PJconsts *link; \
+	double	lamp; \
+	double	cphip, sphip;
+#define PJ_LIB__
+#include <projects.h>
+#include <string.h>
+PROJ_HEAD(ob_tran, "General Oblique Transformation") "\n\tMisc Sph"
+"\n\to_proj= plus parameters for projection"
+"\n\to_lat_p= o_lon_p= (new pole) or"
+"\n\to_alpha= o_lon_c= o_lat_c= or"
+"\n\to_lon_1= o_lat_1= o_lon_2= o_lat_2=";
+#define TOL 1e-10
+FORWARD(o_forward); /* spheroid */
+	double coslam, sinphi, cosphi;
+
+        (void) xy;
+
+	coslam = cos(lp.lam);
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	lp.lam = adjlon(aatan2(cosphi * sin(lp.lam), P->sphip * cosphi * coslam +
+		P->cphip * sinphi) + P->lamp);
+	lp.phi = aasin(P->sphip * sinphi - P->cphip * cosphi * coslam);
+	return (P->link->fwd(lp, P->link));
+}
+FORWARD(t_forward); /* spheroid */
+	double cosphi, coslam;
+
+        (void) xy;
+
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	lp.lam = adjlon(aatan2(cosphi * sin(lp.lam), sin(lp.phi)) + P->lamp);
+	lp.phi = aasin(- cosphi * coslam);
+	return (P->link->fwd(lp, P->link));
+}
+INVERSE(o_inverse); /* spheroid */
+	double coslam, sinphi, cosphi;
+
+	lp = P->link->inv(xy, P->link);
+	if (lp.lam != HUGE_VAL) {
+		coslam = cos(lp.lam -= P->lamp);
+		sinphi = sin(lp.phi);
+		cosphi = cos(lp.phi);
+		lp.phi = aasin(P->sphip * sinphi + P->cphip * cosphi * coslam);
+		lp.lam = aatan2(cosphi * sin(lp.lam), P->sphip * cosphi * coslam -
+			P->cphip * sinphi);
+	}
+	return (lp);
+}
+INVERSE(t_inverse); /* spheroid */
+	double cosphi, t;
+
+	lp = P->link->inv(xy, P->link);
+	if (lp.lam != HUGE_VAL) {
+		cosphi = cos(lp.phi);
+		t = lp.lam - P->lamp;
+		lp.lam = aatan2(cosphi * sin(t), - sin(lp.phi));
+		lp.phi = aasin(cosphi * cos(t));
+	}
+	return (lp);
+}
+FREEUP;
+	if (P) {
+		if (P->link)
+			(*(P->link->pfree))(P->link);
+		pj_dalloc(P);
+	}
+}
+ENTRY1(ob_tran, link)
+	int i;
+	double phip;
+	char *name, *s;
+
+	/* get name of projection to be translated */
+	if (!(name = pj_param(P->params, "so_proj").s)) E_ERROR(-26);
+	for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
+	if (!s || !(P->link = (*pj_list[i].proj)(0))) E_ERROR(-37);
+	/* copy existing header into new */
+	P->es = 0.; /* force to spherical */
+	P->link->params = P->params;
+	P->link->over = P->over;
+	P->link->geoc = P->geoc;
+	P->link->a = P->a;
+	P->link->es = P->es;
+	P->link->ra = P->ra;
+	P->link->lam0 = P->lam0;
+	P->link->phi0 = P->phi0;
+	P->link->x0 = P->x0;
+	P->link->y0 = P->y0;
+	P->link->k0 = P->k0;
+	/* force spherical earth */
+	P->link->one_es = P->link->rone_es = 1.;
+	P->link->es = P->link->e = 0.;
+	if (!(P->link = pj_list[i].proj(P->link))) {
+		freeup(P);
+		return 0;
+	}
+	if (pj_param(P->params, "to_alpha").i) {
+		double lamc, phic, alpha;
+
+		lamc	= pj_param(P->params, "ro_lon_c").f;
+		phic	= pj_param(P->params, "ro_lat_c").f;
+		alpha	= pj_param(P->params, "ro_alpha").f;
+/*
+		if (fabs(phic) <= TOL ||
+			fabs(fabs(phic) - HALFPI) <= TOL ||
+			fabs(fabs(alpha) - HALFPI) <= TOL)
+*/
+		if (fabs(fabs(phic) - HALFPI) <= TOL)
+			E_ERROR(-32);
+		P->lamp = lamc + aatan2(-cos(alpha), -sin(alpha) * sin(phic));
+		phip = aasin(cos(phic) * sin(alpha));
+	} else if (pj_param(P->params, "to_lat_p").i) { /* specified new pole */
+		P->lamp = pj_param(P->params, "ro_lon_p").f;
+		phip = pj_param(P->params, "ro_lat_p").f;
+	} else { /* specified new "equator" points */
+		double lam1, lam2, phi1, phi2, con;
+
+		lam1 = pj_param(P->params, "ro_lon_1").f;
+		phi1 = pj_param(P->params, "ro_lat_1").f;
+		lam2 = pj_param(P->params, "ro_lon_2").f;
+		phi2 = pj_param(P->params, "ro_lat_2").f;
+		if (fabs(phi1 - phi2) <= TOL ||
+			(con = fabs(phi1)) <= TOL ||
+			fabs(con - HALFPI) <= TOL ||
+			fabs(fabs(phi2) - HALFPI) <= TOL) E_ERROR(-33);
+		P->lamp = atan2(cos(phi1) * sin(phi2) * cos(lam1) -
+			sin(phi1) * cos(phi2) * cos(lam2),
+			sin(phi1) * cos(phi2) * sin(lam2) -
+			cos(phi1) * sin(phi2) * sin(lam1));
+		phip = atan(-cos(P->lamp - lam1) / tan(phi1));
+	}
+	if (fabs(phip) > TOL) { /* oblique */
+		P->cphip = cos(phip);
+		P->sphip = sin(phip);
+		P->fwd = o_forward;
+		P->inv = P->link->inv ? o_inverse : 0;
+	} else { /* transverse */
+		P->fwd = t_forward;
+		P->inv = P->link->inv ? t_inverse : 0;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_cvt.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_cvt.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_cvt.c	(revision 256)
@@ -0,0 +1,71 @@
+#ifndef lint
+static const char SCCSID[]="@(#)nad_cvt.c	4.3   95/09/23 GIE REL";
+#endif
+#define PJ_LIB__
+#include <projects.h>
+#define MAX_TRY 9
+#define TOL 1e-12
+	LP
+nad_cvt(LP in, int inverse, struct CTABLE *ct) {
+	LP t, tb;
+
+	if (in.lam == HUGE_VAL)
+		return in;
+	/* normalize input to ll origin */
+	tb = in;
+	tb.lam -= ct->ll.lam;
+	tb.phi -= ct->ll.phi;
+	tb.lam = adjlon(tb.lam - PI) + PI;
+	t = nad_intr(tb, ct);
+	if (inverse) {
+		LP del, dif;
+		int i = MAX_TRY;
+
+		if (t.lam == HUGE_VAL) return t;
+		t.lam = tb.lam + t.lam;
+		t.phi = tb.phi - t.phi;
+
+		do {
+			del = nad_intr(t, ct);
+
+                        /* This case used to return failure, but I have
+                           changed it to return the first order approximation
+                           of the inverse shift.  This avoids cases where the
+                           grid shift *into* this grid came from another grid.
+                           While we aren't returning optimally correct results
+                           I feel a close result in this case is better than
+                           no result.  NFW
+                           To demonstrate use -112.5839956 49.4914451 against
+                           the NTv2 grid shift file from Canada. */
+			if (del.lam == HUGE_VAL) 
+                        {
+                            if( getenv( "PROJ_DEBUG" ) != NULL )
+                                fprintf( stderr, 
+                                         "Inverse grid shift iteration failed, presumably at grid edge.\n"
+                                         "Using first approximation.\n" );
+                            /* return del */;
+                            break;
+                        }
+
+			t.lam -= dif.lam = t.lam - del.lam - tb.lam;
+			t.phi -= dif.phi = t.phi + del.phi - tb.phi;
+		} while (i-- && fabs(dif.lam) > TOL && fabs(dif.phi) > TOL);
+		if (i < 0) {
+                    if( getenv( "PROJ_DEBUG" ) != NULL )
+                        fprintf( stderr, 
+                                 "Inverse grid shift iterator failed to converge.\n" );
+                    t.lam = t.phi = HUGE_VAL;
+                    return t;
+		}
+		in.lam = adjlon(t.lam + ct->ll.lam);
+		in.phi = t.phi + ct->ll.phi;
+	} else {
+		if (t.lam == HUGE_VAL)
+			in = t;
+		else {
+			in.lam -= t.lam;
+			in.phi += t.phi;
+		}
+	}
+	return in;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck3.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck3.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck3.c	(revision 256)
@@ -0,0 +1,53 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eck3.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double C_x, C_y, A, B;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(eck3, "Eckert III") "\n\tPCyl, Sph.";
+PROJ_HEAD(putp1, "Putnins P1") "\n\tPCyl, Sph.";
+PROJ_HEAD(wag6, "Wagner VI") "\n\tPCyl, Sph.";
+PROJ_HEAD(kav7, "Kavraisky VII") "\n\tPCyl, Sph.";
+FORWARD(s_forward); /* spheroid */
+	xy.y = P->C_y * lp.phi;
+	xy.x = P->C_x * lp.lam * (P->A + asqrt(1. - P->B * lp.phi * lp.phi));
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / P->C_y;
+	lp.lam = xy.x / (P->C_x * (P->A + asqrt(1. - P->B * lp.phi * lp.phi)));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->es = 0.;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	return P;
+}
+ENTRY0(eck3)
+	P->C_x = .42223820031577120149;
+	P->C_y = .84447640063154240298;
+	P->A = 1.;
+	P->B = 0.4052847345693510857755;
+ENDENTRY(setup(P))
+ENTRY0(kav7)
+	P->C_x = 0.2632401569273184856851;
+	P->C_x = 0.8660254037844;
+	P->C_y = 1.;
+	P->A = 0.;
+	P->B = 0.30396355092701331433;
+ENDENTRY(setup(P))
+ENTRY0(wag6);
+	P->C_x = P->C_y = 0.94745;
+	P->A = 0.;
+	P->B = 0.30396355092701331433;
+ENDENTRY(setup(P))
+ENTRY0(putp1);
+	P->C_x = 1.89490;
+	P->C_y = 0.94745;
+	P->A = -0.5;
+	P->B = 0.30396355092701331433;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cc.c	(revision 256)
@@ -0,0 +1,22 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_cc.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double ap;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph";
+#define EPS10 1.e-10
+FORWARD(s_forward); /* spheroid */
+	if (fabs(fabs(lp.phi) - HALFPI) <= EPS10) F_ERROR;
+	xy.x = lp.lam;
+	xy.y = tan(lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = atan(xy.y);
+	lp.lam = xy.x;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(cc) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aea.c	(revision 256)
@@ -0,0 +1,171 @@
+/******************************************************************************
+ * $Id: PJ_aea.c,v 1.4 2003/08/18 15:21:23 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the aea (Albers Equal Area) projection.
+ * Author:   Gerald Evenden
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: PJ_aea.c,v $
+ * Revision 1.4  2003/08/18 15:21:23  warmerda
+ * fixed initialization of en variable
+ *
+ * Revision 1.3  2002/12/14 19:27:06  warmerda
+ * updated header
+ *
+ */
+
+#define PROJ_PARMS__ \
+	double	ec; \
+	double	n; \
+	double	c; \
+	double	dd; \
+	double	n2; \
+	double	rho0; \
+	double	rho; \
+	double	phi1; \
+	double	phi2; \
+	double	*en; \
+	int		ellips;
+
+#define PJ_LIB__
+#include <projects.h>
+
+PJ_CVSID("$Id: PJ_aea.c,v 1.4 2003/08/18 15:21:23 warmerda Exp $");
+
+# define EPS10	1.e-10
+# define TOL7	1.e-7
+
+PROJ_HEAD(aea, "Albers Equal Area")
+	"\n\tConic Sph&Ell\n\tlat_1= lat_2=";
+PROJ_HEAD(leac, "Lambert Equal Area Conic")
+	"\n\tConic, Sph&Ell\n\tlat_1= south";
+/* determine latitude angle phi-1 */
+# define N_ITER 15
+# define EPSILON 1.0e-7
+# define TOL 1.0e-10
+	static double
+phi1_(double qs, double Te, double Tone_es) {
+	int i;
+	double Phi, sinpi, cospi, con, com, dphi;
+
+	Phi = asin (.5 * qs);
+	if (Te < EPSILON)
+		return( Phi );
+	i = N_ITER;
+	do {
+		sinpi = sin (Phi);
+		cospi = cos (Phi);
+		con = Te * sinpi;
+		com = 1. - con * con;
+		dphi = .5 * com * com / cospi * (qs / Tone_es -
+		   sinpi / com + .5 / Te * log ((1. - con) /
+		   (1. + con)));
+		Phi += dphi;
+	} while (fabs(dphi) > TOL && --i);
+	return( i ? Phi : HUGE_VAL );
+}
+FORWARD(e_forward); /* ellipsoid & spheroid */
+	if ((P->rho = P->c - (P->ellips ? P->n * pj_qsfn(sin(lp.phi),
+		P->e, P->one_es) : P->n2 * sin(lp.phi))) < 0.) F_ERROR
+	P->rho = P->dd * sqrt(P->rho);
+	xy.x = P->rho * sin( lp.lam *= P->n );
+	xy.y = P->rho0 - P->rho * cos(lp.lam);
+	return (xy);
+}
+INVERSE(e_inverse) /* ellipsoid & spheroid */;
+	if( (P->rho = hypot(xy.x, xy.y = P->rho0 - xy.y)) != 0.0 ) {
+		if (P->n < 0.) {
+			P->rho = -P->rho;
+			xy.x = -xy.x;
+			xy.y = -xy.y;
+		}
+		lp.phi =  P->rho / P->dd;
+		if (P->ellips) {
+			lp.phi = (P->c - lp.phi * lp.phi) / P->n;
+			if (fabs(P->ec - fabs(lp.phi)) > TOL7) {
+				if ((lp.phi = phi1_(lp.phi, P->e, P->one_es)) == HUGE_VAL)
+					I_ERROR
+			} else
+				lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+		} else if (fabs(lp.phi = (P->c - lp.phi * lp.phi) / P->n2) <= 1.)
+			lp.phi = asin(lp.phi);
+		else
+			lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+		lp.lam = atan2(xy.x, xy.y) / P->n;
+	} else {
+		lp.lam = 0.;
+		lp.phi = P->n > 0. ? HALFPI : - HALFPI;
+	}
+	return (lp);
+}
+FREEUP; if (P) { if (P->en) pj_dalloc(P->en); pj_dalloc(P); } }
+	static PJ *
+setup(PJ *P) {
+	double cosphi, sinphi;
+	int secant;
+
+	if (fabs(P->phi1 + P->phi2) < EPS10) E_ERROR(-21);
+	P->n = sinphi = sin(P->phi1);
+	cosphi = cos(P->phi1);
+	secant = fabs(P->phi1 - P->phi2) >= EPS10;
+	if( (P->ellips = (P->es > 0.))) {
+		double ml1, m1;
+
+		if (!(P->en = pj_enfn(P->es))) E_ERROR_0;
+		m1 = pj_msfn(sinphi, cosphi, P->es);
+		ml1 = pj_qsfn(sinphi, P->e, P->one_es);
+		if (secant) { /* secant cone */
+			double ml2, m2;
+
+			sinphi = sin(P->phi2);
+			cosphi = cos(P->phi2);
+			m2 = pj_msfn(sinphi, cosphi, P->es);
+			ml2 = pj_qsfn(sinphi, P->e, P->one_es);
+			P->n = (m1 * m1 - m2 * m2) / (ml2 - ml1);
+		}
+		P->ec = 1. - .5 * P->one_es * log((1. - P->e) /
+			(1. + P->e)) / P->e;
+		P->c = m1 * m1 + P->n * ml1;
+		P->dd = 1. / P->n;
+		P->rho0 = P->dd * sqrt(P->c - P->n * pj_qsfn(sin(P->phi0),
+			P->e, P->one_es));
+	} else {
+		if (secant) P->n = .5 * (P->n + sin(P->phi2));
+		P->n2 = P->n + P->n;
+		P->c = cosphi * cosphi + P->n2 * sinphi;
+		P->dd = 1. / P->n;
+		P->rho0 = P->dd * sqrt(P->c - P->n2 * sin(P->phi0));
+	}
+	P->inv = e_inverse; P->fwd = e_forward;
+	return P;
+}
+ENTRY1(aea,en)
+	P->phi1 = pj_param(P->params, "rlat_1").f;
+	P->phi2 = pj_param(P->params, "rlat_2").f;
+ENDENTRY(setup(P))
+ENTRY1(leac,en)
+	P->phi2 = pj_param(P->params, "rlat_1").f;
+	P->phi1 = pj_param(P->params, "bsouth").i ? - HALFPI: HALFPI;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cea.c	(revision 256)
@@ -0,0 +1,64 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_cea.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double qp; \
+	double *apa;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(cea, "Equal Area Cylindrical") "\n\tCyl, Sph&Ell\n\tlat_ts=";
+# define EPS	1e-10
+FORWARD(e_forward); /* spheroid */
+	xy.x = P->k0 * lp.lam;
+	xy.y = .5 * pj_qsfn(sin(lp.phi), P->e, P->one_es) / P->k0;
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	xy.x = P->k0 * lp.lam;
+	xy.y = sin(lp.phi) / P->k0;
+	return (xy);
+}
+INVERSE(e_inverse); /* spheroid */
+	lp.phi = pj_authlat(asin( 2. * xy.y * P->k0 / P->qp), P->apa);
+	lp.lam = xy.x / P->k0;
+	return (lp);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t;
+
+	if ((t = fabs(xy.y *= P->k0)) - EPS <= 1.) {
+		if (t >= 1.)
+			lp.phi = xy.y < 0. ? -HALFPI : HALFPI;
+		else
+			lp.phi = asin(xy.y);
+		lp.lam = xy.x / P->k0;
+	} else I_ERROR;
+	return (lp);
+}
+FREEUP;
+	if (P) {
+		if (P->apa)
+			pj_dalloc(P->apa);
+		pj_dalloc(P);
+	}
+}
+ENTRY1(cea, apa)
+	double t;
+
+	if (pj_param(P->params, "tlat_ts").i &&
+		(P->k0 = cos(t = pj_param(P->params, "rlat_ts").f)) < 0.) E_ERROR(-24)
+	else
+		t = 0.;
+	if (P->es) {
+		t = sin(t);
+		P->k0 /= sqrt(1. - P->es * t * t);
+		P->e = sqrt(P->es);
+		if (!(P->apa = pj_authset(P->es))) E_ERROR_0;
+		P->qp = pj_qsfn(1., P->e, P->one_es);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cass.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cass.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_cass.c	(revision 256)
@@ -0,0 +1,82 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_cass.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double m0; \
+	double n; \
+	double t; \
+	double a1; \
+	double c; \
+	double r; \
+	double dd; \
+	double d2; \
+	double a2; \
+	double tn; \
+	double *en;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(cass, "Cassini") "\n\tCyl, Sph&Ell";
+# define EPS10	1e-10
+# define C1	.16666666666666666666
+# define C2	.00833333333333333333
+# define C3	.04166666666666666666
+# define C4	.33333333333333333333
+# define C5	.06666666666666666666
+FORWARD(e_forward); /* ellipsoid */
+	xy.y = pj_mlfn(lp.phi, P->n = sin(lp.phi), P->c = cos(lp.phi), P->en);
+	P->n = 1./sqrt(1. - P->es * P->n * P->n);
+	P->tn = tan(lp.phi); P->t = P->tn * P->tn;
+	P->a1 = lp.lam * P->c;
+	P->c *= P->es * P->c / (1 - P->es);
+	P->a2 = P->a1 * P->a1;
+	xy.x = P->n * P->a1 * (1. - P->a2 * P->t *
+		(C1 - (8. - P->t + 8. * P->c) * P->a2 * C2));
+	xy.y -= P->m0 - P->n * P->tn * P->a2 *
+		(.5 + (5. - P->t + 6. * P->c) * P->a2 * C3);
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	xy.x = asin(cos(lp.phi) * sin(lp.lam));
+	xy.y = atan2(tan(lp.phi) , cos(lp.lam)) - P->phi0;
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double ph1;
+
+	ph1 = pj_inv_mlfn(P->m0 + xy.y, P->es, P->en);
+	P->tn = tan(ph1); P->t = P->tn * P->tn;
+	P->n = sin(ph1);
+	P->r = 1. / (1. - P->es * P->n * P->n);
+	P->n = sqrt(P->r);
+	P->r *= (1. - P->es) * P->n;
+	P->dd = xy.x / P->n;
+	P->d2 = P->dd * P->dd;
+	lp.phi = ph1 - (P->n * P->tn / P->r) * P->d2 *
+		(.5 - (1. + 3. * P->t) * P->d2 * C3);
+	lp.lam = P->dd * (1. + P->t * P->d2 *
+		(-C4 + (1. + 3. * P->t) * P->d2 * C5)) / cos(ph1);
+	return (lp);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = asin(sin(P->dd = xy.y + P->phi0) * cos(xy.x));
+	lp.lam = atan2(tan(xy.x), cos(P->dd));
+	return (lp);
+}
+FREEUP;
+	if (P) {
+		if (P->en)
+			pj_dalloc(P->en);
+		pj_dalloc(P);
+	}
+}
+ENTRY1(cass, en)
+	if (P->es) {
+		if (!(P->en = pj_enfn(P->es))) E_ERROR_0;
+		P->m0 = pj_mlfn(P->phi0, sin(P->phi0), cos(P->phi0), P->en);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbtfpq.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbtfpq.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbtfpq.c	(revision 256)
@@ -0,0 +1,50 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_mbtfpq.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl., Sph.";
+#define NITER	20
+#define EPS	1e-7
+#define ONETOL 1.000001
+#define C	1.70710678118654752440
+#define RC	0.58578643762690495119
+#define FYC	1.87475828462269495505
+#define RYC	0.53340209679417701685
+#define FXC	0.31245971410378249250
+#define RXC	3.20041258076506210122
+FORWARD(s_forward); /* spheroid */
+	double th1, c;
+	int i;
+
+	c = C * sin(lp.phi);
+	for (i = NITER; i; --i) {
+		lp.phi -= th1 = (sin(.5*lp.phi) + sin(lp.phi) - c) /
+			(.5*cos(.5*lp.phi)  + cos(lp.phi));
+		if (fabs(th1) < EPS) break;
+	}
+	xy.x = FXC * lp.lam * (1.0 + 2. * cos(lp.phi)/cos(0.5 * lp.phi));
+	xy.y = FYC * sin(0.5 * lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t;
+
+	lp.phi = RYC * xy.y;
+	if (fabs(lp.phi) > 1.) {
+		if (fabs(lp.phi) > ONETOL)	I_ERROR
+		else if (lp.phi < 0.) { t = -1.; lp.phi = -PI; }
+		else { t = 1.; lp.phi = PI; }
+	} else
+		lp.phi = 2. * asin(t = lp.phi);
+	lp.lam = RXC * xy.x / (1. + 2. * cos(lp.phi)/cos(0.5 * lp.phi));
+	lp.phi = RC * (t + sin(lp.phi));
+	if (fabs(lp.phi) > 1.)
+		if (fabs(lp.phi) > ONETOL)	I_ERROR
+		else			lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+	else
+		lp.phi = asin(lp.phi);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(mbtfpq) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_inv.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_inv.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_inv.c	(revision 256)
@@ -0,0 +1,32 @@
+/* general inverse projection */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_inv.c	4.5	93/06/12	GIE	REL";
+#endif
+#define PJ_LIB__
+#include <projects.h>
+#include <errno.h>
+# define EPS 1.0e-12
+	LP /* inverse projection entry */
+pj_inv(XY xy, PJ *P) {
+	LP lp;
+
+	/* can't do as much preliminary checking as with forward */
+	if (xy.x == HUGE_VAL || xy.y == HUGE_VAL) {
+		lp.lam = lp.phi = HUGE_VAL;
+		pj_errno = -15;
+	}
+	errno = pj_errno = 0;
+	xy.x = (xy.x * P->to_meter - P->x0) * P->ra; /* descale and de-offset */
+	xy.y = (xy.y * P->to_meter - P->y0) * P->ra;
+	lp = (*P->inv)(xy, P); /* inverse project */
+	if (pj_errno || (pj_errno = errno))
+		lp.lam = lp.phi = HUGE_VAL;
+	else {
+		lp.lam += P->lam0; /* reduce from del lp.lam */
+		if (!P->over)
+			lp.lam = adjlon(lp.lam); /* adjust longitude to CM */
+		if (P->geoc && fabs(fabs(lp.phi)-HALFPI) > EPS)
+			lp.phi = atan(P->one_es * tan(lp.phi));
+	}
+	return lp;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp4p.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp4p.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp4p.c	(revision 256)
@@ -0,0 +1,32 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_putp4p.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	C_x, C_y;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(putp4p, "Putnins P4'") "\n\tPCyl., Sph.";
+PROJ_HEAD(weren, "Werenskiold I") "\n\tPCyl., Sph.";
+FORWARD(s_forward); /* spheroid */
+	lp.phi = aasin(0.883883476 * sin(lp.phi));
+	xy.x = P->C_x * lp.lam * cos(lp.phi);
+	xy.x /= cos(lp.phi *= 0.333333333333333);
+	xy.y = P->C_y * sin(lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = aasin(xy.y / P->C_y);
+	lp.lam = xy.x * cos(lp.phi) / P->C_x;
+	lp.phi *= 3.;
+	lp.lam /= cos(lp.phi);
+	lp.phi = aasin(1.13137085 * sin(lp.phi));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
+	return P;
+}
+ENTRY0(putp4p) P->C_x = 0.874038744; P->C_y = 3.883251825; ENDENTRY(setup(P))
+ENTRY0(weren) P->C_x = 1.; P->C_y = 4.442882938; ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_krovak.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_krovak.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_krovak.c	(revision 256)
@@ -0,0 +1,268 @@
+/******************************************************************************
+ * $Id: PJ_krovak.c,v 1.4 2002/12/15 22:31:04 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the krovak (Krovak) projection.
+ *           Definition: http://www.ihsenergy.com/epsg/guid7.html#1.4.3
+ * Author:   Thomas Flemming, tf@ttqv.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2001, Thomas Flemming, tf@ttqv.com
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: PJ_krovak.c,v $
+ * Revision 1.4  2002/12/15 22:31:04  warmerda
+ * handle lon_0, k, and prime meridian properly
+ *
+ * Revision 1.3  2002/12/15 00:13:30  warmerda
+ * lat_0 may now be set by user, but still defaults to 49d30N
+ *
+ * Revision 1.2  2002/12/14 19:35:21  warmerda
+ * updated headers
+ *
+ */
+
+#define PROJ_PARMS__ \
+	double	C_x;
+#define PJ_LIB__
+
+#include <projects.h>
+#include <string.h>
+#include <stdio.h>
+
+PJ_CVSID("$Id: PJ_krovak.c,v 1.4 2002/12/15 22:31:04 warmerda Exp $");	
+
+PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Sph.";
+
+/**
+   NOTES: According to EPSG the full Krovak projection method should have
+          the following parameters.  Within PROJ.4 the azimuth, and pseudo
+          standard parallel are hardcoded in the algorithm and can't be 
+          altered from outside.  The others all have defaults to match the
+          common usage with Krovak projection.
+
+  lat_0 = latitude of centre of the projection
+         
+  lon_0 = longitude of centre of the projection
+  
+  ** = azimuth (true) of the centre line passing through the centre of the projection
+
+  ** = latitude of pseudo standard parallel
+   
+  k  = scale factor on the pseudo standard parallel
+  
+  x_0 = False Easting of the centre of the projection at the apex of the cone
+  
+  y_0 = False Northing of the centre of the projection at the apex of the cone
+
+ **/
+
+
+
+FORWARD(s_forward); /* spheroid */
+/* calculate xy from lat/lon */
+
+	char errmess[255];
+	char tmp[16];
+
+/* Constants, identical to inverse transform function */
+	double s45, s90, e2, e, alfa, uq, u0, g, k, k1, n0, ro0, ad, a, s0, n;
+	double gfi, u, fi0, lon17, lamdd, deltav, s, d, eps, ro;
+
+
+	s45 = 0.785398163397448;    /* 45� */
+	s90 = 2 * s45;
+	fi0 = P->phi0;    /* Latitude of projection centre 49� 30' */
+
+   /* Ellipsoid is used as Parameter in for.c and inv.c, therefore a must 
+      be set to 1 here.
+      Ellipsoid Bessel 1841 a = 6377397.155m 1/f = 299.1528128,
+      e2=0.006674372230614;
+   */
+	a =  1; /* 6377397.155; */
+	/* e2 = P->es;*/       /* 0.006674372230614; */
+	e2 = 0.006674372230614;
+	e = sqrt(e2);
+
+	alfa = sqrt(1. + (e2 * pow(cos(fi0), 4)) / (1. - e2));
+
+	uq = 1.04216856380474;      /* DU(2, 59, 42, 42.69689) */
+	u0 = asin(sin(fi0) / alfa);
+	g = pow(   (1. + e * sin(fi0)) / (1. - e * sin(fi0)) , alfa * e / 2.  );
+
+	k = tan( u0 / 2. + s45) / pow  (tan(fi0 / 2. + s45) , alfa) * g;
+
+	k1 = P->k0;
+	n0 = a * sqrt(1. - e2) / (1. - e2 * pow(sin(fi0), 2));
+	s0 = 1.37008346281555;       /* Latitude of pseudo standard parallel 78� 30'00" N */
+	n = sin(s0);
+	ro0 = k1 * n0 / tan(s0);
+	ad = s90 - uq;
+
+/* Transformation */
+
+	gfi =pow ( ((1. + e * sin(lp.phi)) /
+               (1. - e * sin(lp.phi))) , (alfa * e / 2.));
+
+	u= 2. * (atan(k * pow( tan(lp.phi / 2. + s45), alfa) / gfi)-s45);
+
+	deltav = - lp.lam * alfa;
+
+	s = asin(cos(ad) * sin(u) + sin(ad) * cos(u) * cos(deltav));
+	d = asin(cos(u) * sin(deltav) / cos(s));
+	eps = n * d;
+	ro = ro0 * pow(tan(s0 / 2. + s45) , n) / pow(tan(s / 2. + s45) , n)   ;
+
+   /* x and y are reverted! */
+	xy.y = ro * cos(eps) / a;
+	xy.x = ro * sin(eps) / a;
+
+#ifdef DEBUG
+	strcpy(errmess,"a: ");
+	strcpy(tmp,"        ");
+	ltoa((long)(a*1000000000),tmp,10);
+	strcat(errmess,tmp);
+	strcat(errmess,"e2: ");
+	strcpy(tmp,"        ");
+	ltoa((long)(e2*1000000000),tmp,10);
+	strcat(errmess,tmp);
+
+	MessageBox(NULL, errmess, NULL, 0);
+#endif
+
+
+	return (xy);
+}
+
+
+
+INVERSE(s_inverse); /* spheroid */
+	/* calculate lat/lon from xy */
+
+/* Constants, identisch wie in der Umkehrfunktion */
+	double s45, s90, fi0, e2, e, alfa, uq, u0, g, k, k1, n0, ro0, ad, a, s0, n;
+	double u, l24, lamdd, deltav, s, d, eps, ro, fi1, xy0, lon17;
+	int ok;
+
+	s45 = 0.785398163397448;    /* 45� */
+	s90 = 2 * s45;
+	fi0 = P->phi0;    /* Latitude of projection centre 49� 30' */
+
+
+   /* Ellipsoid is used as Parameter in for.c and inv.c, therefore a must 
+      be set to 1 here.
+      Ellipsoid Bessel 1841 a = 6377397.155m 1/f = 299.1528128,
+      e2=0.006674372230614;
+   */
+	a = 1; /* 6377397.155; */
+	/* e2 = P->es; */      /* 0.006674372230614; */
+	e2 = 0.006674372230614;
+	e = sqrt(e2);
+
+	alfa = sqrt(1. + (e2 * pow(cos(fi0), 4)) / (1. - e2));
+	uq = 1.04216856380474;      /* DU(2, 59, 42, 42.69689) */
+	u0 = asin(sin(fi0) / alfa);
+	g = pow(   (1. + e * sin(fi0)) / (1. - e * sin(fi0)) , alfa * e / 2.  );
+
+	k = tan( u0 / 2. + s45) / pow  (tan(fi0 / 2. + s45) , alfa) * g;
+
+	k1 = P->k0;
+	n0 = a * sqrt(1. - e2) / (1. - e2 * pow(sin(fi0), 2));
+	s0 = 1.37008346281555;       /* Latitude of pseudo standard parallel 78� 30'00" N */
+	n = sin(s0);
+	ro0 = k1 * n0 / tan(s0);
+	ad = s90 - uq;
+
+
+/* Transformation */
+   /* revert y, x*/
+	xy0=xy.x;
+	xy.x=xy.y;
+	xy.y=xy0;
+
+	ro = sqrt(xy.x * xy.x + xy.y * xy.y);
+	eps = atan2(xy.y, xy.x);
+	d = eps / sin(s0);
+	s = 2. * (atan(  pow(ro0 / ro, 1. / n) * tan(s0 / 2. + s45)) - s45);
+
+	u = asin(cos(ad) * sin(s) - sin(ad) * cos(s) * cos(d));
+	deltav = asin(cos(s) * sin(d) / cos(u));
+
+	lp.lam = P->lam0 - deltav / alfa;
+
+/* ITERATION FOR lp.phi */
+   fi1 = u;
+
+   ok = 0;
+   do
+   {
+   	lp.phi = 2. * ( atan( pow( k, -1. / alfa)  *
+                            pow( tan(u / 2. + s45) , 1. / alfa)  *
+                            pow( (1. + e * sin(fi1)) / (1. - e * sin(fi1)) , e / 2.)
+                           )  - s45);
+
+      if (fabs(fi1 - lp.phi) < 0.000000000000001) ok=1;
+      fi1 = lp.phi;
+
+   }
+   while (ok==0);
+
+   lp.lam -= P->lam0;
+
+   return (lp);
+}
+
+FREEUP; if (P) pj_dalloc(P); }
+
+ENTRY0(krovak)
+	double ts;
+	/* read some Parameters,
+	 * here Latitude Truescale */
+
+	ts = pj_param(P->params, "rlat_ts").f;
+	P->C_x = ts;
+	
+	/* we want Bessel as fixed ellipsoid */
+	P->a = 6377397.155;
+	P->e = sqrt(P->es = 0.006674372230614);
+
+        /* if latitude of projection center is not set, use 49d30'N */
+	if (!pj_param(P->params, "tlat_0").i)
+            P->phi0 = 0.863937979737193; 
+
+        /* if center long is not set use 42d30'E of Ferro - 17d40' for Ferro */
+        /* that will correspond to using longitudes relative to greenwich    */
+        /* as input and output, instead of lat/long relative to Ferro */
+	if (!pj_param(P->params, "tlon_0").i)
+            P->lam0 = 0.7417649320975901 - 0.308341501185665;
+; 
+
+        /* if scale not set default to 0.9999 */
+	if (!pj_param(P->params, "tk").i)
+            P->k0 = 0.9999;
+
+	/* always the same */
+        P->inv = s_inverse; 
+	P->fwd = s_forward;
+
+ENDENTRY(P)
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_geos.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_geos.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_geos.c	(revision 256)
@@ -0,0 +1,151 @@
+/*
+** libproj -- library of cartographic projections
+**
+** Copyright (c) 2004   Gerald I. Evenden
+*/
+static const char
+LIBPROJ_ID[] = "$Id: PJ_geos.c,v 1.1 2004/10/20 17:04:00 fwarmerdam Exp $";
+/*
+** Permission is hereby granted, free of charge, to any person obtaining
+** a copy of this software and associated documentation files (the
+** "Software"), to deal in the Software without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Software, and to
+** permit persons to whom the Software is furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be
+** included in all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#define PROJ_PARMS__ \
+	double	h; \
+	double  radius_p; \
+	double  radius_p2; \
+	double  radius_p_inv2; \
+	double  radius_g; \
+	double  radius_g_1; \
+	double  C;
+#define PJ_LIB__
+#include	<projects.h>
+
+PROJ_HEAD(geos, "Geostationary Satellite View") "\n\tAzi, Sph&Ell\n\th=";
+
+FORWARD(s_forward); /* spheroid */
+	double Vx, Vy, Vz, tmp;
+
+/* Calculation of the three components of the vector from satellite to
+** position on earth surface (lon,lat).*/
+	tmp = cos(lp.phi);
+	Vx = cos (lp.lam) * tmp;
+	Vy = sin (lp.lam) * tmp;
+	Vz = sin (lp.phi);
+/* Check visibility.*/
+	if (((P->radius_g - Vx) * Vx - Vy * Vy - Vz * Vz) < 0.) F_ERROR;
+/* Calculation based on view angles from satellite.*/
+	tmp = P->radius_g - Vx;
+	xy.x = P->radius_g_1 * atan(Vy / tmp);
+	xy.y = P->radius_g_1 * atan(Vz / hypot(Vy, tmp));
+	return (xy);
+}
+FORWARD(e_forward); /* ellipsoid */
+	double r, Vx, Vy, Vz, tmp;
+
+/* Calculation of geocentric latitude. */
+	lp.phi = atan (P->radius_p2 * tan (lp.phi));
+/* Calculation of the three components of the vector from satellite to
+** position on earth surface (lon,lat).*/
+	r = (P->radius_p) / hypot(P->radius_p * cos (lp.phi), sin (lp.phi));
+	Vx = r * cos (lp.lam) * cos (lp.phi);
+	Vy = r * sin (lp.lam) * cos (lp.phi);
+	Vz = r * sin (lp.phi);
+/* Check visibility. */
+	if (((P->radius_g - Vx) * Vx - Vy * Vy - Vz * Vz * P->radius_p_inv2) < 0.)
+		F_ERROR;
+/* Calculation based on view angles from satellite. */
+	tmp = P->radius_g - Vx;
+	xy.x = P->radius_g_1 * atan (Vy / tmp);
+	xy.y = P->radius_g_1 * atan (Vz / hypot (Vy, tmp));
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double Vx, Vy, Vz, a, b, c, det, k;
+
+/* Setting three components of vector from satellite to position.*/
+	Vx = -1.0;
+	Vy = tan (xy.x / (P->radius_g - 1.0));
+	Vz = tan (xy.y / (P->radius_g - 1.0)) * sqrt (1.0 + Vy * Vy);
+/* Calculation of terms in cubic equation and determinant.*/
+	a   = Vy * Vy + Vz * Vz + Vx * Vx;
+	b   = 2 * P->radius_g * Vx;
+	if ((det = (b * b) - 4 * a * P->C) < 0.) I_ERROR;
+/* Calculation of three components of vector from satellite to position.*/
+	k  = (-b - sqrt(det)) / (2 * a);
+	Vx = P->radius_g + k * Vx;
+	Vy *= k;
+	Vz *= k;
+/* Calculation of longitude and latitude.*/
+	lp.lam = atan2 (Vy, Vx);
+	lp.phi = atan (Vz * cos (lp.lam) / Vx);
+	return (lp);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double Vx, Vy, Vz, a, b, c, det, k;
+
+/* Setting three components of vector from satellite to position.*/
+	Vx = -1.0;
+	Vy = tan (xy.x / P->radius_g_1);
+	Vz = tan (xy.y / P->radius_g_1) * hypot(1.0, Vy);
+/* Calculation of terms in cubic equation and determinant.*/
+	a = Vz / P->radius_p;
+	a   = Vy * Vy + a * a + Vx * Vx;
+	b   = 2 * P->radius_g * Vx;
+	if ((det = (b * b) - 4 * a * P->C) < 0.) I_ERROR;
+/* Calculation of three components of vector from satellite to position.*/
+	k  = (-b - sqrt(det)) / (2. * a);
+	Vx = P->radius_g + k * Vx;
+	Vy *= k;
+	Vz *= k;
+/* Calculation of longitude and latitude.*/
+	lp.lam  = atan2 (Vy, Vx);
+	lp.phi = atan (Vz * cos (lp.lam) / Vx);
+	lp.phi = atan (P->radius_p_inv2 * tan (lp.phi));
+	return (lp);
+}
+FREEUP; if (P) free(P); }
+ENTRY0(geos)
+	if ((P->h = pj_param(P->params, "dh").f) <= 0.) E_ERROR(-30);
+	if (P->phi0) E_ERROR(-46);
+	P->radius_g = 1. + (P->radius_g_1 = P->h / P->a);
+	P->C  = P->radius_g * P->radius_g - 1.0;
+	if (P->es) {
+		P->radius_p      = sqrt (P->one_es);
+		P->radius_p2     = P->one_es;
+		P->radius_p_inv2 = P->rone_es;
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		P->radius_p = P->radius_p2 = P->radius_p_inv2 = 1.0;
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
+/*
+** $Log: PJ_geos.c,v $
+** Revision 1.1  2004/10/20 17:04:00  fwarmerdam
+** New
+**
+** Revision 1.2  2004/07/14 18:08:57  gie
+** corrected P->phi_0 to P->phi0
+**
+** Revision 1.1  2004/07/12 17:58:25  gie
+** Initial revision
+**
+*/
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_larr.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_larr.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_larr.c	(revision 256)
@@ -0,0 +1,15 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_larr.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(larr, "Larrivee") "\n\tMisc Sph, no inv.";
+#define SIXTH .16666666666666666
+FORWARD(s_forward); /* sphere */
+	xy.x = 0.5 * lp.lam * (1. + sqrt(cos(lp.phi)));
+	xy.y = lp.phi / (cos(0.5 * lp.phi) * cos(SIXTH * lp.lam));
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(larr) P->fwd = s_forward; P->inv = 0; P->es = 0.; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gnom.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gnom.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gnom.c	(revision 256)
@@ -0,0 +1,108 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_gnom.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	sinph0; \
+	double	cosph0; \
+	int		mode;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph.";
+#define EPS10 1.e-10
+#define N_POLE	0
+#define S_POLE 1
+#define EQUIT	2
+#define OBLIQ	3
+FORWARD(s_forward); /* spheroid */
+	double  coslam, cosphi, sinphi;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+		xy.y = cosphi * coslam;
+		break;
+	case OBLIQ:
+		xy.y = P->sinph0 * sinphi + P->cosph0 * cosphi * coslam;
+		break;
+	case S_POLE:
+		xy.y = - sinphi;
+		break;
+	case N_POLE:
+		xy.y = sinphi;
+		break;
+	}
+	if (xy.y <= EPS10) F_ERROR;
+	xy.x = (xy.y = 1. / xy.y) * cosphi * sin(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+		xy.y *= sinphi;
+		break;
+	case OBLIQ:
+		xy.y *= P->cosph0 * sinphi - P->sinph0 * cosphi * coslam;
+		break;
+	case N_POLE:
+		coslam = - coslam;
+	case S_POLE:
+		xy.y *= cosphi * coslam;
+		break;
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double  rh, cosz, sinz;
+
+	rh = hypot(xy.x, xy.y);
+	sinz = sin(lp.phi = atan(rh));
+	cosz = sqrt(1. - sinz * sinz);
+	if (fabs(rh) <= EPS10) {
+		lp.phi = P->phi0;
+		lp.lam = 0.;
+	} else {
+		switch (P->mode) {
+		case OBLIQ:
+			lp.phi = cosz * P->sinph0 + xy.y * sinz * P->cosph0 / rh;
+			if (fabs(lp.phi) >= 1.)
+				lp.phi = lp.phi > 0. ? HALFPI : - HALFPI;
+			else
+				lp.phi = asin(lp.phi);
+			xy.y = (cosz - P->sinph0 * sin(lp.phi)) * rh;
+			xy.x *= sinz * P->cosph0;
+			break;
+		case EQUIT:
+			lp.phi = xy.y * sinz / rh;
+			if (fabs(lp.phi) >= 1.)
+				lp.phi = lp.phi > 0. ? HALFPI : - HALFPI;
+			else
+				lp.phi = asin(lp.phi);
+			xy.y = cosz * rh;
+			xy.x *= sinz;
+			break;
+		case S_POLE:
+			lp.phi -= HALFPI;
+			break;
+		case N_POLE:
+			lp.phi = HALFPI - lp.phi;
+			xy.y = -xy.y;
+			break;
+		}
+		lp.lam = atan2(xy.x, xy.y);
+	}
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(gnom)
+	if (fabs(fabs(P->phi0) - HALFPI) < EPS10)
+		P->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+	else if (fabs(P->phi0) < EPS10)
+		P->mode = EQUIT;
+	else {
+		P->mode = OBLIQ;
+		P->sinph0 = sin(P->phi0);
+		P->cosph0 = cos(P->phi0);
+	}
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lcca.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lcca.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lcca.c	(revision 256)
@@ -0,0 +1,76 @@
+static const char RCS_ID[] = "$Id: PJ_lcca.c,v 1.1 2003/03/04 02:59:41 warmerda Exp $";
+/* PROJ.4 Cartographic Projection System -- Revision Log:
+**$Log: PJ_lcca.c,v $
+**Revision 1.1  2003/03/04 02:59:41  warmerda
+**New
+**
+*/
+#define MAX_ITER 10
+#define DEL_TOL 1e-12
+#define PROJ_PARMS__ \
+	double	*en; \
+	double	r0, l, M0; \
+	double	C;
+#define PJ_LIB__
+#include	<projects.h>
+
+PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative")
+	"\n\tConic, Sph&Ell\n\tlat_0=";
+
+	static double /* func to compute dr */
+fS(double S, double C) {
+		return(S * ( 1. + S * S * C));
+}
+	static double /* deriv of fs */
+fSp(double S, double C) {
+	return(1. + 3.* S * S * C);
+}
+FORWARD(e_forward); /* ellipsoid */
+	double S, S3, r, dr;
+	
+	S = pj_mlfn(lp.phi, sin(lp.phi), cos(lp.phi), P->en) - P->M0;
+	dr = fS(S, P->C);
+	r = P->r0 - dr;
+	xy.x = P->k0 * (r * sin( lp.lam *= P->l ) );
+	xy.y = P->k0 * (P->r0 - r * cos(lp.lam) );
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid & spheroid */
+	double theta, dr, S, dif;
+	int i;
+
+	xy.x /= P->k0;
+	xy.y /= P->k0;
+	theta = atan2(xy.x , P->r0 - xy.y);
+	dr = xy.y - xy.x * tan(0.5 * theta);
+	lp.lam = theta / P->l;
+	S = dr;
+	for (i = MAX_ITER; i ; --i) {
+		S -= (dif = (fS(S, P->C) - dr) / fSp(S, P->C));
+		if (fabs(dif) < DEL_TOL) break;
+	}
+	if (!i) I_ERROR
+	lp.phi = pj_inv_mlfn(S + P->M0, P->es, P->en);
+	return (lp);
+}
+FREEUP; if (P) { if (P->en) pj_dalloc(P->en); pj_dalloc(P); } }
+ENTRY0(lcca)
+	double s2p0, N0, R0, tan0, tan20;
+
+	if (!(P->en = pj_enfn(P->es))) E_ERROR_0;
+	if (!pj_param(P->params, "tlat_0").i) E_ERROR(50);
+	if (P->phi0 == 0.) E_ERROR(51);
+	P->l = sin(P->phi0);
+	P->M0 = pj_mlfn(P->phi0, P->l, cos(P->phi0), P->en);
+	s2p0 = P->l * P->l;
+	R0 = 1. / (1. - P->es * s2p0);
+	N0 = sqrt(R0);
+	R0 *= P->one_es * N0;
+	tan0 = tan(P->phi0);
+	tan20 = tan0 * tan0;
+	P->r0 = N0 / tan0;
+	P->C = 1. / (6. * R0 * N0);
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+ENDENTRY(P)
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gn_sinu.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gn_sinu.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gn_sinu.c	(revision 256)
@@ -0,0 +1,104 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_gn_sinu.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	*en; \
+	double	m, n, C_x, C_y;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph.\n\tm= n=";
+PROJ_HEAD(sinu, "Sinusoidal (Sanson-Flamsteed)") "\n\tPCyl, Sph&Ell";
+PROJ_HEAD(eck6, "Eckert VI") "\n\tPCyl, Sph.";
+PROJ_HEAD(mbtfps, "McBryde-Thomas Flat-Polar Sinusoidal") "\n\tPCyl, Sph.";
+#define EPS10	1e-10
+#define MAX_ITER 8
+#define LOOP_TOL 1e-7
+/* Ellipsoidal Sinusoidal only */
+FORWARD(e_forward); /* ellipsoid */
+	double s, c;
+
+	xy.y = pj_mlfn(lp.phi, s = sin(lp.phi), c = cos(lp.phi), P->en);
+	xy.x = lp.lam * c / sqrt(1. - P->es * s * s);
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double s;
+
+	if ((s = fabs(lp.phi = pj_inv_mlfn(xy.y, P->es, P->en))) < HALFPI) {
+		s = sin(lp.phi);
+		lp.lam = xy.x * sqrt(1. - P->es * s * s) / cos(lp.phi);
+	} else if ((s - EPS10) < HALFPI)
+		lp.lam = 0.;
+	else I_ERROR;
+	return (lp);
+}
+/* General spherical sinusoidals */
+FORWARD(s_forward); /* sphere */
+	if (!P->m)
+		lp.phi = P->n != 1. ? aasin(P->n * sin(lp.phi)): lp.phi;
+	else {
+		double k, V;
+		int i;
+
+		k = P->n * sin(lp.phi);
+		for (i = MAX_ITER; i ; --i) {
+			lp.phi -= V = (P->m * lp.phi + sin(lp.phi) - k) /
+				(P->m + cos(lp.phi));
+			if (fabs(V) < LOOP_TOL)
+				break;
+		}
+		if (!i)
+			F_ERROR
+	}
+	xy.x = P->C_x * lp.lam * (P->m + cos(lp.phi));
+	xy.y = P->C_y * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* sphere */
+	double s;
+
+	xy.y /= P->C_y;
+	lp.phi = P->m ? aasin((P->m * xy.y + sin(xy.y)) / P->n) :
+		( P->n != 1. ? aasin(sin(xy.y) / P->n) : xy.y );
+	lp.lam = xy.x / (P->C_x * (P->m + cos(xy.y)));
+	return (lp);
+}
+FREEUP; if (P) { if (P->en) pj_dalloc(P->en); pj_dalloc(P); } }
+	static void /* for spheres, only */
+setup(PJ *P) {
+	P->es = 0;
+	P->C_x = (P->C_y = sqrt((P->m + 1.) / P->n))/(P->m + 1.);
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+}
+ENTRY1(sinu, en)
+	if (!(P->en = pj_enfn(P->es)))
+		E_ERROR_0;
+	if (P->es) {
+		P->en = pj_enfn(P->es);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		P->n = 1.;
+		P->m = 0.;
+		setup(P);
+	}
+ENDENTRY(P)
+ENTRY1(eck6, en)
+	P->m = 1.;
+	P->n = 2.570796326794896619231321691;
+	setup(P);
+ENDENTRY(P)
+ENTRY1(mbtfps, en)
+	P->m = 0.5;
+	P->n = 1.785398163397448309615660845;
+	setup(P);
+ENDENTRY(P)
+ENTRY1(gn_sinu, en)
+	if (pj_param(P->params, "tn").i && pj_param(P->params, "tm").i) {
+		P->n = pj_param(P->params, "dn").f;
+		P->m = pj_param(P->params, "dm").f;
+	} else
+		E_ERROR(-99)
+	setup(P);
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_init.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_init.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_init.c	(revision 256)
@@ -0,0 +1,406 @@
+/******************************************************************************
+ * $Id: pj_init.c,v 1.16 2004/09/08 15:23:37 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Initialize projection object from string definition.  Includes
+ *           pj_init(), pj_init_plus() and pj_free() function.
+ * Author:   Gerald Evenden, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ * Copyright (c) 2002, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_init.c,v $
+ * Revision 1.16  2004/09/08 15:23:37  warmerda
+ * added new error for unknown prime meridians
+ *
+ * Revision 1.15  2004/05/05 01:45:41  warmerda
+ * Made sword even longer.
+ *
+ * Revision 1.14  2004/05/05 01:45:00  warmerda
+ * Make sword buffer larger so long +towgs84 parameters don't get split.
+ *
+ * Revision 1.13  2003/09/16 03:46:21  warmerda
+ * dont use default ellps if any earth model info is set: bug 386
+ *
+ * Revision 1.12  2003/08/21 02:15:59  warmerda
+ * improve MAX_ARG checking
+ *
+ * Revision 1.11  2003/06/09 21:23:16  warmerda
+ * ensure start is initialized at very beginning of pj_init()
+ *
+ * Revision 1.10  2003/03/16 16:38:24  warmerda
+ * Modified get_opt() to terminate reading the definition when a new
+ * definition (a word starting with '<') is encountered, in addition to when
+ * the definition terminator '<>' is encountered, so that unterminated
+ * definitions like those in the distributed esri file will work properly.
+ * http://bugzilla.remotesensing.org/show_bug.cgi?id=302
+ *
+ * Revision 1.9  2002/12/14 20:15:02  warmerda
+ * added geocentric support, updated headers
+ *
+ */
+
+#define PJ_LIB__
+#include <projects.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+PJ_CVSID("$Id: pj_init.c,v 1.16 2004/09/08 15:23:37 warmerda Exp $");
+
+static paralist *start;
+extern FILE *pj_open_lib(char *, char *);
+
+/************************************************************************/
+/*                              get_opt()                               */
+/************************************************************************/
+static paralist *
+get_opt(FILE *fid, char *name, paralist *next) {
+    char sword[302], *word = sword+1;
+    int first = 1, len, c;
+
+    len = strlen(name);
+    *sword = 't';
+    while (fscanf(fid, "%300s", word) == 1) {
+        if (*word == '#') /* skip comments */
+            while((c = fgetc(fid)) != EOF && c != '\n') ;
+        else if (*word == '<') { /* control name */
+            if (first && !strncmp(name, word + 1, len)
+                && word[len + 1] == '>')
+                first = 0;
+            else if (!first && *word == '<') {
+                while((c = fgetc(fid)) != EOF && c != '\n') ;
+                break;
+            }
+        } else if (!first && !pj_param(start, sword).i) {
+            /* don't default ellipse if datum, ellps or any earth model
+               information is set. */
+            if( strncmp(word,"ellps=",6) != 0 
+                || (!pj_param(start, "tdatum").i 
+                    && !pj_param(start, "tellps").i 
+                    && !pj_param(start, "ta").i 
+                    && !pj_param(start, "tb").i 
+                    && !pj_param(start, "trf").i 
+                    && !pj_param(start, "tf").i) )
+            {
+                next = next->next = pj_mkparam(word);
+            }
+        }
+    }
+
+    if (errno == 25)
+        errno = 0;
+    return next;
+}
+
+/************************************************************************/
+/*                            get_defaults()                            */
+/************************************************************************/
+static paralist *
+get_defaults(paralist *next, char *name) {
+	FILE *fid;
+
+	if (fid = pj_open_lib("proj_def.dat", "rt")) {
+		next = get_opt(fid, "general", next);
+		rewind(fid);
+		next = get_opt(fid, name, next);
+		(void)fclose(fid);
+	}
+	if (errno)
+		errno = 0; /* don't care if can't open file */
+	return next;
+}
+
+/************************************************************************/
+/*                              get_init()                              */
+/************************************************************************/
+static paralist *
+get_init(paralist *next, char *name) {
+	char fname[MAX_PATH_FILENAME+ID_TAG_MAX+3], *opt;
+	FILE *fid;
+
+	(void)strncpy(fname, name, MAX_PATH_FILENAME + ID_TAG_MAX + 1);
+	if (opt = strrchr(fname, ':'))
+		*opt++ = '\0';
+	else { pj_errno = -3; return(0); }
+	if (fid = pj_open_lib(fname, "rt"))
+		next = get_opt(fid, opt, next);
+	else
+		return(0);
+	(void)fclose(fid);
+	if (errno == 25)
+		errno = 0; /* unknown problem with some sys errno<-25 */
+	return next;
+}
+
+/************************************************************************/
+/*                            pj_init_plus()                            */
+/*                                                                      */
+/*      Same as pj_init() except it takes one argument string with      */
+/*      individual arguments preceeded by '+', such as "+proj=utm       */
+/*      +zone=11 +ellps=WGS84".                                         */
+/************************************************************************/
+
+PJ *
+pj_init_plus( const char *definition )
+
+{
+#define MAX_ARG 200
+    char	*argv[MAX_ARG];
+    char	*defn_copy;
+    int		argc = 0, i;
+    PJ	        *result;
+    
+    /* make a copy that we can manipulate */
+    defn_copy = (char *) pj_malloc( strlen(definition)+1 );
+    strcpy( defn_copy, definition );
+
+    /* split into arguments based on '+' and trim white space */
+
+    for( i = 0; defn_copy[i] != '\0'; i++ )
+    {
+        switch( defn_copy[i] )
+        {
+          case '+':
+            if( i == 0 || defn_copy[i-1] == '\0' )
+            {
+                if( argc+1 == MAX_ARG )
+                {
+                    pj_errno = -44;
+                    return NULL;
+                }
+                
+                argv[argc++] = defn_copy + i + 1;
+            }
+            break;
+
+          case ' ':
+          case '\t':
+          case '\n':
+            defn_copy[i] = '\0';
+            break;
+
+          default:
+            /* do nothing */;
+        }
+    }
+
+    /* perform actual initialization */
+    result = pj_init( argc, argv );
+
+    pj_dalloc( defn_copy );
+
+    return result;
+}
+
+/************************************************************************/
+/*                              pj_init()                               */
+/*                                                                      */
+/*      Main entry point for initialing a PJ projections                */
+/*      definition.  Note that the projection specific function is      */
+/*      called to do the initial allocation so it can be created        */
+/*      large enough to hold projection specific parameters.            */
+/************************************************************************/
+
+PJ *
+pj_init(int argc, char **argv) {
+	char *s, *name;
+	PJ *(*proj)(PJ *);
+	paralist *curr;
+	int i;
+	PJ *PIN = 0;
+
+	errno = pj_errno = 0;
+        start = NULL;
+
+	/* put arguments into internal linked list */
+	if (argc <= 0) { pj_errno = -1; goto bum_call; }
+	for (i = 0; i < argc; ++i)
+		if (i)
+			curr = curr->next = pj_mkparam(argv[i]);
+		else
+			start = curr = pj_mkparam(argv[i]);
+	if (pj_errno) goto bum_call;
+
+	/* check if +init present */
+	if (pj_param(start, "tinit").i) {
+		paralist *last = curr;
+
+		if (!(curr = get_init(curr, pj_param(start, "sinit").s)))
+			goto bum_call;
+		if (curr == last) { pj_errno = -2; goto bum_call; }
+	}
+
+	/* find projection selection */
+	if (!(name = pj_param(start, "sproj").s))
+		{ pj_errno = -4; goto bum_call; }
+	for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
+	if (!s) { pj_errno = -5; goto bum_call; }
+
+	/* set defaults, unless inhibited */
+	if (!pj_param(start, "bno_defs").i)
+		curr = get_defaults(curr, name);
+	proj = (PJ *(*)(PJ *)) pj_list[i].proj;
+
+	/* allocate projection structure */
+	if (!(PIN = (*proj)(0))) goto bum_call;
+	PIN->params = start;
+        PIN->is_latlong = 0;
+        PIN->is_geocent = 0;
+
+        /* set datum parameters */
+        if (pj_datum_set(start, PIN)) goto bum_call;
+
+	/* set ellipsoid/sphere parameters */
+	if (pj_ell_set(start, &PIN->a, &PIN->es)) goto bum_call;
+
+	PIN->e = sqrt(PIN->es);
+	PIN->ra = 1. / PIN->a;
+	PIN->one_es = 1. - PIN->es;
+	if (PIN->one_es == 0.) { pj_errno = -6; goto bum_call; }
+	PIN->rone_es = 1./PIN->one_es;
+
+        /* Now that we have ellipse information check for WGS84 datum */
+        if( PIN->datum_type == PJD_3PARAM 
+            && PIN->datum_params[0] == 0.0
+            && PIN->datum_params[1] == 0.0
+            && PIN->datum_params[2] == 0.0
+            && PIN->a == 6378137.0
+            && ABS(PIN->es - 0.006694379990) < 0.000000000050 )/*WGS84/GRS80*/
+        {
+            PIN->datum_type = PJD_WGS84;
+        }
+        
+	/* set PIN->geoc coordinate system */
+	PIN->geoc = (PIN->es && pj_param(start, "bgeoc").i);
+
+	/* over-ranging flag */
+	PIN->over = pj_param(start, "bover").i;
+
+	/* central meridian */
+	PIN->lam0=pj_param(start, "rlon_0").f;
+
+	/* central latitude */
+	PIN->phi0 = pj_param(start, "rlat_0").f;
+
+	/* false easting and northing */
+	PIN->x0 = pj_param(start, "dx_0").f;
+	PIN->y0 = pj_param(start, "dy_0").f;
+
+	/* general scaling factor */
+	if (pj_param(start, "tk_0").i)
+		PIN->k0 = pj_param(start, "dk_0").f;
+	else if (pj_param(start, "tk").i)
+		PIN->k0 = pj_param(start, "dk").f;
+	else
+		PIN->k0 = 1.;
+	if (PIN->k0 <= 0.) {
+		pj_errno = -31;
+		goto bum_call;
+	}
+
+	/* set units */
+	s = 0;
+	if (name = pj_param(start, "sunits").s) { 
+		for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i) ;
+		if (!s) { pj_errno = -7; goto bum_call; }
+		s = pj_units[i].to_meter;
+	}
+	if (s || (s = pj_param(start, "sto_meter").s)) {
+		PIN->to_meter = strtod(s, &s);
+		if (*s == '/') /* ratio number */
+			PIN->to_meter /= strtod(++s, 0);
+		PIN->fr_meter = 1. / PIN->to_meter;
+	} else
+		PIN->to_meter = PIN->fr_meter = 1.;
+
+	/* prime meridian */
+	s = 0;
+	if (name = pj_param(start, "spm").s) { 
+            const char *value = NULL;
+            char *next_str = NULL;
+
+            for (i = 0; pj_prime_meridians[i].id != NULL; ++i )
+            {
+                if( strcmp(name,pj_prime_meridians[i].id) == 0 )
+                {
+                    value = pj_prime_meridians[i].defn;
+                    break;
+                }
+            }
+            
+            if( value == NULL 
+                && (dmstor(name,&next_str) != 0.0  || *name == '0')
+                && *next_str == '\0' )
+                value = name;
+
+            if (!value) { pj_errno = -46; goto bum_call; }
+            PIN->from_greenwich = dmstor(value,NULL);
+	}
+        else
+            PIN->from_greenwich = 0.0;
+
+	/* projection specific initialization */
+	if (!(PIN = (*proj)(PIN)) || errno || pj_errno) {
+bum_call: /* cleanup error return */
+		if (!pj_errno)
+			pj_errno = errno;
+		if (PIN)
+			pj_free(PIN);
+		else
+			for ( ; start; start = curr) {
+				curr = start->next;
+				pj_dalloc(start);
+			}
+		PIN = 0;
+	}
+	return PIN;
+}
+
+/************************************************************************/
+/*                              pj_free()                               */
+/*                                                                      */
+/*      This is the application callable entry point for destroying     */
+/*      a projection definition.  It does work generic to all           */
+/*      projection types, and then calls the projection specific        */
+/*      free function (P->pfree()) to do local work.  This maps to      */
+/*      the FREEUP code in the individual projection source files.      */
+/************************************************************************/
+
+void
+pj_free(PJ *P) {
+	if (P) {
+		paralist *t = P->params, *n;
+
+		/* free parameter list elements */
+		for (t = P->params; t; t = n) {
+			n = t->next;
+			pj_dalloc(t);
+		}
+
+		/* free projection parameters */
+		P->pfree(P);
+	}
+}
+
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_oea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_oea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_oea.c	(revision 256)
@@ -0,0 +1,61 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_oea.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	theta; \
+	double	m, n; \
+	double	two_r_m, two_r_n, rm, rn, hm, hn; \
+	double	cp0, sp0;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta=";
+FORWARD(s_forward); /* sphere */
+	double Az, M, N, cp, sp, cl, shz;
+
+	cp = cos(lp.phi);
+	sp = sin(lp.phi);
+	cl = cos(lp.lam);
+	Az = aatan2(cp * sin(lp.lam), P->cp0 * sp - P->sp0 * cp * cl) + P->theta;
+	shz = sin(0.5 * aacos(P->sp0 * sp + P->cp0 * cp * cl));
+	M = aasin(shz * sin(Az));
+	N = aasin(shz * cos(Az) * cos(M) / cos(M * P->two_r_m));
+	xy.y = P->n * sin(N * P->two_r_n);
+	xy.x = P->m * sin(M * P->two_r_m) * cos(N) / cos(N * P->two_r_n);
+	return (xy);
+}
+INVERSE(s_inverse); /* sphere */
+	double N, M, xp, yp, z, Az, cz, sz, cAz;
+
+	N = P->hn * aasin(xy.y * P->rn);
+	M = P->hm * aasin(xy.x * P->rm * cos(N * P->two_r_n) / cos(N));
+	xp = 2. * sin(M);
+	yp = 2. * sin(N) * cos(M * P->two_r_m) / cos(M);
+	cAz = cos(Az = aatan2(xp, yp) - P->theta);
+	z = 2. * aasin(0.5 * hypot(xp, yp));
+	sz = sin(z);
+	cz = cos(z);
+	lp.phi = aasin(P->sp0 * cz + P->cp0 * sz * cAz);
+	lp.lam = aatan2(sz * sin(Az),
+		P->cp0 * cz - P->sp0 * sz * cAz);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(oea)
+	if (((P->n = pj_param(P->params, "dn").f) <= 0.) ||
+		((P->m = pj_param(P->params, "dm").f) <= 0.))
+		E_ERROR(-39)
+	else {
+		P->theta = pj_param(P->params, "rtheta").f;
+		P->sp0 = sin(P->phi0);
+		P->cp0 = cos(P->phi0);
+		P->rn = 1./ P->n;
+		P->rm = 1./ P->m;
+		P->two_r_n = 2. * P->rn;
+		P->two_r_m = 2. * P->rm;
+		P->hm = 0.5 * P->m;
+		P->hn = 0.5 * P->n;
+		P->fwd = s_forward;
+		P->inv = s_inverse;
+		P->es = 0.;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_august.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_august.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_august.c	(revision 256)
@@ -0,0 +1,21 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_august.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(august, "August Epicycloidal") "\n\tMisc Sph, no inv.";
+#define M 1.333333333333333
+FORWARD(s_forward); /* spheroid */
+	double t, c1, c, x1, x12, y1, y12;
+
+	t = tan(.5 * lp.phi);
+	c1 = sqrt(1. - t * t);
+	c = 1. + c1 * cos(lp.lam *= .5);
+	x1 = sin(lp.lam) *  c1 / c;
+	y1 =  t / c;
+	xy.x = M * x1 * (3. + (x12 = x1 * x1) - 3. * (y12 = y1 *  y1));
+	xy.y = M * y1 * (3. + 3. * x12 - y12);
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(august) P->inv = 0; P->fwd = s_forward; P->es = 0.; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eqc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eqc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eqc.c	(revision 256)
@@ -0,0 +1,26 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eqc.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double rc;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Caree)")
+	"\n\tCyl, Sph\n\tlat_ts=";
+FORWARD(s_forward); /* spheroid */
+	xy.x = P->rc * lp.lam;
+	xy.y = lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y;
+	lp.lam = xy.x / P->rc;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(eqc)
+	if ((P->rc = cos(pj_param(P->params, "rlat_ts").f)) <= 0.) E_ERROR(-24);
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_hammer.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_hammer.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_hammer.c	(revision 256)
@@ -0,0 +1,32 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_hammer.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double w; \
+	double m, rm;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
+	"\n\tMisc Sph, no inv.\n\tW= M=";
+FORWARD(s_forward); /* spheroid */
+	double cosphi, d;
+
+	d = sqrt(2./(1. + (cosphi = cos(lp.phi)) * cos(lp.lam *= P->w)));
+	xy.x = P->m * d * cosphi * sin(lp.lam);
+	xy.y = P->rm * d * sin(lp.phi);
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(hammer)
+	if (pj_param(P->params, "tW").i) {
+		if ((P->w = fabs(pj_param(P->params, "dW").f)) <= 0.) E_ERROR(-27);
+	} else
+		P->w = .5;
+	if (pj_param(P->params, "tM").i) {
+		if ((P->m = fabs(pj_param(P->params, "dM").f)) <= 0.) E_ERROR(-27);
+	} else
+		P->m = 1.;
+	P->rm = 1. / P->m;
+	P->m /= P->w;
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nocol.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nocol.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nocol.c	(revision 256)
@@ -0,0 +1,41 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_nocol.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(nicol, "Nicolosi Globular") "\n\tMisc Sph, no inv.";
+#define EPS	1e-10
+FORWARD(s_forward); /* spheroid */
+	if (fabs(lp.lam) < EPS) {
+		xy.x = 0;
+		xy.y = lp.phi;
+	} else if (fabs(lp.phi) < EPS) {
+		xy.x = lp.lam;
+		xy.y = 0.;
+	} else if (fabs(fabs(lp.lam) - HALFPI) < EPS) {
+		xy.x = lp.lam * cos(lp.phi);
+		xy.y = HALFPI * sin(lp.phi);
+	} else if (fabs(fabs(lp.phi) - HALFPI) < EPS) {
+		xy.x = 0;
+		xy.y = lp.phi;
+	} else {
+		double tb, c, d, m, n, r2, sp;
+
+		tb = HALFPI / lp.lam - lp.lam / HALFPI;
+		c = lp.phi / HALFPI;
+		d = (1 - c * c)/((sp = sin(lp.phi)) - c);
+		r2 = tb / d;
+		r2 *= r2;
+		m = (tb * sp / d - 0.5 * tb)/(1. + r2);
+		n = (sp / r2 + 0.5 * d)/(1. + 1./r2);
+		xy.x = cos(lp.phi);
+		xy.x = sqrt(m * m + xy.x * xy.x / (1. + r2));
+		xy.x = HALFPI * ( m + (lp.lam < 0. ? -xy.x : xy.x));
+		xy.y = sqrt(n * n - (sp * sp / r2 + d * sp - 1.) /
+			(1. + 1./r2));
+		xy.y = HALFPI * ( n + (lp.phi < 0. ? xy.y : -xy.y ));
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(nicol) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_hatano.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_hatano.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_hatano.c	(revision 256)
@@ -0,0 +1,53 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_hatano.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph.";
+#define NITER	20
+#define EPS	1e-7
+#define ONETOL 1.000001
+#define CN	2.67595
+#define CS	2.43763
+#define RCN	0.37369906014686373063
+#define RCS	0.41023453108141924738
+#define FYCN	1.75859
+#define FYCS	1.93052
+#define RYCN	0.56863737426006061674
+#define RYCS	0.51799515156538134803
+#define FXC	0.85
+#define RXC	1.17647058823529411764
+FORWARD(s_forward); /* spheroid */
+	double th1, c;
+	int i;
+
+	c = sin(lp.phi) * (lp.phi < 0. ? CS : CN);
+	for (i = NITER; i; --i) {
+		lp.phi -= th1 = (lp.phi + sin(lp.phi) - c) / (1. + cos(lp.phi));
+		if (fabs(th1) < EPS) break;
+	}
+	xy.x = FXC * lp.lam * cos(lp.phi *= .5);
+	xy.y = sin(lp.phi) * (lp.phi < 0. ? FYCS : FYCN);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double th;
+
+	th = xy.y * ( xy.y < 0. ? RYCS : RYCN);
+	if (fabs(th) > 1.)
+		if (fabs(th) > ONETOL)	I_ERROR
+		else			th = th > 0. ? HALFPI : - HALFPI;
+	else
+		th = asin(th);
+	lp.lam = RXC * xy.x / cos(th);
+	th += th;
+	lp.phi = (th + sin(th)) * (xy.y < 0. ? RCS : RCN);
+	if (fabs(lp.phi) > 1.)
+		if (fabs(lp.phi) > ONETOL)	I_ERROR
+		else			lp.phi = lp.phi > 0. ? HALFPI : - HALFPI;
+	else
+		lp.phi = asin(lp.phi);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(hatano) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_chamb.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_chamb.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_chamb.c	(revision 256)
@@ -0,0 +1,115 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_chamb.c	4.1	94/02/15	GIE	REL";
+#endif
+typedef struct { double r, Az; } VECT;
+#define PROJ_PARMS__ \
+	struct { /* control point data */ \
+		double phi, lam; \
+		double cosphi, sinphi; \
+		VECT v; \
+		XY	p; \
+		double Az; \
+	} c[3]; \
+	XY p; \
+	double beta_0, beta_1, beta_2;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(chamb, "Chamberlin Trimetric") "\n\tMisc Sph, no inv."
+"\n\tlat_1= lon_1= lat_2= lon_2= lat_3= lon_3=";
+#include	<stdio.h>
+#define THIRD 0.333333333333333333
+#define TOL 1e-9
+	static VECT /* distance and azimuth from point 1 to point 2 */
+vect(double dphi, double c1, double s1, double c2, double s2, double dlam) {
+	VECT v;
+	double cdl, dp, dl;
+
+	cdl = cos(dlam);
+	if (fabs(dphi) > 1. || fabs(dlam) > 1.)
+		v.r = aacos(s1 * s2 + c1 * c2 * cdl);
+	else { /* more accurate for smaller distances */
+		dp = sin(.5 * dphi);
+		dl = sin(.5 * dlam);
+		v.r = 2. * aasin(sqrt(dp * dp + c1 * c2 * dl * dl));
+	}
+	if (fabs(v.r) > TOL)
+		v.Az = atan2(c2 * sin(dlam), c1 * s2 - s1 * c2 * cdl);
+	else
+		v.r = v.Az = 0.;
+	return v;
+}
+	static double /* law of cosines */
+lc(double b,double c,double a) {
+	return aacos(.5 * (b * b + c * c - a * a) / (b * c));
+}
+FORWARD(s_forward); /* spheroid */
+	double sinphi, cosphi, a;
+	VECT v[3];
+	int i, j;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	for (i = 0; i < 3; ++i) { /* dist/azimiths from control */
+		v[i] = vect(lp.phi - P->c[i].phi, P->c[i].cosphi, P->c[i].sinphi,
+			cosphi, sinphi, lp.lam - P->c[i].lam);
+		if ( ! v[i].r)
+			break;
+		v[i].Az = adjlon(v[i].Az - P->c[i].v.Az);
+	}
+	if (i < 3) /* current point at control point */
+		xy = P->c[i].p;
+	else { /* point mean of intersepts */
+		xy = P->p;
+		for (i = 0; i < 3; ++i) {
+			j = i == 2 ? 0 : i + 1;
+			a = lc(P->c[i].v.r, v[i].r, v[j].r);
+			if (v[i].Az < 0.)
+				a = -a;
+			if (! i) { /* coord comp unique to each arc */
+				xy.x += v[i].r * cos(a);
+				xy.y -= v[i].r * sin(a);
+			} else if (i == 1) {
+				a = P->beta_1 - a;
+				xy.x -= v[i].r * cos(a);
+				xy.y -= v[i].r * sin(a);
+			} else {
+				a = P->beta_2 - a;
+				xy.x += v[i].r * cos(a);
+				xy.y += v[i].r * sin(a);
+			}
+		}
+		xy.x *= THIRD; /* mean of arc intercepts */
+		xy.y *= THIRD;
+	}
+	return xy;
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(chamb)
+	int i, j;
+	char line[10];
+
+	for (i = 0; i < 3; ++i) { /* get control point locations */
+		(void)sprintf(line, "rlat_%d", i+1);
+		P->c[i].phi = pj_param(P->params, line).f;
+		(void)sprintf(line, "rlon_%d", i+1);
+		P->c[i].lam = pj_param(P->params, line).f;
+		P->c[i].lam = adjlon(P->c[i].lam - P->lam0);
+		P->c[i].cosphi = cos(P->c[i].phi);
+		P->c[i].sinphi = sin(P->c[i].phi);
+	}
+	for (i = 0; i < 3; ++i) { /* inter ctl pt. distances and azimuths */
+		j = i == 2 ? 0 : i + 1;
+		P->c[i].v = vect(P->c[j].phi - P->c[i].phi, P->c[i].cosphi, P->c[i].sinphi,
+			P->c[j].cosphi, P->c[j].sinphi, P->c[j].lam - P->c[i].lam);
+		if (! P->c[i].v.r) E_ERROR(-25);
+		/* co-linearity problem ignored for now */
+	}
+	P->beta_0 = lc(P->c[0].v.r, P->c[2].v.r, P->c[1].v.r);
+	P->beta_1 = lc(P->c[0].v.r, P->c[1].v.r, P->c[2].v.r);
+	P->beta_2 = PI - P->beta_0;
+	P->p.y = 2. * (P->c[0].p.y = P->c[1].p.y = P->c[2].v.r * sin(P->beta_0));
+	P->c[2].p.y = 0.;
+	P->c[0].p.x = - (P->c[1].p.x = 0.5 * P->c[0].v.r);
+	P->p.x = P->c[2].p.x = P->c[0].p.x + P->c[2].v.r * cos(P->beta_0);
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_imw_p.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_imw_p.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_imw_p.c	(revision 256)
@@ -0,0 +1,154 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_imw_p.c	4.1	94/05/22	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	P, Pp, Q, Qp, R_1, R_2, sphi_1, sphi_2, C2; \
+	double	phi_1, phi_2, lam_1; \
+	double	*en; \
+	int	mode; /* = 0, phi_1 and phi_2 != 0, = 1, phi_1 = 0, = -1 phi_2 = 0 */
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(imw_p, "International Map of the World Polyconic")
+	"\n\tMod. Polyconic, Ell\n\tlat_1= and lat_2= [lon_1=]";
+#define TOL 1e-10
+#define EPS 1e-10
+	static int
+phi12(PJ *P, double *del, double *sig) {
+	int err = 0;
+
+	if (!pj_param(P->params, "tlat_1").i ||
+		!pj_param(P->params, "tlat_2").i) {
+		err = -41;
+	} else {
+		P->phi_1 = pj_param(P->params, "rlat_1").f;
+		P->phi_2 = pj_param(P->params, "rlat_2").f;
+		*del = 0.5 * (P->phi_2 - P->phi_1);
+		*sig = 0.5 * (P->phi_2 + P->phi_1);
+		err = (fabs(*del) < EPS || fabs(*sig) < EPS) ? -42 : 0;
+	}
+	return err;
+}
+	static XY
+loc_for(LP lp, PJ *P, double *yc) {
+	XY xy;
+
+	if (! lp.phi) {
+		xy.x = lp.lam;
+		xy.y = 0.;
+	} else {
+		double xa, ya, xb, yb, xc, yc, D, B, m, sp, t, R, C;
+
+		sp = sin(lp.phi);
+		m = pj_mlfn(lp.phi, sp, cos(lp.phi), P->en);
+		xa = P->Pp + P->Qp * m;
+		ya = P->P + P->Q * m;
+		R = 1. / (tan(lp.phi) * sqrt(1. - P->es * sp * sp));
+		C = sqrt(R * R - xa * xa);
+		if (lp.phi < 0.) C = - C;
+		C += ya - R;
+		if (P->mode < 0) {
+			xb = lp.lam;
+			yb = P->C2;
+		} else {
+			t = lp.lam * P->sphi_2;
+			xb = P->R_2 * sin(t);
+			yb = P->C2 + P->R_2 * (1. - cos(t));
+		}
+		if (P->mode > 0) {
+			xc = lp.lam;
+			yc = 0.;
+		} else {
+			t = lp.lam * P->sphi_1;
+			xc = P->R_1 * sin(t);
+			yc = P->R_1 * (1. - cos(t));
+		}
+		D = (xb - xc)/(yb - yc);
+		B = xc + D * (C + R - yc);
+		xy.x = D * sqrt(R * R * (1 + D * D) - B * B);
+		if (lp.phi > 0)
+			xy.x = - xy.x;
+		xy.x = (B + xy.x) / (1. + D * D);
+		xy.y = sqrt(R * R - xy.x * xy.x);
+		if (lp.phi > 0)
+			xy.y = - xy.y;
+		xy.y += C + R;
+	}
+	return (xy);
+}
+FORWARD(e_forward); /* ellipsoid */
+	double yc;
+	xy = loc_for(lp, P, &yc);
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	XY t;
+	double yc;
+
+	lp.phi = P->phi_2;
+	lp.lam = xy.x / cos(lp.phi);
+	do {
+		t = loc_for(lp, P, &yc);
+		lp.phi = ((lp.phi - P->phi_1) * (xy.y - yc) / (t.y - yc)) + P->phi_1;
+		lp.lam = lp.lam * xy.x / t.x;
+	} while (fabs(t.x - xy.x) > TOL || fabs(t.y - xy.y) > TOL);
+	return (lp);
+}
+	static void
+xy(PJ *P, double phi, double *x, double *y, double *sp, double *R) {
+	double F;
+
+	*sp = sin(phi);
+	*R = 1./(tan(phi) * sqrt(1. - P->es * *sp * *sp ));
+	F = P->lam_1 * *sp;
+	*y = *R * (1 - cos(F));
+	*x = *R * sin(F);
+}
+FREEUP; if (P) { if (P->en) pj_dalloc(P->en); pj_dalloc(P); } }
+ENTRY1(imw_p, en)
+	double del, sig, s, t, x1, x2, T2, y1, m1, m2, y2;
+	int i;
+
+	if (!(P->en = pj_enfn(P->es))) E_ERROR_0;
+	if( (i = phi12(P, &del, &sig)) != 0)
+		E_ERROR(i);
+	if (P->phi_2 < P->phi_1) { /* make sure P->phi_1 most southerly */
+		del = P->phi_1;
+		P->phi_1 = P->phi_2;
+		P->phi_2 = del;
+	}
+	if (pj_param(P->params, "tlon_1").i)
+		P->lam_1 = pj_param(P->params, "rlon_1").f;
+	else { /* use predefined based upon latitude */
+		sig = fabs(sig * RAD_TO_DEG);
+		if (sig <= 60)		sig = 2.;
+		else if (sig <= 76) sig = 4.;
+		else				sig = 8.;
+		P->lam_1 = sig * DEG_TO_RAD;
+	}
+	P->mode = 0;
+	if (P->phi_1) xy(P, P->phi_1, &x1, &y1, &P->sphi_1, &P->R_1);
+	else {
+		P->mode = 1;
+		y1 = 0.;
+		x1 = P->lam_1;
+	}
+	if (P->phi_2) xy(P, P->phi_2, &x2, &T2, &P->sphi_2, &P->R_2);
+	else {
+		P->mode = -1;
+		T2 = 0.;
+		x2 = P->lam_1;
+	}
+	m1 = pj_mlfn(P->phi_1, P->sphi_1, cos(P->phi_1), P->en);
+	m2 = pj_mlfn(P->phi_2, P->sphi_2, cos(P->phi_2), P->en);
+	t = m2 - m1;
+	s = x2 - x1;
+	y2 = sqrt(t * t - s * s) + y1;
+	P->C2 = y2 - T2;
+	t = 1. / t;
+	P->P = (m2 * y1 - m1 * y2) * t;
+	P->Q = (y2 - y1) * t;
+	P->Pp = (m2 * x1 - m1 * x2) * t;
+	P->Qp = (x2 - x1) * t;
+	P->fwd = e_forward;
+	P->inv = e_inverse;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_pr_list.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_pr_list.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_pr_list.c	(revision 256)
@@ -0,0 +1,94 @@
+/* print projection's list of parameters */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_pr_list.c	4.6   94/03/19 GIE REL";
+#endif
+#include <projects.h>
+#include <stdio.h>
+#include <string.h>
+#define LINE_LEN 72
+	static int
+pr_list(PJ *P, int not_used) {
+	paralist *t;
+	int l, n = 1, flag = 0;
+
+	(void)putchar('#');
+	for (t = P->params; t; t = t->next)
+		if ((!not_used && t->used) || (not_used && !t->used)) {
+			l = strlen(t->param) + 1;
+			if (n + l > LINE_LEN) {
+				(void)fputs("\n#", stdout);
+				n = 2;
+			}
+			(void)putchar(' ');
+			if (*(t->param) != '+')
+				(void)putchar('+');
+			(void)fputs(t->param, stdout);
+			n += l;
+		} else
+			flag = 1;
+	if (n > 1)
+		(void)putchar('\n');
+	return flag;
+}
+	void /* print link list of projection parameters */
+pj_pr_list(PJ *P) {
+	char const *s;
+
+	(void)putchar('#');
+	for (s = P->descr; *s ; ++s) {
+		(void)putchar(*s);
+		if (*s == '\n')
+			(void)putchar('#');
+	}
+	(void)putchar('\n');
+	if (pr_list(P, 0)) {
+		(void)fputs("#--- following specified but NOT used\n", stdout);
+		(void)pr_list(P, 1);
+	}
+}
+
+/************************************************************************/
+/*                             pj_get_def()                             */
+/*                                                                      */
+/*      Returns the PROJ.4 command string that would produce this       */
+/*      definition expanded as much as possible.  For instance,         */
+/*      +init= calls and +datum= defintions would be expanded.          */
+/************************************************************************/
+
+char *pj_get_def( PJ *P, int options )
+
+{
+    paralist *t;
+    int l;
+    char *definition;
+    int  def_max = 10;
+
+    definition = (char *) pj_malloc(def_max);
+    definition[0] = '\0';
+
+    for (t = P->params; t; t = t->next)
+    {
+        /* skip unused parameters ... mostly appended defaults and stuff */
+        if (!t->used)
+            continue;
+
+        /* grow the resulting string if needed */
+        l = strlen(t->param) + 1;
+        if( strlen(definition) + l + 5 > def_max )
+        {
+            char *def2;
+
+            def_max = def_max * 2 + l + 5;
+            def2 = (char *) pj_malloc(def_max);
+            strcpy( def2, definition );
+            pj_dalloc( definition );
+            definition = def2;
+        }
+
+        /* append this parameter */
+        strcat( definition, " +" );
+        strcat( definition, t->param );
+    }
+
+    return definition;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_denoy.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_denoy.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_denoy.c	(revision 256)
@@ -0,0 +1,21 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_denoy.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl., no inv., Sph.";
+#define C0	0.95
+#define C1	-.08333333333333333333
+#define C3	.00166666666666666666
+#define D1	0.9
+#define D5	0.03
+FORWARD(s_forward); /* spheroid */
+	xy.y = lp.phi;
+	xy.x = lp.lam;
+	lp.lam = fabs(lp.lam);
+	xy.x *= cos((C0 + lp.lam * (C1 + lp.lam * lp.lam * C3)) *
+		(lp.phi * (D1 + D5 * lp.phi * lp.phi * lp.phi * lp.phi)));
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(denoy) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/adjlon.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/adjlon.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/adjlon.c	(revision 256)
@@ -0,0 +1,18 @@
+/* reduce argument to range +/- PI */
+#ifndef lint
+static const char SCCSID[]="@(#)adjlon.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <math.h>
+#include <projects.h>
+
+#define SPI     3.14159265359
+#define TWOPI   6.2831853071795864769
+#define ONEPI   3.14159265358979323846
+
+double adjlon (double lon) {
+    if (fabs(lon) <= SPI) return( lon );
+    lon += ONEPI;  /* adjust to 0..2pi rad */
+    lon -= TWOPI * floor(lon / TWOPI); /* remove integral # of 'revolutions'*/
+    lon -= ONEPI;  /* adjust back to -pi..pi rad */
+    return( lon );
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gall.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gall.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_gall.c	(revision 256)
@@ -0,0 +1,22 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_gall.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(gall, "Gall (Gall Stereographic)") "\n\tCyl, Sph";
+#define YF	1.70710678118654752440
+#define XF	0.70710678118654752440
+#define RYF	0.58578643762690495119
+#define RXF	1.41421356237309504880
+FORWARD(s_forward); /* spheroid */
+	xy.x = XF * lp.lam;
+	xy.y = YF * tan(.5 * lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.lam = RXF * xy.x;
+	lp.phi = 2. * atan(xy.y * RYF);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(gall) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gridlist.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gridlist.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gridlist.c	(revision 256)
@@ -0,0 +1,256 @@
+/******************************************************************************
+ * $Id: pj_gridlist.c,v 1.3 2003/03/18 16:26:58 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Code to manage the list of currently loaded (cached) PJ_GRIDINFOs
+ *           See pj_gridinfo.c for details of loading individual grids.
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_gridlist.c,v $
+ * Revision 1.3  2003/03/18 16:26:58  warmerda
+ * clear error if missing file is not required
+ *
+ * Revision 1.2  2003/03/17 19:45:47  warmerda
+ * support '@' marker for optional grids
+ *
+ * Revision 1.1  2003/03/15 06:01:18  warmerda
+ * New
+ *
+ */
+
+#define PJ_LIB__
+
+#include <projects.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+
+static PJ_GRIDINFO *grid_list = NULL;
+
+/* used only by pj_load_nadgrids() and pj_deallocate_grids() */
+
+static int           last_nadgrids_max = 0;
+static int           last_nadgrids_count = 0;
+static PJ_GRIDINFO **last_nadgrids_list = NULL;
+static char         *last_nadgrids = NULL;
+
+/************************************************************************/
+/*                        pj_deallocate_grids()                         */
+/*                                                                      */
+/*      Deallocate all loaded grids.                                    */
+/************************************************************************/
+
+void pj_deallocate_grids()
+
+{
+    while( grid_list != NULL )
+    {
+        PJ_GRIDINFO *item = grid_list;
+        grid_list = grid_list->next;
+        item->next = NULL;
+
+        pj_gridinfo_free( item );
+    }
+
+    if( last_nadgrids != NULL )
+    {
+        pj_dalloc( last_nadgrids );
+        last_nadgrids = NULL;
+
+        pj_dalloc( last_nadgrids_list );
+        last_nadgrids_list = NULL;
+
+        last_nadgrids_count = 0;
+        last_nadgrids_max = 0;
+    }
+}
+
+/************************************************************************/
+/*                       pj_gridlist_merge_grid()                       */
+/*                                                                      */
+/*      Find/load the named gridfile and merge it into the              */
+/*      last_nadgrids_list.                                             */
+/************************************************************************/
+
+static int pj_gridlist_merge_gridfile( const char *gridname )
+
+{
+    int i, got_match=0;
+    PJ_GRIDINFO *this_grid, *tail = NULL;
+
+/* -------------------------------------------------------------------- */
+/*      Try to find in the existing list of loaded grids.  Add all      */
+/*      matching grids as with NTv2 we can get many grids from one      */
+/*      file (one shared gridname).                                     */
+/* -------------------------------------------------------------------- */
+    for( this_grid = grid_list; this_grid != NULL; this_grid = this_grid->next)
+    {
+        if( strcmp(this_grid->gridname,gridname) == 0 )
+        {
+            got_match = 1;
+
+            /* dont add to the list if it is invalid. */
+            if( this_grid->ct == NULL )
+                return 0;
+
+            /* do we need to grow the list? */
+            if( last_nadgrids_count >= last_nadgrids_max - 2 )
+            {
+                PJ_GRIDINFO **new_list;
+                int new_max = last_nadgrids_max + 20;
+
+                new_list = (PJ_GRIDINFO **) pj_malloc(sizeof(void*) * new_max);
+                if( last_nadgrids_list != NULL )
+                {
+                    memcpy( new_list, last_nadgrids_list, 
+                            sizeof(void*) * last_nadgrids_max );
+                    pj_dalloc( last_nadgrids_list );
+                }
+
+                last_nadgrids_list = new_list;
+                last_nadgrids_max = new_max;
+            }
+
+            /* add to the list */
+            last_nadgrids_list[last_nadgrids_count++] = this_grid;
+            last_nadgrids_list[last_nadgrids_count] = NULL;
+        }
+
+        tail = this_grid;
+    }
+
+    if( got_match )
+        return 1;
+
+/* -------------------------------------------------------------------- */
+/*      Try to load the named grid.                                     */
+/* -------------------------------------------------------------------- */
+    this_grid = pj_gridinfo_init( gridname );
+
+    if( this_grid == NULL )
+    {
+        /* we should get at least a stub grid with a missing "ct" member */
+        assert( FALSE );
+        return 0;
+    }
+    
+    if( tail != NULL )
+        tail->next = this_grid;
+    else
+        grid_list = this_grid;
+
+/* -------------------------------------------------------------------- */
+/*      Recurse to add the grid now that it is loaded.                  */
+/* -------------------------------------------------------------------- */
+    return pj_gridlist_merge_gridfile( gridname );
+}
+
+/************************************************************************/
+/*                     pj_gridlist_from_nadgrids()                      */
+/*                                                                      */
+/*      This functions loads the list of grids corresponding to a       */
+/*      particular nadgrids string into a list, and returns it.  The    */
+/*      list is kept around till a request is made with a different     */
+/*      string in order to cut down on the string parsing cost, and     */
+/*      the cost of building the list of tables each time.              */
+/************************************************************************/
+
+PJ_GRIDINFO **pj_gridlist_from_nadgrids( const char *nadgrids, int *grid_count)
+
+{
+    const char *s;
+
+    pj_errno = 0;
+    *grid_count = 0;
+
+    if( last_nadgrids != NULL 
+        && strcmp(nadgrids,last_nadgrids) == 0 )
+    {
+        *grid_count = last_nadgrids_count;
+        return last_nadgrids_list;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Free old one, if any, and make space for new list.              */
+/* -------------------------------------------------------------------- */
+    if( last_nadgrids != NULL )
+    {
+        pj_dalloc(last_nadgrids);
+    }
+    
+    last_nadgrids = (char *) pj_malloc(strlen(nadgrids)+1);
+    strcpy( last_nadgrids, nadgrids );
+
+    last_nadgrids_count = 0;
+
+/* -------------------------------------------------------------------- */
+/*      Loop processing names out of nadgrids one at a time.            */
+/* -------------------------------------------------------------------- */
+    for( s = nadgrids; *s != '\0'; )
+    {
+        int   end_char;
+        int   required = 1;
+        char  name[128];
+
+        if( *s == '@' )
+        {
+            required = 0;
+            s++;
+        }
+
+        for( end_char = 0; 
+             s[end_char] != '\0' && s[end_char] != ','; 
+             end_char++ ) {}
+
+        if( end_char > sizeof(name) )
+        {
+            pj_errno = -38;
+            return NULL;
+        }
+        
+        strncpy( name, s, end_char );
+        name[end_char] = '\0';
+
+        s += end_char;
+        if( *s == ',' )
+            s++;
+
+        if( !pj_gridlist_merge_gridfile( name ) && required )
+        {
+            pj_errno = -38;
+            return NULL;
+        }
+        else
+            pj_errno = 0;
+    }
+
+    if( last_nadgrids_count > 0 )
+    {
+        *grid_count = last_nadgrids_count;
+        return last_nadgrids_list;
+    }
+    else
+        return NULL;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_poly.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_poly.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_poly.c	(revision 256)
@@ -0,0 +1,102 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_poly.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double ml0; \
+	double *en;
+#define PJ_LIB__
+#include <projects.h>
+PROJ_HEAD(poly, "Polyconic (American)")
+	"\n\tConic, Sph&Ell";
+#define TOL	1e-10
+#define CONV	1e-10
+#define N_ITER	10
+#define I_ITER 20
+#define ITOL 1.e-12
+FORWARD(e_forward); /* ellipsoid */
+	double  ms, sp, cp;
+
+	if (fabs(lp.phi) <= TOL) { xy.x = lp.lam; xy.y = -P->ml0; }
+	else {
+		sp = sin(lp.phi);
+		ms = fabs(cp = cos(lp.phi)) > TOL ? pj_msfn(sp, cp, P->es) / sp : 0.;
+		xy.x = ms * sin(lp.lam *= sp);
+		xy.y = (pj_mlfn(lp.phi, sp, cp, P->en) - P->ml0) + ms * (1. - cos(lp.lam));
+	}
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	double  cot, E;
+
+	if (fabs(lp.phi) <= TOL) { xy.x = lp.lam; xy.y = P->ml0; }
+	else {
+		cot = 1. / tan(lp.phi);
+		xy.x = sin(E = lp.lam * sin(lp.phi)) * cot;
+		xy.y = lp.phi - P->phi0 + cot * (1. - cos(E));
+	}
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	xy.y += P->ml0;
+	if (fabs(xy.y) <= TOL) { lp.lam = xy.x; lp.phi = 0.; }
+	else {
+		double r, c, sp, cp, s2ph, ml, mlb, mlp, dPhi;
+		int i;
+
+		r = xy.y * xy.y + xy.x * xy.x;
+		for (lp.phi = xy.y, i = I_ITER; i ; --i) {
+			sp = sin(lp.phi);
+			s2ph = sp * ( cp = cos(lp.phi));
+			if (fabs(cp) < ITOL)
+				I_ERROR;
+			c = sp * (mlp = sqrt(1. - P->es * sp * sp)) / cp;
+			ml = pj_mlfn(lp.phi, sp, cp, P->en);
+			mlb = ml * ml + r;
+			mlp = P->one_es / (mlp * mlp * mlp);
+			lp.phi += ( dPhi =
+				( ml + ml + c * mlb - 2. * xy.y * (c * ml + 1.) ) / (
+				P->es * s2ph * (mlb - 2. * xy.y * ml) / c +
+				2.* (xy.y - ml) * (c * mlp - 1. / s2ph) - mlp - mlp ));
+			if (fabs(dPhi) <= ITOL)
+				break;
+		}
+		if (!i)
+			I_ERROR;
+		c = sin(lp.phi);
+		lp.lam = asin(xy.x * tan(lp.phi) * sqrt(1. - P->es * c * c)) / sin(lp.phi);
+	}
+	return (lp);
+}
+INVERSE(s_inverse); /* spheroid */
+	double B, dphi, tp;
+	int i;
+
+	if (fabs(xy.y = P->phi0 + xy.y) <= TOL) { lp.lam = xy.x; lp.phi = 0.; }
+	else {
+		lp.phi = xy.y;
+		B = xy.x * xy.x + xy.y * xy.y;
+		i = N_ITER;
+		do {
+			tp = tan(lp.phi);
+			lp.phi -= (dphi = (xy.y * (lp.phi * tp + 1.) - lp.phi -
+				.5 * ( lp.phi * lp.phi + B) * tp) /
+				((lp.phi - xy.y) / tp - 1.));
+		} while (fabs(dphi) > CONV && --i);
+		if (! i) I_ERROR;
+		lp.lam = asin(xy.x * tan(lp.phi)) / sin(lp.phi);
+	}
+	return (lp);
+}
+FREEUP; if (P) { if (P->en) pj_dalloc(P->en); pj_dalloc(P); } }
+ENTRY1(poly, en)
+	if (P->es) {
+		if (!(P->en = pj_enfn(P->es))) E_ERROR_0;
+		P->ml0 = pj_mlfn(P->phi0, sin(P->phi0), cos(P->phi0), P->en);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		P->ml0 = -P->phi0;
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_geocent.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_geocent.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_geocent.c	(revision 256)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * $Id: pj_geocent.c,v 1.1 2002/12/14 20:13:21 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Stub projection for geocentric.  The transformation isn't
+ *           really done here since this code is 2D.  The real transformation
+ *           is handled by pj_transform.c.
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2002, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_geocent.c,v $
+ * Revision 1.1  2002/12/14 20:13:21  warmerda
+ * New
+ *
+ */
+
+#define PJ_LIB__
+#include <projects.h>
+
+PJ_CVSID("$Id: pj_geocent.c,v 1.1 2002/12/14 20:13:21 warmerda Exp $");
+
+PROJ_HEAD(geocent, "Geocentric")  "\n\t";
+
+FORWARD(forward);
+        xy.x = lp.lam;
+        xy.y = lp.phi;
+        return xy;
+}
+INVERSE(inverse);
+        lp.phi = xy.y;
+        lp.lam = xy.x;
+        return lp;
+}
+FREEUP; if (P) pj_dalloc(P); }
+
+ENTRY0(geocent)
+    P->is_geocent = 1; 
+    P->x0 = 0.0;
+    P->y0 = 0.0;
+    P->inv = inverse; P->fwd = forward;
+ENDENTRY(P)
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_open_lib.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_open_lib.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_open_lib.c	(revision 256)
@@ -0,0 +1,166 @@
+/******************************************************************************
+ * $Id: pj_open_lib.c,v 1.6 2004/09/16 15:14:01 fwarmerdam Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of pj_open_lib(), and pj_set_finder().  These
+ *           provide a standard interface for opening projections support
+ *           data files.
+ * Author:   Gerald Evenden, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ * Copyright (c) 2002, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_open_lib.c,v $
+ * Revision 1.6  2004/09/16 15:14:01  fwarmerdam
+ * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller.
+ *
+ * Revision 1.5  2002/12/14 20:15:30  warmerda
+ * updated headers
+ *
+ */
+
+#define PJ_LIB__
+#include <projects.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+PJ_CVSID("$Id: pj_open_lib.c,v 1.6 2004/09/16 15:14:01 fwarmerdam Exp $");
+
+static const char *(*pj_finder)(const char *) = NULL;
+static int path_count = 0;
+static char **search_path = NULL;
+static char * proj_lib_name =
+#ifdef PROJ_LIB
+PROJ_LIB;
+#else
+0;
+#endif
+
+/************************************************************************/
+/*                           pj_set_finder()                            */
+/************************************************************************/
+
+void pj_set_finder( const char *(*new_finder)(const char *) )
+
+{
+    pj_finder = new_finder;
+}
+
+/************************************************************************/
+/*                         pj_set_searchpath()                          */
+/*                                                                      */
+/*      Path control for callers that can't practically provide         */
+/*      pj_set_finder() style callbacks.                                */
+/************************************************************************/
+
+void pj_set_searchpath ( int count, const char **path )
+{
+    int i;
+
+    if (path_count > 0 && search_path != NULL)
+    {
+        for (i = 0; i < path_count; i++)
+        {
+            pj_dalloc(search_path[i]);
+        }
+        pj_dalloc(search_path);
+        path_count = 0;
+        search_path = NULL;
+    }
+
+    search_path = pj_malloc(sizeof *search_path * count);
+    for (i = 0; i < count; i++)
+    {
+        search_path[i] = pj_malloc(strlen(path[i]) + 1);
+        strcpy(search_path[i], path[i]);
+    }
+
+    path_count = count;
+}
+
+/************************************************************************/
+/*                            pj_open_lib()                             */
+/************************************************************************/
+
+FILE *
+pj_open_lib(char *name, char *mode) {
+    char fname[MAX_PATH_FILENAME+1];
+    const char *sysname;
+    FILE *fid;
+    int n = 0;
+    int i;
+
+    /* check if ~/name */
+    if (*name == '~' && name[1] == DIR_CHAR)
+        if (sysname = getenv("HOME")) {
+            (void)strcpy(fname, sysname);
+            fname[n = strlen(fname)] = DIR_CHAR;
+            fname[++n] = '\0';
+            (void)strcpy(fname+n, name + 1);
+            sysname = fname;
+        } else
+            return NULL;
+
+    /* or fixed path: /name, ./name or ../name */
+    else if (*name == DIR_CHAR || (*name == '.' && name[1] == DIR_CHAR) ||
+             (!strncmp(name, "..", 2) && name[2] == DIR_CHAR) )
+        sysname = name;
+
+    /* or try to use application provided file finder */
+    else if( pj_finder != NULL && pj_finder( name ) != NULL )
+        sysname = pj_finder( name );
+
+    /* or is environment PROJ_LIB defined */
+    else if ((sysname = getenv("PROJ_LIB")) || (sysname = proj_lib_name)) {
+        (void)strcpy(fname, sysname);
+        fname[n = strlen(fname)] = DIR_CHAR;
+        fname[++n] = '\0';
+        (void)strcpy(fname+n, name);
+        sysname = fname;
+    } else /* just try it bare bones */
+        sysname = name;
+
+    if (fid = fopen(sysname, mode))
+        errno = 0;
+
+    /* If none of those work and we have a search path, try it */
+    if (!fid && path_count > 0)
+    {
+        for (i = 0; fid == NULL && i < path_count; i++)
+        {
+            sprintf(fname, "%s%c%s", search_path[i], DIR_CHAR, name);
+            sysname = fname;
+            fid = fopen (sysname, mode);
+        }
+        if (fid)
+            errno = 0;
+    }
+
+    if( getenv( "PROJ_DEBUG" ) != NULL )
+        fprintf( stderr, "pj_open_lib(%s): call fopen(%s) - %s\n",
+                 name, sysname,
+                 fid == NULL ? "failed" : "succeeded" );
+
+    return(fid);
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_ell_set.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_ell_set.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_ell_set.c	(revision 256)
@@ -0,0 +1,105 @@
+/* set ellipsoid parameters a and es */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_ell_set.c	4.5	93/06/12	GIE	REL";
+#endif
+#include <projects.h>
+#include <string.h>
+#define SIXTH .1666666666666666667 /* 1/6 */
+#define RA4 .04722222222222222222 /* 17/360 */
+#define RA6 .02215608465608465608 /* 67/3024 */
+#define RV4 .06944444444444444444 /* 5/72 */
+#define RV6 .04243827160493827160 /* 55/1296 */
+	int /* initialize geographic shape parameters */
+pj_ell_set(paralist *pl, double *a, double *es) {
+	int i;
+	double b=0.0, e;
+	char *name;
+	paralist *start = 0, *curr;
+
+		/* check for varying forms of ellipsoid input */
+	*a = *es = 0.;
+	/* R takes precedence */
+	if (pj_param(pl, "tR").i)
+		*a = pj_param(pl, "dR").f;
+	else { /* probable elliptical figure */
+
+		/* check if ellps present and temporarily append its values to pl */
+		if (name = pj_param(pl, "sellps").s) {
+			char *s;
+
+			for (start = pl; start && start->next ; start = start->next) ;
+			curr = start;
+			for (i = 0; (s = pj_ellps[i].id) && strcmp(name, s) ; ++i) ;
+			if (!s) { pj_errno = -9; return 1; }
+			curr = curr->next = pj_mkparam(pj_ellps[i].major);
+			curr = curr->next = pj_mkparam(pj_ellps[i].ell);
+		}
+		*a = pj_param(pl, "da").f;
+		if (pj_param(pl, "tes").i) /* eccentricity squared */
+			*es = pj_param(pl, "des").f;
+		else if (pj_param(pl, "te").i) { /* eccentricity */
+			e = pj_param(pl, "de").f;
+			*es = e * e;
+		} else if (pj_param(pl, "trf").i) { /* recip flattening */
+			*es = pj_param(pl, "drf").f;
+			if (!*es) {
+				pj_errno = -10;
+				goto bomb;
+			}
+			*es = 1./ *es;
+			*es = *es * (2. - *es);
+		} else if (pj_param(pl, "tf").i) { /* flattening */
+			*es = pj_param(pl, "df").f;
+			*es = *es * (2. - *es);
+		} else if (pj_param(pl, "tb").i) { /* minor axis */
+			b = pj_param(pl, "db").f;
+			*es = 1. - (b * b) / (*a * *a);
+		}     /* else *es == 0. and sphere of radius *a */
+		if (!b)
+			b = *a * sqrt(1. - *es);
+		/* following options turn ellipsoid into equivalent sphere */
+		if (pj_param(pl, "bR_A").i) { /* sphere--area of ellipsoid */
+			*a *= 1. - *es * (SIXTH + *es * (RA4 + *es * RA6));
+			*es = 0.;
+		} else if (pj_param(pl, "bR_V").i) { /* sphere--vol. of ellipsoid */
+			*a *= 1. - *es * (SIXTH + *es * (RV4 + *es * RV6));
+			*es = 0.;
+		} else if (pj_param(pl, "bR_a").i) { /* sphere--arithmetic mean */
+			*a = .5 * (*a + b);
+			*es = 0.;
+		} else if (pj_param(pl, "bR_g").i) { /* sphere--geometric mean */
+			*a = sqrt(*a * b);
+			*es = 0.;
+		} else if (pj_param(pl, "bR_h").i) { /* sphere--harmonic mean */
+			*a = 2. * *a * b / (*a + b);
+			*es = 0.;
+		} else if ((i = pj_param(pl, "tR_lat_a").i) || /* sphere--arith. */
+			pj_param(pl, "tR_lat_g").i) { /* or geom. mean at latitude */
+			double tmp;
+
+			tmp = sin(pj_param(pl, i ? "rR_lat_a" : "rR_lat_g").f);
+			if (fabs(tmp) > HALFPI) {
+				pj_errno = -11;
+				goto bomb;
+			}
+			tmp = 1. - *es * tmp * tmp;
+			*a *= i ? .5 * (1. - *es + tmp) / ( tmp * sqrt(tmp)) :
+				sqrt(1. - *es) / tmp;
+			*es = 0.;
+		}
+bomb:
+		if (start) { /* clean up temporary extension of list */
+			pj_dalloc(start->next->next);
+			pj_dalloc(start->next);
+			start->next = 0;
+		}
+		if (pj_errno)
+			return 1;
+	}
+	/* some remaining checks */
+	if (*es < 0.)
+		{ pj_errno = -12; return 1; }
+	if (*a <= 0.)
+		{ pj_errno = -13; return 1; }
+	return 0;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_loxim.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_loxim.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_loxim.c	(revision 256)
@@ -0,0 +1,44 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_loxim.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PROJ_PARMS__ \
+	double phi1; \
+	double cosphi1; \
+	double tanphi1;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(loxim, "Loximuthal") "\n\tPCyl Sph";
+#define EPS	1e-8
+FORWARD(s_forward); /* spheroid */
+	xy.y = lp.phi - P->phi1;
+	if (fabs(xy.y) < EPS)
+		xy.x = lp.lam * P->cosphi1;
+	else {
+		xy.x = FORTPI + 0.5 * lp.phi;
+		if (fabs(xy.x) < EPS || fabs(fabs(xy.x) - HALFPI) < EPS)
+			xy.x = 0.;
+		else
+			xy.x = lp.lam * xy.y / log( tan(xy.x) / P->tanphi1 );
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y + P->phi1;
+	if (fabs(xy.y) < EPS)
+		lp.lam = xy.x / P->cosphi1;
+	else
+		if (fabs( lp.lam = FORTPI + 0.5 * lp.phi ) < EPS ||
+			fabs(fabs(lp.lam) - HALFPI) < EPS)
+			lp.lam = 0.;
+		else
+			lp.lam = xy.x * log( tan(lp.lam) / P->tanphi1 ) / xy.y ;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(loxim);
+	P->phi1 = pj_param(P->params, "rlat_1").f;
+	if ((P->cosphi1 = cos(P->phi1)) < EPS) E_ERROR(-22);
+	P->tanphi1 = tan(FORTPI + 0.5 * P->phi1);
+	P->inv = s_inverse; P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wink1.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wink1.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wink1.c	(revision 256)
@@ -0,0 +1,23 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_wink1.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PROJ_PARMS__ \
+	double	cosphi1;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(wink1, "Winkel I") "\n\tPCyl., Sph.\n\tlat_ts=";
+FORWARD(s_forward); /* spheroid */
+	xy.x = .5 * lp.lam * (P->cosphi1 + cos(lp.phi));
+	xy.y = lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y;
+	lp.lam = 2. * xy.x / (P->cosphi1 + cos(lp.phi));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(wink1)
+	P->cosphi1 = cos(pj_param(P->params, "rlat_ts").f);
+	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mpoly.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mpoly.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mpoly.c	(revision 256)
@@ -0,0 +1,21 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_mpoly.c	4.1	94/05/22	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	rho_0;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(mpoly, "Modified Polyconic")
+	"\n\tPolyconic, Sph\n\tlat_1= and lat_2= lotsa";
+FORWARD(s_forward); /* spheroid */
+	return (xy);
+}
+INVERSE(s_inverse); /* ellipsoid & spheroid */
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(mpoly)
+	P->fwd = s_forward;
+	P->inv = s_inverse;
+	P->es = 0;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lsat.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lsat.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lsat.c	(revision 256)
@@ -0,0 +1,174 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_lsat.c	4.1	94/02/15	GIE	REL";
+#endif
+/* based upon Snyder and Linck, USGS-NMD */
+#define PROJ_PARMS__ \
+    double a2, a4, b, c1, c3; \
+    double q, t, u, w, p22, sa, ca, xj, rlm, rlm2;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(lsat, "Space oblique for LANDSAT")
+	"\n\tCyl, Sph&Ell\n\tlsat= path=";
+#define TOL 1e-7
+#define PI_HALFPI 4.71238898038468985766
+#define TWOPI_HALFPI 7.85398163397448309610
+	static void
+seraz0(double lam, double mult, PJ *P) {
+    double sdsq, h, s, fc, sd, sq, d__1;
+
+    lam *= DEG_TO_RAD;
+    sd = sin(lam);
+    sdsq = sd * sd;
+    s = P->p22 * P->sa * cos(lam) * sqrt((1. + P->t * sdsq) / ((
+	    1. + P->w * sdsq) * (1. + P->q * sdsq)));
+    d__1 = 1. + P->q * sdsq;
+    h = sqrt((1. + P->q * sdsq) / (1. + P->w * sdsq)) * ((1. + 
+	    P->w * sdsq) / (d__1 * d__1) - P->p22 * P->ca);
+    sq = sqrt(P->xj * P->xj + s * s);
+    P->b += fc = mult * (h * P->xj - s * s) / sq;
+    P->a2 += fc * cos(lam + lam);
+    P->a4 += fc * cos(lam * 4.);
+    fc = mult * s * (h + P->xj) / sq;
+    P->c1 += fc * cos(lam);
+    P->c3 += fc * cos(lam * 3.);
+}
+FORWARD(e_forward); /* ellipsoid */
+    int l, nn;
+    double lamt, xlam, sdsq, c, d, s, lamdp, phidp, lampp, tanph,
+		lamtp, cl, sd, sp, fac, sav, tanphi;
+
+	if (lp.phi > HALFPI)
+	    lp.phi = HALFPI;
+	else if (lp.phi < -HALFPI)
+	    lp.phi = -HALFPI;
+	lampp = lp.phi >= 0. ? HALFPI : PI_HALFPI;
+	tanphi = tan(lp.phi);
+	for (nn = 0;;) {
+		sav = lampp;
+		lamtp = lp.lam + P->p22 * lampp;
+		cl = cos(lamtp);
+		if (fabs(cl) < TOL)
+		    lamtp -= TOL;
+		fac = lampp - sin(lampp) * (cl < 0. ? -HALFPI : HALFPI);
+		for (l = 50; l; --l) {
+			lamt = lp.lam + P->p22 * sav;
+			if (fabs(c = cos(lamt)) < TOL)
+			    lamt -= TOL;
+			xlam = (P->one_es * tanphi * P->sa + sin(lamt) * P->ca) / c;
+			lamdp = atan(xlam) + fac;
+			if (fabs(fabs(sav) - fabs(lamdp)) < TOL)
+			    break;
+			sav = lamdp;
+		}
+		if (!l || ++nn >= 3 || (lamdp > P->rlm && lamdp < P->rlm2))
+			break;
+		if (lamdp <= P->rlm)
+		    lampp = TWOPI_HALFPI;
+		else if (lamdp >= P->rlm2)
+		    lampp = HALFPI;
+	}
+	if (l) {
+		sp = sin(lp.phi);
+		phidp = aasin((P->one_es * P->ca * sp - P->sa * cos(lp.phi) * 
+			sin(lamt)) / sqrt(1. - P->es * sp * sp));
+		tanph = log(tan(FORTPI + .5 * phidp));
+		sd = sin(lamdp);
+		sdsq = sd * sd;
+		s = P->p22 * P->sa * cos(lamdp) * sqrt((1. + P->t * sdsq)
+			 / ((1. + P->w * sdsq) * (1. + P->q * sdsq)));
+		d = sqrt(P->xj * P->xj + s * s);
+		xy.x = P->b * lamdp + P->a2 * sin(2. * lamdp) + P->a4 *
+			sin(lamdp * 4.) - tanph * s / d;
+		xy.y = P->c1 * sd + P->c3 * sin(lamdp * 3.) + tanph * P->xj / d;
+	} else
+		xy.x = xy.y = HUGE_VAL;
+	return xy;
+}
+INVERSE(e_inverse); /* ellipsoid */
+    int nn;
+    double lamt, sdsq, s, lamdp, phidp, sppsq, dd, sd, sl, fac, scl, sav, spp;
+
+	lamdp = xy.x / P->b;
+	nn = 50;
+	do {
+		sav = lamdp;
+		sd = sin(lamdp);
+		sdsq = sd * sd;
+		s = P->p22 * P->sa * cos(lamdp) * sqrt((1. + P->t * sdsq)
+			 / ((1. + P->w * sdsq) * (1. + P->q * sdsq)));
+		lamdp = xy.x + xy.y * s / P->xj - P->a2 * sin(
+			2. * lamdp) - P->a4 * sin(lamdp * 4.) - s / P->xj * (
+			P->c1 * sin(lamdp) + P->c3 * sin(lamdp * 3.));
+		lamdp /= P->b;
+	} while (fabs(lamdp - sav) >= TOL && --nn);
+	sl = sin(lamdp);
+	fac = exp(sqrt(1. + s * s / P->xj / P->xj) * (xy.y - 
+		P->c1 * sl - P->c3 * sin(lamdp * 3.)));
+	phidp = 2. * (atan(fac) - FORTPI);
+	dd = sl * sl;
+	if (fabs(cos(lamdp)) < TOL)
+	    lamdp -= TOL;
+	spp = sin(phidp);
+	sppsq = spp * spp;
+	lamt = atan(((1. - sppsq * P->rone_es) * tan(lamdp) * 
+		P->ca - spp * P->sa * sqrt((1. + P->q * dd) * (
+		1. - sppsq) - sppsq * P->u) / cos(lamdp)) / (1. - sppsq 
+		* (1. + P->u)));
+	sl = lamt >= 0. ? 1. : -1.;
+	scl = cos(lamdp) >= 0. ? 1. : -1;
+	lamt -= HALFPI * (1. - scl) * sl;
+	lp.lam = lamt - P->p22 * lamdp;
+	if (fabs(P->sa) < TOL)
+	    lp.phi = aasin(spp / sqrt(P->one_es * P->one_es + P->es * sppsq));
+	else
+		lp.phi = atan((tan(lamdp) * cos(lamt) - P->ca * sin(lamt)) /
+			(P->one_es * P->sa));
+	return lp;
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(lsat)
+    int land, path;
+    double lam, alf, esc, ess;
+
+	land = pj_param(P->params, "ilsat").i;
+	if (land <= 0 || land > 5) E_ERROR(-28);
+	path = pj_param(P->params, "ipath").i;
+	if (path <= 0 || path > (land <= 3 ? 251 : 233)) E_ERROR(-29);
+	if (land <= 3) {
+		P->lam0 = DEG_TO_RAD * 128.87 - TWOPI / 251. * path;
+	    P->p22 = 103.2669323;
+	    alf = DEG_TO_RAD * 99.092;
+	} else {
+		P->lam0 = DEG_TO_RAD * 129.3 - TWOPI / 233. * path;
+	    P->p22 = 98.8841202;
+	    alf = DEG_TO_RAD * 98.2;
+	}
+	P->p22 /= 1440.;
+	P->sa = sin(alf);
+	P->ca = cos(alf);
+	if (fabs(P->ca) < 1e-9)
+	    P->ca = 1e-9;
+	esc = P->es * P->ca * P->ca;
+	ess = P->es * P->sa * P->sa;
+	P->w = (1. - esc) * P->rone_es;
+	P->w = P->w * P->w - 1.;
+	P->q = ess * P->rone_es;
+	P->t = ess * (2. - P->es) * P->rone_es * P->rone_es;
+	P->u = esc * P->rone_es;
+	P->xj = P->one_es * P->one_es * P->one_es;
+	P->rlm = PI * (1. / 248. + .5161290322580645);
+	P->rlm2 = P->rlm + TWOPI;
+    P->a2 = P->a4 = P->b = P->c1 = P->c3 = 0.;
+	seraz0(0., 1., P);
+	for (lam = 9.; lam <= 81.0001; lam += 18.)
+	    seraz0(lam, 4., P);
+	for (lam = 18; lam <= 72.0001; lam += 18.)
+	    seraz0(lam, 2., P);
+	seraz0(90., 1., P);
+	P->a2 /= 30.;
+	P->a4 /= 60.;
+	P->b /= 30.;
+	P->c1 /= 15.;
+	P->c3 /= 45.;
+	P->inv = e_inverse; P->fwd = e_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aeqd.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aeqd.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aeqd.c	(revision 256)
@@ -0,0 +1,277 @@
+/******************************************************************************
+ * $Id: PJ_aeqd.c,v 1.3 2002/12/14 19:27:06 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the aeqd (Azimuthal Equidistant) projection.
+ * Author:   Gerald Evenden
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: PJ_aeqd.c,v $
+ * Revision 1.3  2002/12/14 19:27:06  warmerda
+ * updated header
+ *
+ */
+
+#define PROJ_PARMS__ \
+	double	sinph0; \
+	double	cosph0; \
+	double	*en; \
+	double	M1; \
+	double	N1; \
+	double	Mp; \
+	double	He; \
+	double	G; \
+	int		mode;
+#define PJ_LIB__
+#include	<projects.h>
+
+PJ_CVSID("$Id: PJ_aeqd.c,v 1.3 2002/12/14 19:27:06 warmerda Exp $");
+
+PROJ_HEAD(aeqd, "Azimuthal Equidistant") "\n\tAzi, Sph&Ell\n\tlat_0 guam";
+
+#define EPS10 1.e-10
+#define TOL 1.e-14
+
+#define N_POLE	0
+#define S_POLE 1
+#define EQUIT	2
+#define OBLIQ	3
+FORWARD(e_guam_fwd); /* Guam elliptical */
+	double  cosphi, sinphi, t;
+
+	cosphi = cos(lp.phi);
+	sinphi = sin(lp.phi);
+	t = 1. / sqrt(1. - P->es * sinphi * sinphi);
+	xy.x = lp.lam * cosphi * t;
+	xy.y = pj_mlfn(lp.phi, sinphi, cosphi, P->en) - P->M1 +
+		.5 * lp.lam * lp.lam * cosphi * sinphi * t;
+	return (xy);
+}
+FORWARD(e_forward); /* elliptical */
+	double  coslam, cosphi, sinphi, rho, s, H, H2, c, Az, t, ct, st, cA, sA;
+
+	coslam = cos(lp.lam);
+	cosphi = cos(lp.phi);
+	sinphi = sin(lp.phi);
+	switch (P->mode) {
+	case N_POLE:
+		coslam = - coslam;
+	case S_POLE:
+		xy.x = (rho = fabs(P->Mp - pj_mlfn(lp.phi, sinphi, cosphi, P->en))) *
+			sin(lp.lam);
+		xy.y = rho * coslam;
+		break;
+	case EQUIT:
+	case OBLIQ:
+		if (fabs(lp.lam) < EPS10 && fabs(lp.phi - P->phi0) < EPS10) {
+			xy.x = xy.y = 0.;
+			break;
+		}
+		t = atan2(P->one_es * sinphi + P->es * P->N1 * P->sinph0 *
+			sqrt(1. - P->es * sinphi * sinphi), cosphi);
+		ct = cos(t); st = sin(t);
+		Az = atan2(sin(lp.lam) * ct, P->cosph0 * st - P->sinph0 * coslam * ct);
+		cA = cos(Az); sA = sin(Az);
+		s = aasin( fabs(sA) < TOL ?
+			(P->cosph0 * st - P->sinph0 * coslam * ct) / cA :
+			sin(lp.lam) * ct / sA );
+		H = P->He * cA;
+		H2 = H * H;
+		c = P->N1 * s * (1. + s * s * (- H2 * (1. - H2)/6. +
+			s * ( P->G * H * (1. - 2. * H2 * H2) / 8. +
+			s * ((H2 * (4. - 7. * H2) - 3. * P->G * P->G * (1. - 7. * H2)) /
+			120. - s * P->G * H / 48.))));
+		xy.x = c * sA;
+		xy.y = c * cA;
+		break;
+	}
+	return (xy);
+}
+FORWARD(s_forward); /* spherical */
+	double  coslam, cosphi, sinphi;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+		xy.y = cosphi * coslam;
+		goto oblcon;
+	case OBLIQ:
+		xy.y = P->sinph0 * sinphi + P->cosph0 * cosphi * coslam;
+oblcon:
+		if (fabs(fabs(xy.y) - 1.) < TOL)
+			if (xy.y < 0.)
+				F_ERROR 
+			else
+				xy.x = xy.y = 0.;
+		else {
+			xy.y = acos(xy.y);
+			xy.y /= sin(xy.y);
+			xy.x = xy.y * cosphi * sin(lp.lam);
+			xy.y *= (P->mode == EQUIT) ? sinphi :
+		   		P->cosph0 * sinphi - P->sinph0 * cosphi * coslam;
+		}
+		break;
+	case N_POLE:
+		lp.phi = -lp.phi;
+		coslam = -coslam;
+	case S_POLE:
+		if (fabs(lp.phi - HALFPI) < EPS10) F_ERROR;
+		xy.x = (xy.y = (HALFPI + lp.phi)) * sin(lp.lam);
+		xy.y *= coslam;
+		break;
+	}
+	return (xy);
+}
+INVERSE(e_guam_inv); /* Guam elliptical */
+	double x2, t;
+	int i;
+
+	x2 = 0.5 * xy.x * xy.x;
+	lp.phi = P->phi0;
+	for (i = 0; i < 3; ++i) {
+		t = P->e * sin(lp.phi);
+		lp.phi = pj_inv_mlfn(P->M1 + xy.y -
+			x2 * tan(lp.phi) * (t = sqrt(1. - t * t)), P->es, P->en);
+	}
+	lp.lam = xy.x * t / cos(lp.phi);
+	return (lp);
+}
+INVERSE(e_inverse); /* elliptical */
+	double c, Az, cosAz, A, B, D, E, F, psi, t;
+
+	if ((c = hypot(xy.x, xy.y)) < EPS10) {
+		lp.phi = P->phi0;
+		lp.lam = 0.;
+		return (lp);
+	}
+	if (P->mode == OBLIQ || P->mode == EQUIT) {
+		cosAz = cos(Az = atan2(xy.x, xy.y));
+		t = P->cosph0 * cosAz;
+		B = P->es * t / P->one_es;
+		A = - B * t;
+		B *= 3. * (1. - A) * P->sinph0;
+		D = c / P->N1;
+		E = D * (1. - D * D * (A * (1. + A) / 6. + B * (1. + 3.*A) * D / 24.));
+		F = 1. - E * E * (A / 2. + B * E / 6.);
+		psi = aasin(P->sinph0 * cos(E) + t * sin(E));
+		lp.lam = aasin(sin(Az) * sin(E) / cos(psi));
+		if ((t = fabs(psi)) < EPS10)
+			lp.phi = 0.;
+		else if (fabs(t - HALFPI) < 0.)
+			lp.phi = HALFPI;
+		else
+			lp.phi = atan((1. - P->es * F * P->sinph0 / sin(psi)) * tan(psi) /
+				P->one_es);
+	} else { /* Polar */
+		lp.phi = pj_inv_mlfn(P->mode == N_POLE ? P->Mp - c : P->Mp + c,
+			P->es, P->en);
+		lp.lam = atan2(xy.x, P->mode == N_POLE ? -xy.y : xy.y);
+	}
+	return (lp);
+}
+INVERSE(s_inverse); /* spherical */
+	double cosc, c_rh, sinc;
+
+	if ((c_rh = hypot(xy.x, xy.y)) > PI) {
+		if (c_rh - EPS10 > PI) I_ERROR;
+		c_rh = PI;
+	} else if (c_rh < EPS10) {
+		lp.phi = P->phi0;
+		lp.lam = 0.;
+		return (lp);
+	}
+	if (P->mode == OBLIQ || P->mode == EQUIT) {
+		sinc = sin(c_rh);
+		cosc = cos(c_rh);
+		if (P->mode == EQUIT) {
+			lp.phi = aasin(xy.y * sinc / c_rh);
+			xy.x *= sinc;
+			xy.y = cosc * c_rh;
+		} else {
+			lp.phi = aasin(cosc * P->sinph0 + xy.y * sinc * P->cosph0 /
+				c_rh);
+			xy.y = (cosc - P->sinph0 * sin(lp.phi)) * c_rh;
+			xy.x *= sinc * P->cosph0;
+		}
+		lp.lam = xy.y == 0. ? 0. : atan2(xy.x, xy.y);
+	} else if (P->mode == N_POLE) {
+		lp.phi = HALFPI - c_rh;
+		lp.lam = atan2(xy.x, -xy.y);
+	} else {
+		lp.phi = c_rh - HALFPI;
+		lp.lam = atan2(xy.x, xy.y);
+	}
+	return (lp);
+}
+FREEUP;
+    if (P) {
+		if (P->en)
+			pj_dalloc(P->en);
+		pj_dalloc(P);
+	}
+}
+ENTRY1(aeqd, en)
+	P->phi0 = pj_param(P->params, "rlat_0").f;
+	if (fabs(fabs(P->phi0) - HALFPI) < EPS10) {
+		P->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+		P->sinph0 = P->phi0 < 0. ? -1. : 1.;
+		P->cosph0 = 0.;
+	} else if (fabs(P->phi0) < EPS10) {
+		P->mode = EQUIT;
+		P->sinph0 = 0.;
+		P->cosph0 = 1.;
+	} else {
+		P->mode = OBLIQ;
+		P->sinph0 = sin(P->phi0);
+		P->cosph0 = cos(P->phi0);
+	}
+	if (! P->es) {
+		P->inv = s_inverse; P->fwd = s_forward;
+	} else {
+		if (!(P->en = pj_enfn(P->es))) E_ERROR_0;
+		if (pj_param(P->params, "bguam").i) {
+			P->M1 = pj_mlfn(P->phi0, P->sinph0, P->cosph0, P->en);
+			P->inv = e_guam_inv; P->fwd = e_guam_fwd;
+		} else {
+			switch (P->mode) {
+			case N_POLE:
+				P->Mp = pj_mlfn(HALFPI, 1., 0., P->en);
+				break;
+			case S_POLE:
+				P->Mp = pj_mlfn(-HALFPI, -1., 0., P->en);
+				break;
+			case EQUIT:
+			case OBLIQ:
+				P->inv = e_inverse; P->fwd = e_forward;
+				P->N1 = 1. / sqrt(1. - P->es * P->sinph0 * P->sinph0);
+				P->G = P->sinph0 * (P->He = P->e / sqrt(P->one_es));
+				P->He *= P->cosph0;
+				break;
+			}
+			P->inv = e_inverse; P->fwd = e_forward;
+		}
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tmerc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tmerc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tmerc.c	(revision 256)
@@ -0,0 +1,148 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_tmerc.c	4.2	94/06/02	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	esp; \
+	double	ml0; \
+	double	*en;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(tmerc, "Transverse Mercator") "\n\tCyl, Sph&Ell";
+PROJ_HEAD(utm, "Universal Transverse Mercator (UTM)")
+	"\n\tCyl, Sph\n\tzone= south";
+#define EPS10	1.e-10
+#define aks0	P->esp
+#define aks5	P->ml0
+#define FC1 1.
+#define FC2 .5
+#define FC3 .16666666666666666666
+#define FC4 .08333333333333333333
+#define FC5 .05
+#define FC6 .03333333333333333333
+#define FC7 .02380952380952380952
+#define FC8 .01785714285714285714
+FORWARD(e_forward); /* ellipse */
+	double al, als, n, cosphi, sinphi, t;
+
+	sinphi = sin(lp.phi); cosphi = cos(lp.phi);
+	t = fabs(cosphi) > 1e-10 ? sinphi/cosphi : 0.;
+	t *= t;
+	al = cosphi * lp.lam;
+	als = al * al;
+	al /= sqrt(1. - P->es * sinphi * sinphi);
+	n = P->esp * cosphi * cosphi;
+	xy.x = P->k0 * al * (FC1 +
+		FC3 * als * (1. - t + n +
+		FC5 * als * (5. + t * (t - 18.) + n * (14. - 58. * t)
+		+ FC7 * als * (61. + t * ( t * (179. - t) - 479. ) )
+		)));
+	xy.y = P->k0 * (pj_mlfn(lp.phi, sinphi, cosphi, P->en) - P->ml0 +
+		sinphi * al * lp.lam * FC2 * ( 1. +
+		FC4 * als * (5. - t + n * (9. + 4. * n) +
+		FC6 * als * (61. + t * (t - 58.) + n * (270. - 330 * t)
+		+ FC8 * als * (1385. + t * ( t * (543. - t) - 3111.) )
+		))));
+	return (xy);
+}
+FORWARD(s_forward); /* sphere */
+	double b, cosphi;
+
+	b = (cosphi = cos(lp.phi)) * sin(lp.lam);
+	if (fabs(fabs(b) - 1.) <= EPS10) F_ERROR;
+	xy.x = aks5 * log((1. + b) / (1. - b));
+	if ((b = fabs( xy.y = cosphi * cos(lp.lam) / sqrt(1. - b * b) )) >= 1.) {
+		if ((b - 1.) > EPS10) F_ERROR
+		else xy.y = 0.;
+	} else
+		xy.y = acos(xy.y);
+	if (lp.phi < 0.) xy.y = -xy.y;
+	xy.y = aks0 * (xy.y - P->phi0);
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double n, con, cosphi, d, ds, sinphi, t;
+
+	lp.phi = pj_inv_mlfn(P->ml0 + xy.y / P->k0, P->es, P->en);
+	if (fabs(lp.phi) >= HALFPI) {
+		lp.phi = xy.y < 0. ? -HALFPI : HALFPI;
+		lp.lam = 0.;
+	} else {
+		sinphi = sin(lp.phi);
+		cosphi = cos(lp.phi);
+		t = fabs(cosphi) > 1e-10 ? sinphi/cosphi : 0.;
+		n = P->esp * cosphi * cosphi;
+		d = xy.x * sqrt(con = 1. - P->es * sinphi * sinphi) / P->k0;
+		con *= t;
+		t *= t;
+		ds = d * d;
+		lp.phi -= (con * ds / (1.-P->es)) * FC2 * (1. -
+			ds * FC4 * (5. + t * (3. - 9. *  n) + n * (1. - 4 * n) -
+			ds * FC6 * (61. + t * (90. - 252. * n +
+				45. * t) + 46. * n
+		   - ds * FC8 * (1385. + t * (3633. + t * (4095. + 1574. * t)) )
+			)));
+		lp.lam = d*(FC1 -
+			ds*FC3*( 1. + 2.*t + n -
+			ds*FC5*(5. + t*(28. + 24.*t + 8.*n) + 6.*n
+		   - ds * FC7 * (61. + t * (662. + t * (1320. + 720. * t)) )
+		))) / cosphi;
+	}
+	return (lp);
+}
+INVERSE(s_inverse); /* sphere */
+	double h, g;
+
+	h = exp(xy.x / aks0);
+	g = .5 * (h - 1. / h);
+	h = cos(P->phi0 + xy.y / aks0);
+	lp.phi = asin(sqrt((1. - h * h) / (1. + g * g)));
+	if (xy.y < 0.) lp.phi = -lp.phi;
+	lp.lam = (g || h) ? atan2(g, h) : 0.;
+	return (lp);
+}
+FREEUP;
+	if (P) {
+		if (P->en)
+			pj_dalloc(P->en);
+		pj_dalloc(P);
+	}
+}
+	static PJ *
+setup(PJ *P) { /* general initialization */
+	if (P->es) {
+		if (!(P->en = pj_enfn(P->es)))
+			E_ERROR_0;
+		P->ml0 = pj_mlfn(P->phi0, sin(P->phi0), cos(P->phi0), P->en);
+		P->esp = P->es / (1. - P->es);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		aks0 = P->k0;
+		aks5 = .5 * aks0;
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+	return P;
+}
+ENTRY1(tmerc, en)
+ENDENTRY(setup(P))
+ENTRY1(utm, en)
+	int zone;
+
+	if (!P->es) E_ERROR(-34);
+	P->y0 = pj_param(P->params, "bsouth").i ? 10000000. : 0.;
+	P->x0 = 500000.;
+	if (pj_param(P->params, "tzone").i) /* zone input ? */
+		if ((zone = pj_param(P->params, "izone").i) > 0 && zone <= 60)
+			--zone;
+		else
+			E_ERROR(-35)
+	else /* nearest central meridian input */
+		if ((zone = floor((adjlon(P->lam0) + PI) * 30. / PI)) < 0)
+			zone = 0;
+		else if (zone >= 60)
+			zone = 59;
+	P->lam0 = (zone + .5) * PI / 30. - PI;
+	P->k0 = 0.9996;
+	P->phi0 = 0.;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nzmg.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nzmg.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nzmg.c	(revision 256)
@@ -0,0 +1,114 @@
+/******************************************************************************
+ * $Id: PJ_nzmg.c,v 1.3 2002/12/14 19:37:29 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the nzmg (New Zealand Map Grid) projection.
+ *           Very loosely based upon DMA code by Bradford W. Drew
+ * Author:   Gerald Evenden
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: PJ_nzmg.c,v $
+ * Revision 1.3  2002/12/14 19:37:29  warmerda
+ * updated headers
+ *
+ */
+
+/*  */
+#define PJ_LIB__
+#include	<projects.h>
+
+PJ_CVSID("$Id: PJ_nzmg.c,v 1.3 2002/12/14 19:37:29 warmerda Exp $");
+
+PROJ_HEAD(nzmg, "New Zealand Map Grid") "\n\tfixed Earth";
+
+#define EPSLN 1e-10
+#define SEC5_TO_RAD 0.4848136811095359935899141023
+#define RAD_TO_SEC5 2.062648062470963551564733573
+	static COMPLEX
+bf[] = {
+	{.7557853228,	0.0},
+	{.249204646,	.003371507},
+	{-.001541739,	.041058560},
+	{-.10162907,	.01727609},
+	{-.26623489,	-.36249218},
+	{-.6870983,	-1.1651967} };
+	static double
+tphi[] = { 1.5627014243, .5185406398, -.03333098, -.1052906, -.0368594,
+	.007317, .01220, .00394, -.0013 },
+tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .0117879,
+	-.0055161, .0026906, -.001333, .00067, -.00034 };
+#define Nbf 5
+#define Ntpsi 9
+#define Ntphi 8
+FORWARD(e_forward); /* ellipsoid */
+	COMPLEX p;
+	double *C;
+	int i;
+
+	lp.phi = (lp.phi - P->phi0) * RAD_TO_SEC5;
+	for (p.r = *(C = tpsi + (i = Ntpsi)); i ; --i)
+		p.r = *--C + lp.phi * p.r;
+	p.r *= lp.phi;
+	p.i = lp.lam;
+	p = pj_zpoly1(p, bf, Nbf);
+	xy.x = p.i;
+	xy.y = p.r;
+	return xy;
+}
+INVERSE(e_inverse); /* ellipsoid */
+	int nn, i;
+	COMPLEX p, f, fp, dp;
+	double den, *C;
+
+	p.r = xy.y;
+	p.i = xy.x;
+	for (nn = 20; nn ;--nn) {
+		f = pj_zpolyd1(p, bf, Nbf, &fp);
+		f.r -= xy.y;
+		f.i -= xy.x;
+		den = fp.r * fp.r + fp.i * fp.i;
+		p.r += dp.r = -(f.r * fp.r + f.i * fp.i) / den;
+		p.i += dp.i = -(f.i * fp.r - f.r * fp.i) / den;
+		if ((fabs(dp.r) + fabs(dp.i)) <= EPSLN)
+			break;
+	}
+	if (nn) {
+		lp.lam = p.i;
+		for (lp.phi = *(C = tphi + (i = Ntphi)); i ; --i)
+			lp.phi = *--C + p.r * lp.phi;
+		lp.phi = P->phi0 + p.r * lp.phi * SEC5_TO_RAD;
+	} else
+		lp.lam = lp.phi = HUGE_VAL;
+	return lp;
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(nzmg)
+	/* force to International major axis */
+	P->ra = 1. / (P->a = 6378388.0);
+	P->lam0 = DEG_TO_RAD * 173.;
+	P->phi0 = DEG_TO_RAD * -41.;
+	P->x0 = 2510000.;
+	P->y0 = 6023150.;
+	P->inv = e_inverse; P->fwd = e_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/libcs2cs.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/libcs2cs.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/libcs2cs.c	(revision 256)
@@ -0,0 +1,382 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <math.h>
+#include "projects.h"
+#include "emess.h"
+
+#define MAX_LINE 200
+#define MAX_PARGS 100
+
+static projPJ   fromProj, toProj;
+
+static int
+reversein = 0,	/* != 0 reverse input arguments */
+reverseout = 0,	/* != 0 reverse output arguments */
+echoin = 0,	/* echo input data to output line */
+tag = '#';	/* beginning of line tag character */
+	static char
+*oform = (char *)0,	/* output format for x-y or decimal degrees */
+*oterr = "*\t*",	/* output line for unprojectable input */
+*usage =
+"%s\nusage: %s [ -eEfIlrstvwW [args] ] [ +opts[=arg] ]\n"
+"                   [+to [+opts[=arg] [ files ]\n";
+
+static struct FACTORS facs;
+//static double (*informat)(const char *, 
+//                          char **); /* input data deformatter function */
+
+
+/************************************************************************/
+/*                              process()                               */
+/*                                                                      */
+/*      File processing function.                                       */
+/************************************************************************/
+//static void process(FILE *fid) 
+//
+//{
+//    char line[MAX_LINE+3], *s, pline[40];
+//    projUV data;
+//
+//    for (;;) {
+//        double z;
+//
+//        ++emess_dat.File_line;
+//        if (!(s = fgets(line, MAX_LINE, fid)))
+//            break;
+//        if (!strchr(s, '\n')) { /* overlong line */
+//            int c;
+//            (void)strcat(s, "\n");
+//				/* gobble up to newline */
+//            while ((c = fgetc(fid)) != EOF && c != '\n') ;
+//        }
+//        if (*s == tag) {
+//            fputs(line, stdout);
+//            continue;
+//        }
+//
+//        if (reversein) {
+//            data.v = (*informat)(s, &s);
+//            data.u = (*informat)(s, &s);
+//        } else {
+//            data.u = (*informat)(s, &s);
+//            data.v = (*informat)(s, &s);
+//        }
+//
+//        z = strtod( s, &s );
+//
+//        if (data.v == HUGE_VAL)
+//            data.u = HUGE_VAL;
+//
+//        if (!*s && (s > line)) --s; /* assumed we gobbled \n */
+//
+//        if ( echoin) {
+//            int t;
+//            t = *s;
+//            *s = '\0';
+//            (void)fputs(line, stdout);
+//            *s = t;
+//            putchar('\t');
+//        }
+//
+//        if (data.u != HUGE_VAL) {
+//            if( pj_transform( fromProj, toProj, 1, 0, 
+//                              &(data.u), &(data.v), &z ) != 0 )
+//            {
+//                data.u = HUGE_VAL;
+//                data.v = HUGE_VAL;
+//            }
+//        }
+//
+//        if (data.u == HUGE_VAL) /* error output */
+//            fputs(oterr, stdout);
+//
+//        else if (pj_is_latlong(toProj) && !oform) {	/*ascii DMS output */
+//            if (reverseout) {
+//                fputs(rtodms(pline, data.v, 'N', 'S'), stdout);
+//                putchar('\t');
+//                fputs(rtodms(pline, data.u, 'E', 'W'), stdout);
+//            } else {
+//                fputs(rtodms(pline, data.u, 'E', 'W'), stdout);
+//                putchar('\t');
+//                fputs(rtodms(pline, data.v, 'N', 'S'), stdout);
+//            }
+//
+//        } else {	/* x-y or decimal degree ascii output */
+//            if ( pj_is_latlong(toProj) ) {
+//                data.v *= RAD_TO_DEG;
+//                data.u *= RAD_TO_DEG;
+//            }
+//            if (reverseout) {
+//                printf(oform,data.v); putchar('\t');
+//                printf(oform,data.u);
+//            } else {
+//                printf(oform,data.u); putchar('\t');
+//                printf(oform,data.v);
+//            }
+//        }
+//
+//        putchar(' ');
+//        if( oform != NULL )
+//            printf( oform, z );
+//        else
+//            printf( "%.3f", z );
+//        fputs("\n", stdout );
+//    }
+//}
+
+/************************************************************************/
+/*                                main()                                */
+/************************************************************************/
+
+int libcs2cs(int argc,char** argv,double* input1,double* input2,double* input3) 
+{
+    char *arg, **eargv = argv, *from_argv[MAX_PARGS], *to_argv[MAX_PARGS],
+        **iargv = argv;
+    FILE *fid;
+    int from_argc=0, to_argc=0, iargc = argc, eargc = 0, c, mon = 0;
+    int have_to_flag = 0, inverse = 0, i;
+	projUV data;
+	double z;
+
+    if (emess_dat.Prog_name = strrchr(*argv,DIR_CHAR))
+        ++emess_dat.Prog_name;
+    else emess_dat.Prog_name = *argv;
+    inverse = ! strncmp(emess_dat.Prog_name, "inv", 3);
+    if (argc <= 1 ) {
+        (void)fprintf(stderr, usage, pj_get_release(), emess_dat.Prog_name);
+        exit (0);
+    }
+    /* process run line arguments */
+    while (--argc > 0) { /* collect run line arguments */
+        if(**++argv == '-') for(arg = *argv;;) {
+            switch(*++arg) {
+              case '\0': /* position of "stdin" */
+                if (arg[-1] == '-') eargv[eargc++] = "-";
+                break;
+              case 'v': /* monitor dump of initialization */
+                mon = 1;
+                continue;
+              case 'I': /* alt. method to spec inverse */
+                inverse = 1;
+                continue;
+              case 'E': /* echo ascii input to ascii output */
+                echoin = 1;
+                continue;
+              case 't': /* set col. one char */
+                if (arg[1]) tag = *++arg;
+                else emess(1,"missing -t col. 1 tag");
+                continue;
+              case 'l': /* list projections, ellipses or units */
+                if (!arg[1] || arg[1] == 'p' || arg[1] == 'P') {
+                    /* list projections */
+                    struct PJ_LIST *lp;
+                    int do_long = arg[1] == 'P', c;
+                    char *str;
+
+                    for (lp = pj_get_list_ref() ; lp->id ; ++lp) {
+                        (void)printf("%s : ", lp->id);
+                        if (do_long)  /* possibly multiline description */
+                            (void)puts(*lp->descr);
+                        else { /* first line, only */
+                            str = *lp->descr;
+                            while ((c = *str++) && c != '\n')
+                                putchar(c);
+                            putchar('\n');
+                        }
+                    }
+                } else if (arg[1] == '=') { /* list projection 'descr' */
+                    struct PJ_LIST *lp;
+
+                    arg += 2;
+                    for (lp = pj_get_list_ref() ; lp->id ; ++lp)
+                        if (!strcmp(lp->id, arg)) {
+                            (void)printf("%9s : %s\n", lp->id, *lp->descr);
+                            break;
+                        }
+                } else if (arg[1] == 'e') { /* list ellipses */
+                    struct PJ_ELLPS *le;
+
+                    for (le = pj_get_ellps_ref(); le->id ; ++le)
+                        (void)printf("%9s %-16s %-16s %s\n",
+                                     le->id, le->major, le->ell, le->name);
+                } else if (arg[1] == 'u') { /* list units */
+                    struct PJ_UNITS *lu;
+
+                    for (lu = pj_get_units_ref(); lu->id ; ++lu)
+                        (void)printf("%12s %-20s %s\n",
+                                     lu->id, lu->to_meter, lu->name);
+                } else if (arg[1] == 'd') { /* list datums */
+                    struct PJ_DATUMS *ld;
+
+                    printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" );
+                    for (ld = pj_get_datums_ref(); ld->id ; ++ld)
+                    {
+                        printf("%12s %-12s %-30s\n",
+                               ld->id, ld->ellipse_id, ld->defn);
+                        if( ld->comments != NULL && strlen(ld->comments) > 0 )
+                            printf( "%25s %s\n", " ", ld->comments );
+                    }
+                } else if( arg[1] == 'm') { /* list prime meridians */
+                    struct PJ_PRIME_MERIDIANS *lpm;
+
+                    for (lpm = pj_get_prime_meridians_ref(); lpm->id ; ++lpm)
+                        (void)printf("%12s %-30s\n",
+                                     lpm->id, lpm->defn);
+                } else
+                    emess(1,"invalid list option: l%c",arg[1]);
+                exit(0);
+                continue; /* artificial */
+              case 'e': /* error line alternative */
+                if (--argc <= 0)
+                    noargument:			   
+                emess(1,"missing argument for -%c",*arg);
+                oterr = *++argv;
+                continue;
+              case 'W': /* specify seconds precision */
+              case 'w': /* -W for constant field width */
+                if ((c = arg[1]) != 0 && isdigit(c)) {
+                    set_rtodms(c - '0', *arg == 'W');
+                    ++arg;
+                } else
+                    emess(1,"-W argument missing or non-digit");
+                continue;
+              case 'f': /* alternate output format degrees or xy */
+                if (--argc <= 0) goto noargument;
+                oform = *++argv;
+                continue;
+              case 'r': /* reverse input */
+                reversein = 1;
+                continue;
+              case 's': /* reverse output */
+                reverseout = 1;
+                continue;
+              default:
+                emess(1, "invalid option: -%c",*arg);
+                break;
+            }
+            break;
+
+        } else if (strcmp(*argv,"+to") == 0 ) {
+            have_to_flag = 1;
+
+        } else if (**argv == '+') { /* + argument */
+            if( have_to_flag )
+            {
+                if( to_argc < MAX_PARGS )
+                    to_argv[to_argc++] = *argv + 1;
+                else
+                    emess(1,"overflowed + argument table");
+            }
+            else 
+            {
+                if (from_argc < MAX_PARGS)
+                    from_argv[from_argc++] = *argv + 1;
+                else
+                    emess(1,"overflowed + argument table");
+            }
+        } else /* assumed to be input file name(s) */
+            eargv[eargc++] = *argv;
+    }
+    if (eargc == 0 ) /* if no specific files force sysin */
+        eargv[eargc++] = "-";
+
+    /* 
+     * If the user has requested inverse, then just reverse the
+     * coordinate systems.
+     */
+    if( inverse )
+    {
+        int     argcount;
+        
+        for( i = 0; i < MAX_PARGS; i++ )
+        {
+            char *arg;
+
+            arg = from_argv[i];
+            from_argv[i] = to_argv[i];
+            to_argv[i] = arg;
+        }
+
+        argcount = from_argc;
+        from_argc = to_argc;
+        to_argc = argcount;
+    }
+
+    if (!(fromProj = pj_init(from_argc, from_argv)))
+    {
+        printf( "Using from definition: " );
+        for( i = 0; i < from_argc; i++ )
+            printf( "%s ", from_argv[i] );
+        printf( "\n" );
+
+        emess(3,"projection initialization failure\ncause: %s",
+              pj_strerrno(pj_errno));
+    }
+
+    if( to_argc == 0 )
+    {
+        if (!(toProj = pj_latlong_from_proj( fromProj )))
+        {
+            printf( "Using to definition: " );
+            for( i = 0; i < to_argc; i++ )
+                printf( "%s ", to_argv[i] );
+            printf( "\n" );
+            
+            emess(3,"projection initialization failure\ncause: %s",
+                  pj_strerrno(pj_errno));
+        }   
+    }
+    else if (!(toProj = pj_init(to_argc, to_argv)))
+    {
+        printf( "Using to definition: " );
+        for( i = 0; i < to_argc; i++ )
+            printf( "%s ", to_argv[i] );
+        printf( "\n" );
+
+        emess(3,"projection initialization failure\ncause: %s",
+              pj_strerrno(pj_errno));
+    }
+
+    if (mon) {
+        printf( "%c ---- From Coordinate System ----\n", tag );
+        pj_pr_list(fromProj);
+        printf( "%c ---- To Coordinate System ----\n", tag );
+        pj_pr_list(toProj);
+    }
+
+	if (reversein)
+	{
+		data.v = *input1;
+		data.u = *input2;
+	}
+	else
+	{
+		data.u = *input1;
+		data.v = *input2;
+	}
+	z = *input3;
+	if (data.v == HUGE_VAL) data.u = HUGE_VAL;
+	if (data.u != HUGE_VAL)
+	{
+		if( pj_transform( fromProj, toProj, 1, 0, &(data.u), &(data.v), &z ) != 0 )
+		{
+			data.u = HUGE_VAL;
+			data.v = HUGE_VAL;
+		}
+	}
+	if (data.u == HUGE_VAL) return(1);/* error output */
+	*input1=data.u;
+	*input2=data.v;
+	*input3=z;
+
+    if( fromProj != NULL )
+        pj_free( fromProj );
+    if( toProj != NULL )
+        pj_free( toProj );
+
+    pj_deallocate_grids();
+
+    return(0); /* normal completion */
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_list.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_list.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_list.c	(revision 256)
@@ -0,0 +1,14 @@
+#ifndef lint
+static const char SCCSID[]="@(#)pj_list.c	4.6	94/02/15	GIE	REL";
+#endif
+/* Projection System: default list of projections
+** Use local definition of PJ_LIST_H for subset.
+*/
+#define PJ_LIST_H "pj_list.h"
+#include "projects.h"
+
+struct PJ_LIST  *pj_get_list_ref()
+
+{
+    return pj_list;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_crast.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_crast.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_crast.c	(revision 256)
@@ -0,0 +1,25 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_crast.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)")
+"\n\tPCyl., Sph.";
+#define XM	0.97720502380583984317
+#define RXM	1.02332670794648848847
+#define YM	3.06998012383946546542
+#define RYM	0.32573500793527994772
+#define THIRD	0.333333333333333333
+FORWARD(s_forward); /* spheroid */
+	lp.phi *= THIRD;
+	xy.x = XM * lp.lam * (2. * cos(lp.phi + lp.phi) - 1.);
+	xy.y = YM * sin(lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = 3. * asin(xy.y * RYM);
+	lp.lam = xy.x * RXM / (2. * cos((lp.phi + lp.phi) * THIRD) - 1);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(crast) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_urmfps.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_urmfps.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_urmfps.c	(revision 256)
@@ -0,0 +1,43 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_urmfps.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	n, C_y;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") "\n\tPCyl, Sph.\n\tn=";
+PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)") "\n\tPCyl, Sph.";
+#define C_x 0.8773826753
+#define Cy 1.139753528477
+FORWARD(s_forward); /* sphere */
+	lp.phi = aasin(P->n * sin(lp.phi));
+	xy.x = C_x * lp.lam * cos(lp.phi);
+	xy.y = P->C_y * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* sphere */
+	xy.y /= P->C_y;
+	lp.phi = aasin(sin(xy.y) / P->n);
+	lp.lam = xy.x / (C_x * cos(xy.y));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->C_y = Cy / P->n;
+	P->es = 0.;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	return P;
+}
+ENTRY0(urmfps)
+	if (pj_param(P->params, "tn").i) {
+		P->n = pj_param(P->params, "dn").f;
+		if (P->n <= 0. || P->n > 1.)
+			E_ERROR(-40)
+	} else
+		E_ERROR(-40)
+ENDENTRY(setup(P))
+ENTRY0(wag1)
+	P->n = 0.8660254037844386467637231707;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bipc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bipc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bipc.c	(revision 256)
@@ -0,0 +1,135 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_bipc.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	int	noskew;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(bipc, "Bipolar conic of western hemisphere")
+	"\n\tConic Sph.";
+# define EPS	1e-10
+# define EPS10	1e-10
+# define ONEEPS 1.000000001
+# define NITER	10
+# define lamB	-.34894976726250681539
+# define n	.63055844881274687180
+# define F	1.89724742567461030582
+# define Azab	.81650043674686363166
+# define Azba	1.82261843856185925133
+# define T	1.27246578267089012270
+# define rhoc	1.20709121521568721927
+# define cAzc	.69691523038678375519
+# define sAzc	.71715351331143607555
+# define C45	.70710678118654752469
+# define S45	.70710678118654752410
+# define C20	.93969262078590838411
+# define S20	-.34202014332566873287
+# define R110	1.91986217719376253360
+# define R104	1.81514242207410275904
+FORWARD(s_forward); /* spheroid */
+	double cphi, sphi, tphi, t, al, Az, z, Av, cdlam, sdlam, r;
+	int tag;
+
+	cphi = cos(lp.phi);
+	sphi = sin(lp.phi);
+	cdlam = cos(sdlam = lamB - lp.lam);
+	sdlam = sin(sdlam);
+	if (fabs(fabs(lp.phi) - HALFPI) < EPS10) {
+		Az = lp.phi < 0. ? PI : 0.;
+		tphi = HUGE_VAL;
+	} else {
+		tphi = sphi / cphi;
+		Az = atan2(sdlam , C45 * (tphi - cdlam));
+	}
+	if( (tag = (Az > Azba)) ) {
+		cdlam = cos(sdlam = lp.lam + R110);
+		sdlam = sin(sdlam);
+		z = S20 * sphi + C20 * cphi * cdlam;
+		if (fabs(z) > 1.) {
+			if (fabs(z) > ONEEPS) F_ERROR
+			else z = z < 0. ? -1. : 1.;
+		} else
+			z = acos(z);
+		if (tphi != HUGE_VAL)
+			Az = atan2(sdlam, (C20 * tphi - S20 * cdlam));
+		Av = Azab;
+		xy.y = rhoc;
+	} else {
+		z = S45 * (sphi + cphi * cdlam);
+		if (fabs(z) > 1.) {
+			if (fabs(z) > ONEEPS) F_ERROR
+			else z = z < 0. ? -1. : 1.;
+		} else
+			z = acos(z);
+		Av = Azba;
+		xy.y = -rhoc;
+	}
+	if (z < 0.) F_ERROR;
+	r = F * (t = pow(tan(.5 * z), n));
+	if ((al = .5 * (R104 - z)) < 0.) F_ERROR;
+	al = (t + pow(al, n)) / T;
+	if (fabs(al) > 1.) {
+		if (fabs(al) > ONEEPS) F_ERROR
+		else al = al < 0. ? -1. : 1.;
+	} else
+		al = acos(al);
+	if (fabs(t = n * (Av - Az)) < al)
+		r /= cos(al + (tag ? t : -t));
+	xy.x = r * sin(t);
+	xy.y += (tag ? -r : r) * cos(t);
+	if (P->noskew) {
+		t = xy.x;
+		xy.x = -xy.x * cAzc - xy.y * sAzc; 
+		xy.y = -xy.y * cAzc + t * sAzc; 
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t, r, rp, rl, al, z, fAz, Az, s, c, Av;
+	int neg, i;
+
+	if (P->noskew) {
+		t = xy.x;
+		xy.x = -xy.x * cAzc + xy.y * sAzc; 
+		xy.y = -xy.y * cAzc - t * sAzc; 
+	}
+	if( (neg = (xy.x < 0.)) ) {
+		xy.y = rhoc - xy.y;
+		s = S20;
+		c = C20;
+		Av = Azab;
+	} else {
+		xy.y += rhoc;
+		s = S45;
+		c = C45;
+		Av = Azba;
+	}
+	rl = rp = r = hypot(xy.x, xy.y);
+	fAz = fabs(Az = atan2(xy.x, xy.y));
+	for (i = NITER; i ; --i) {
+		z = 2. * atan(pow(r / F,1 / n));
+		al = acos((pow(tan(.5 * z), n) +
+		   pow(tan(.5 * (R104 - z)), n)) / T);
+		if (fAz < al)
+			r = rp * cos(al + (neg ? Az : -Az));
+		if (fabs(rl - r) < EPS)
+			break;
+		rl = r;
+	}
+	if (! i) I_ERROR;
+	Az = Av - Az / n;
+	lp.phi = asin(s * cos(z) + c * sin(z) * cos(Az));
+	lp.lam = atan2(sin(Az), c / tan(z) - s * cos(Az));
+	if (neg)
+		lp.lam -= R110;
+	else
+		lp.lam = lamB - lp.lam;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(bipc)
+	P->noskew = pj_param(P->params, "bns").i;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/dmstor.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/dmstor.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/dmstor.c	(revision 256)
@@ -0,0 +1,111 @@
+/* Convert DMS string to radians */
+#ifndef lint
+static const char SCCSID[]="@(#)dmstor.c	4.4	93/06/16	GIE	REL";
+#endif
+#include <projects.h>
+#include <string.h>
+#include <ctype.h>
+
+static double proj_strtod(char *nptr, char **endptr);
+
+/* following should be sufficient for all but the rediculous */
+#define MAX_WORK 64
+	static const char
+*sym = "NnEeSsWw";
+	static const double
+vm[] = {
+	.0174532925199433,
+	.0002908882086657216,
+	.0000048481368110953599
+};
+	double
+dmstor(const char *is, char **rs) {
+	int sign, n, nl;
+	char *p, *s, work[MAX_WORK];
+	double v, tv;
+
+	if (rs)
+		*rs = (char *)is;
+	/* copy sting into work space */
+	while (isspace(sign = *is)) ++is;
+	for (n = MAX_WORK, s = work, p = (char *)is; isgraph(*p) && --n ; )
+		*s++ = *p++;
+	*s = '\0';
+	/* it is possible that a really odd input (like lots of leading
+		zeros) could be truncated in copying into work.  But ... */
+	sign = *(s = work);
+	if (sign == '+' || sign == '-') s++;
+	else sign = '+';
+	for (v = 0., nl = 0 ; nl < 3 ; nl = n + 1 ) {
+		if (!(isdigit(*s) || *s == '.')) break;
+		if ((tv = proj_strtod(s, &s)) == HUGE_VAL)
+			return tv;
+		switch (*s) {
+		case 'D': case 'd':
+			n = 0; break;
+		case '\'':
+			n = 1; break;
+		case '"':
+			n = 2; break;
+		case 'r': case 'R':
+			if (nl) {
+				pj_errno = -16;
+				return HUGE_VAL;
+			}
+			++s;
+			v = tv;
+			goto skip;
+		default:
+			v += tv * vm[nl];
+		skip:	n = 4;
+			continue;
+		}
+		if (n < nl) {
+			pj_errno = -16;
+			return HUGE_VAL;
+		}
+		v += tv * vm[n];
+		++s;
+	}
+		/* postfix sign */
+	if (*s && (p = strchr(sym, *s))) {
+		sign = (p - sym) >= 4 ? '-' : '+';
+		++s;
+	}
+	if (sign == '-')
+		v = -v;
+	if (rs) /* return point of next char after valid string */
+		*rs = (char *)is + (s - work);
+	return v;
+}
+
+static double
+proj_strtod(char *nptr, char **endptr) 
+
+{
+    char c, *cp = nptr;
+    double result;
+
+    /*
+     * Scan for characters which cause problems with VC++ strtod()
+     */
+    while ((c = *cp) != '\0') {
+        if (c == 'd' || c == 'D') {
+
+            /*
+             * Found one, so NUL it out, call strtod(),
+             * then restore it and return
+             */
+            *cp = '\0';
+            result = strtod(nptr, endptr);
+            *cp = c;
+            return result;
+        }
+        ++cp;
+    }
+
+    /* no offending characters, just handle normally */
+
+    return strtod(nptr, endptr);
+}
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_release.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_release.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_release.c	(revision 256)
@@ -0,0 +1,11 @@
+/* <<< Release Notice for library >>> */
+
+#include <projects.h>
+
+char const pj_release[]="Rel. 4.4.9, 29 Oct 2004";
+
+const char *pj_get_release()
+
+{
+    return pj_release;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/jniproj.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/jniproj.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/jniproj.c	(revision 256)
@@ -0,0 +1,176 @@
+/*!
+* \file jniproj.c
+*
+* \brief
+* functions used by the java/jni wrappers of jproj4
+*
+*
+* $Id: jniproj.c,v 1.1 2004/10/25 14:03:32 fwarmerdam Exp $
+*
+* \author Antonello Andrea
+* \date   Wed Oct 20 23:10:24 CEST 2004
+*/
+#include "proj_config.h"
+
+#ifdef JNI_ENABLED
+
+#include "projects.h"
+#include "org_proj4_Projections.h"
+#include <jni.h>
+
+#define arraysize 300
+
+/*!
+ * \brief
+ * executes reprojection 
+ * 
+ * JNI informations:
+ * Class:     org_proj4_Projections
+ * Method:    transform
+ * Signature: ([D[D[DLjava/lang/String;Ljava/lang/String;JI)V
+ * 
+ *
+ * \param env - parameter used by jni (see JNI specification)
+ * \param parent - parameter used by jni (see JNI specification)
+ * \param firstcoord - array of x coordinates
+ * \param secondcoord - array of y coordinates
+ * \param values - array of z coordinates
+ * \param src - definition of the source projection
+ * \param dest - definition of the destination projection
+ * \param pcount
+ * \param poffset
+*/
+JNIEXPORT void JNICALL Java_org_proj4_Projections_transform
+  (JNIEnv * env, jobject parent, jdoubleArray firstcoord, jdoubleArray secondcoord, jdoubleArray values, jstring src, jstring dest, jlong pcount, jint poffset)
+{
+	int i;
+	projPJ src_pj, dst_pj;
+	char * srcproj_def = (char *) (*env)->GetStringUTFChars (env, src, 0); 
+	char * destproj_def = (char *) (*env)->GetStringUTFChars (env, dest, 0);
+
+	if (!(src_pj = pj_init_plus(srcproj_def)))
+		exit(1);
+	if (!(dst_pj = pj_init_plus(destproj_def)))
+		exit(1);
+
+	double *xcoord = (* env)-> GetDoubleArrayElements(env, firstcoord, NULL); 
+	double *ycoord = (* env) -> GetDoubleArrayElements(env, secondcoord, NULL); 
+	double *zcoord = (* env) -> GetDoubleArrayElements(env, values, NULL); 
+
+	jint sizeofdata = (*env)->GetArrayLength(env, firstcoord);
+	for(i = 0;i<sizeofdata;i++)
+	{
+		pj_transform( src_pj, dst_pj, pcount,poffset, xcoord, ycoord, zcoord);
+		xcoord++;
+		ycoord++;
+		zcoord++;
+	}
+	xcoord = xcoord - sizeofdata;
+	ycoord = ycoord - sizeofdata;
+	zcoord = zcoord - sizeofdata;
+
+	(* env)->ReleaseDoubleArrayElements(env,firstcoord,(jdouble *) xcoord,JNI_COMMIT);
+	(* env)->ReleaseDoubleArrayElements(env,secondcoord,(jdouble *) ycoord,JNI_COMMIT);
+	(* env)->ReleaseDoubleArrayElements(env,values,(jdouble *) zcoord,JNI_COMMIT);
+
+	pj_free( src_pj );
+	pj_free( dst_pj );
+}
+
+/*!
+ * \brief
+ * retrieves projection parameters
+ * 
+ * JNI informations:
+ * Class:     org_proj4_Projections
+ * Method:    getProjInfo
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ * 
+ *
+ * \param env - parameter used by jni (see JNI specification)
+ * \param parent - parameter used by jni (see JNI specification)
+ * \param projdefinition - definition of the projection
+*/
+JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getProjInfo
+  (JNIEnv * env, jobject parent, jstring projdefinition)
+{
+	PJ *pj;
+	char * pjdesc;
+	char info[arraysize];
+	
+	char * proj_def = (char *) (*env)->GetStringUTFChars (env, projdefinition, 0);
+	
+	if (!(pj = pj_init_plus(proj_def)))
+		exit(1);
+	
+	// put together all the info of the projection and free the pointer to pjdesc
+	pjdesc = pj_get_def(pj, 0);
+	strcpy(info,pjdesc);
+	pj_dalloc(pjdesc);
+	
+	return (*env)->NewStringUTF(env,info); 
+}
+
+
+/*!
+ * \brief
+ * retrieves ellipsoid parameters
+ * 
+ * JNI informations:
+ * Class:     org_proj4_Projections
+ * Method:    getEllipsInfo
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ * 
+ *
+ * \param env - parameter used by jni (see JNI specification)
+ * \param parent - parameter used by jni (see JNI specification)
+ * \param projdefinition - definition of the projection
+*/
+JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getEllipsInfo
+  (JNIEnv * env, jobject parent, jstring projdefinition)
+{
+	PJ *pj;
+	char * pjdesc;
+	char ellipseinfo[arraysize];
+	char temp[50];
+	
+	char * proj_def = (char *) (*env)->GetStringUTFChars (env, projdefinition, 0);
+	
+	if (!(pj = pj_init_plus(proj_def)))
+		exit(1);
+	
+	// put together all the info of the ellipsoid 
+/* 	sprintf(temp,"name: %s;", pj->descr); */
+	sprintf(temp,"name: not available;");
+	strcpy(ellipseinfo,temp);
+	sprintf(temp,"a: %lf;", pj->a);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"e: %lf;", pj->e);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"es: %lf;", pj->es);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"ra: %lf;", pj->ra);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"one_es: %lf;", pj->one_es);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"rone_es: %lf;", pj->rone_es);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"lam0: %lf;", pj->lam0);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"phi0: %lf;", pj->phi0);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"x0: %lf;", pj->x0);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"y0: %lf;", pj->y0);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"k0: %lf;", pj->k0);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"to_meter: %lf;", pj->to_meter);
+	strcat(ellipseinfo,temp);
+	sprintf(temp,"fr_meter: %lf;", pj->fr_meter);
+	strcat(ellipseinfo,temp);
+
+	return (*env)->NewStringUTF(env,ellipseinfo); 
+}
+
+#endif
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sterea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sterea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sterea.c	(revision 256)
@@ -0,0 +1,97 @@
+/*
+** libproj -- library of cartographic projections
+**
+** Copyright (c) 2003   Gerald I. Evenden
+*/
+static const char
+LIBPROJ_ID[] = "$Id: PJ_sterea.c,v 1.1 2004/10/20 17:04:00 fwarmerdam Exp $";
+/*
+** Permission is hereby granted, free of charge, to any person obtaining
+** a copy of this software and associated documentation files (the
+** "Software"), to deal in the Software without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Software, and to
+** permit persons to whom the Software is furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be
+** included in all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#define PROJ_PARMS__ \
+	double phic0; \
+	double cosc0, sinc0; \
+	double R2; \
+	void *en;
+
+#define PJ_LIB__
+#include	<projects.h>
+
+PROJ_HEAD(sterea, "Oblique Stereographic Alternative")
+	"\n\tAzimuthal, Sph&Ell";
+# define DEL_TOL	1.e-14
+# define MAX_ITER	10
+
+FORWARD(e_forward); /* ellipsoid */
+	double cosc, sinc, cosl, k;
+
+	lp = pj_gauss(lp, P->en);
+	sinc = sin(lp.phi);
+	cosc = cos(lp.phi);
+	cosl = cos(lp.lam);
+	k = P->k0 * P->R2 / (1. + P->sinc0 * sinc + P->cosc0 * cosc * cosl);
+	xy.x = k * cosc * sin(lp.lam);
+	xy.y = k * (P->cosc0 * sinc - P->sinc0 * cosc * cosl);
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double rho, c, sinc, cosc;
+
+	xy.x /= P->k0;
+	xy.y /= P->k0;
+	if((rho = hypot(xy.x, xy.y))) {
+		c = 2. * atan2(rho, P->R2);
+		sinc = sin(c);
+		cosc = cos(c);
+		lp.phi = asin(cosc * P->sinc0 + xy.y * sinc * P->cosc0 / rho);
+		lp.lam = atan2(xy.x * sinc, rho * P->cosc0 * cosc -
+			xy.y * P->sinc0 * sinc);
+	} else {
+		lp.phi = P->phic0;
+		lp.lam = 0.;
+	}
+	return(pj_inv_gauss(lp, P->en));
+}
+FREEUP; if (P) { if (P->en) free(P->en); free(P); } }
+ENTRY0(sterea)
+	double R;
+
+	if (!(P->en = pj_gauss_ini(P->e, P->phi0, &(P->phic0), &R))) E_ERROR_0;
+	P->sinc0 = sin(P->phic0);
+	P->cosc0 = cos(P->phic0);
+	P->R2 = 2. * R;
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+ENDENTRY(P)
+/*
+** $Log: PJ_sterea.c,v $
+** Revision 1.1  2004/10/20 17:04:00  fwarmerdam
+** New
+**
+** Revision 2.3  2004/04/07 17:18:32  gie
+** corrected comment stamp
+**
+** Revision 2.2  2003/08/05 00:15:09  gie
+** corrected 0 rho on inverse.
+**
+** Revision 2.1  2003/03/28 01:46:02  gie
+** Initial
+**
+*/
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck4.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck4.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck4.c	(revision 256)
@@ -0,0 +1,47 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eck4.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(eck4, "Eckert IV") "\n\tPCyl, Sph.";
+#define C_x	.42223820031577120149
+#define C_y	1.32650042817700232218
+#define RC_y	.75386330736002178205
+#define C_p	3.57079632679489661922
+#define RC_p	.28004957675577868795
+#define EPS	1e-7
+#define NITER	6
+FORWARD(s_forward); /* spheroid */
+	double p, V, s, c;
+	int i;
+
+	p = C_p * sin(lp.phi);
+	V = lp.phi * lp.phi;
+	lp.phi *= 0.895168 + V * ( 0.0218849 + V * 0.00826809 );
+	for (i = NITER; i ; --i) {
+		c = cos(lp.phi);
+		s = sin(lp.phi);
+		lp.phi -= V = (lp.phi + s * (c + 2.) - p) /
+			(1. + c * (c + 2.) - s * s);
+		if (fabs(V) < EPS)
+			break;
+	}
+	if (!i) {
+		xy.x = C_x * lp.lam;
+		xy.y = lp.phi < 0. ? -C_y : C_y;
+	} else {
+		xy.x = C_x * lp.lam * (1. + cos(lp.phi));
+		xy.y = C_y * sin(lp.phi);
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double c;
+
+	lp.phi = aasin(xy.y / C_y);
+	lp.lam = xy.x / (C_x * (1. + (c = cos(lp.phi))));
+	lp.phi = aasin((lp.phi + sin(lp.phi) * (c + 2.)) / C_p);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(eck4); P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geocent.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geocent.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geocent.c	(revision 256)
@@ -0,0 +1,463 @@
+/***************************************************************************/
+/* RSC IDENTIFIER:  GEOCENTRIC
+ *
+ * ABSTRACT
+ *
+ *    This component provides conversions between Geodetic coordinates (latitude,
+ *    longitude in radians and height in meters) and Geocentric coordinates
+ *    (X, Y, Z) in meters.
+ *
+ * ERROR HANDLING
+ *
+ *    This component checks parameters for valid values.  If an invalid value
+ *    is found, the error code is combined with the current error code using 
+ *    the bitwise or.  This combining allows multiple error codes to be
+ *    returned. The possible error codes are:
+ *
+ *      GEOCENT_NO_ERROR        : No errors occurred in function
+ *      GEOCENT_LAT_ERROR       : Latitude out of valid range
+ *                                 (-90 to 90 degrees)
+ *      GEOCENT_LON_ERROR       : Longitude out of valid range
+ *                                 (-180 to 360 degrees)
+ *      GEOCENT_A_ERROR         : Semi-major axis lessthan or equal to zero
+ *      GEOCENT_B_ERROR         : Semi-minor axis lessthan or equal to zero
+ *      GEOCENT_A_LESS_B_ERROR  : Semi-major axis less than semi-minor axis
+ *
+ *
+ * REUSE NOTES
+ *
+ *    GEOCENTRIC is intended for reuse by any application that performs
+ *    coordinate conversions between geodetic coordinates and geocentric
+ *    coordinates.
+ *    
+ *
+ * REFERENCES
+ *    
+ *    An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion,
+ *    Ralph Toms, February 1996  UCRL-JC-123138.
+ *    
+ *    Further information on GEOCENTRIC can be found in the Reuse Manual.
+ *
+ *    GEOCENTRIC originated from : U.S. Army Topographic Engineering Center
+ *                                 Geospatial Information Division
+ *                                 7701 Telegraph Road
+ *                                 Alexandria, VA  22310-3864
+ *
+ * LICENSES
+ *
+ *    None apply to this component.
+ *
+ * RESTRICTIONS
+ *
+ *    GEOCENTRIC has no restrictions.
+ *
+ * ENVIRONMENT
+ *
+ *    GEOCENTRIC was tested and certified in the following environments:
+ *
+ *    1. Solaris 2.5 with GCC version 2.8.1
+ *    2. Windows 95 with MS Visual C++ version 6
+ *
+ * MODIFICATIONS
+ *
+ *    Date              Description
+ *    ----              -----------
+ *    25-02-97          Original Code
+ *
+ * $Log: geocent.c,v $
+ * Revision 1.5  2004/10/25 15:34:36  fwarmerdam
+ * make names of geodetic funcs from geotrans unique
+ *
+ * Revision 1.4  2004/05/03 16:28:01  warmerda
+ * Apply iterative solution to geocentric_to_geodetic as suggestion from
+ * Lothar Gorling.
+ * http://bugzilla.remotesensing.org/show_bug.cgi?id=563
+ *
+ * Revision 1.3  2002/01/08 15:04:08  warmerda
+ * The latitude clamping fix from September in Convert_Geodetic_To_Geocentric
+ * was botched.  Fixed up now.
+ *
+ */
+
+
+/***************************************************************************/
+/*
+ *                               INCLUDES
+ */
+#include <math.h>
+#include "geocent.h"
+/*
+ *    math.h     - is needed for calls to sin, cos, tan and sqrt.
+ *    geocent.h  - is needed for Error codes and prototype error checking.
+ */
+
+
+/***************************************************************************/
+/*
+ *                               DEFINES
+ */
+#define PI         3.14159265358979323e0
+#define PI_OVER_2  (PI / 2.0e0)
+#define FALSE      0
+#define TRUE       1
+#define COS_67P5   0.38268343236508977  /* cosine of 67.5 degrees */
+#define AD_C       1.0026000            /* Toms region 1 constant */
+
+
+/***************************************************************************/
+/*
+ *                              GLOBAL DECLARATIONS
+ */
+/* Ellipsoid parameters, default to WGS 84 */
+double Geocent_a = 6378137.0;     /* Semi-major axis of ellipsoid in meters */
+double Geocent_b = 6356752.3142;  /* Semi-minor axis of ellipsoid           */
+
+double Geocent_a2 = 40680631590769.0;        /* Square of semi-major axis */
+double Geocent_b2 = 40408299984087.05;       /* Square of semi-minor axis */
+double Geocent_e2 = 0.0066943799901413800;   /* Eccentricity squared  */
+double Geocent_ep2 = 0.00673949675658690300; /* 2nd eccentricity squared */
+/*
+ * These state variables are for optimization purposes.  The only function
+ * that should modify them is Set_Geocentric_Parameters.
+ */
+
+
+/***************************************************************************/
+/*
+ *                              FUNCTIONS     
+ */
+
+
+long pj_Set_Geocentric_Parameters (double a, double b) 
+
+{ /* BEGIN Set_Geocentric_Parameters */
+/*
+ * The function Set_Geocentric_Parameters receives the ellipsoid parameters
+ * as inputs and sets the corresponding state variables.
+ *
+ *    a  : Semi-major axis, in meters.          (input)
+ *    b  : Semi-minor axis, in meters.          (input)
+ */
+  long Error_Code = GEOCENT_NO_ERROR;
+
+  if (a <= 0.0)
+    Error_Code |= GEOCENT_A_ERROR;
+  if (b <= 0.0)
+    Error_Code |= GEOCENT_B_ERROR;
+  if (a < b)
+    Error_Code |= GEOCENT_A_LESS_B_ERROR;
+  if (!Error_Code)
+  {
+    Geocent_a = a;
+    Geocent_b = b;
+    Geocent_a2 = a * a;
+    Geocent_b2 = b * b;
+    Geocent_e2 = (Geocent_a2 - Geocent_b2) / Geocent_a2;
+    Geocent_ep2 = (Geocent_a2 - Geocent_b2) / Geocent_b2;
+  }
+  return (Error_Code);
+} /* END OF Set_Geocentric_Parameters */
+
+
+void pj_Get_Geocentric_Parameters (double *a, 
+                                double *b)
+{ /* BEGIN Get_Geocentric_Parameters */
+/*
+ * The function Get_Geocentric_Parameters returns the ellipsoid parameters
+ * to be used in geocentric coordinate conversions.
+ *
+ *    a  : Semi-major axis, in meters.          (output)
+ *    b  : Semi-minor axis, in meters.          (output)
+ */
+
+  *a = Geocent_a;
+  *b = Geocent_b;
+} /* END OF Get_Geocentric_Parameters */
+
+
+long pj_Convert_Geodetic_To_Geocentric (double Latitude,
+                                     double Longitude,
+                                     double Height,
+                                     double *X,
+                                     double *Y,
+                                     double *Z) 
+{ /* BEGIN Convert_Geodetic_To_Geocentric */
+/*
+ * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
+ * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
+ * according to the current ellipsoid parameters.
+ *
+ *    Latitude  : Geodetic latitude in radians                     (input)
+ *    Longitude : Geodetic longitude in radians                    (input)
+ *    Height    : Geodetic height, in meters                       (input)
+ *    X         : Calculated Geocentric X coordinate, in meters    (output)
+ *    Y         : Calculated Geocentric Y coordinate, in meters    (output)
+ *    Z         : Calculated Geocentric Z coordinate, in meters    (output)
+ *
+ */
+  long Error_Code = GEOCENT_NO_ERROR;
+  double Rn;            /*  Earth radius at location  */
+  double Sin_Lat;       /*  sin(Latitude)  */
+  double Sin2_Lat;      /*  Square of sin(Latitude)  */
+  double Cos_Lat;       /*  cos(Latitude)  */
+
+  /*
+  ** Don't blow up if Latitude is just a little out of the value
+  ** range as it may just be a rounding issue.  Also removed longitude
+  ** test, it should be wrapped by cos() and sin().  NFW for PROJ.4, Sep/2001.
+  */
+  if( Latitude < -PI_OVER_2 && Latitude > -1.001 * PI_OVER_2 )
+      Latitude = -PI_OVER_2;
+  else if( Latitude > PI_OVER_2 && Latitude < 1.001 * PI_OVER_2 )
+      Latitude = PI_OVER_2;
+  else if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
+  { /* Latitude out of range */
+    Error_Code |= GEOCENT_LAT_ERROR;
+  }
+
+  if (!Error_Code)
+  { /* no errors */
+    if (Longitude > PI)
+      Longitude -= (2*PI);
+    Sin_Lat = sin(Latitude);
+    Cos_Lat = cos(Latitude);
+    Sin2_Lat = Sin_Lat * Sin_Lat;
+    Rn = Geocent_a / (sqrt(1.0e0 - Geocent_e2 * Sin2_Lat));
+    *X = (Rn + Height) * Cos_Lat * cos(Longitude);
+    *Y = (Rn + Height) * Cos_Lat * sin(Longitude);
+    *Z = ((Rn * (1 - Geocent_e2)) + Height) * Sin_Lat;
+
+  }
+  return (Error_Code);
+} /* END OF Convert_Geodetic_To_Geocentric */
+
+/*
+ * The function Convert_Geocentric_To_Geodetic converts geocentric
+ * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, 
+ * and height), according to the current ellipsoid parameters.
+ *
+ *    X         : Geocentric X coordinate, in meters.         (input)
+ *    Y         : Geocentric Y coordinate, in meters.         (input)
+ *    Z         : Geocentric Z coordinate, in meters.         (input)
+ *    Latitude  : Calculated latitude value in radians.       (output)
+ *    Longitude : Calculated longitude value in radians.      (output)
+ *    Height    : Calculated height value, in meters.         (output)
+ */
+
+#define USE_ITERATIVE_METHOD
+
+void pj_Convert_Geocentric_To_Geodetic (double X,
+                                     double Y, 
+                                     double Z,
+                                     double *Latitude,
+                                     double *Longitude,
+                                     double *Height)
+{ /* BEGIN Convert_Geocentric_To_Geodetic */
+#if !defined(USE_ITERATIVE_METHOD)
+/*
+ * The method used here is derived from 'An Improved Algorithm for
+ * Geocentric to Geodetic Coordinate Conversion', by Ralph Toms, Feb 1996
+ */
+
+/* Note: Variable names follow the notation used in Toms, Feb 1996 */
+
+    double W;        /* distance from Z axis */
+    double W2;       /* square of distance from Z axis */
+    double T0;       /* initial estimate of vertical component */
+    double T1;       /* corrected estimate of vertical component */
+    double S0;       /* initial estimate of horizontal component */
+    double S1;       /* corrected estimate of horizontal component */
+    double Sin_B0;   /* sin(B0), B0 is estimate of Bowring aux variable */
+    double Sin3_B0;  /* cube of sin(B0) */
+    double Cos_B0;   /* cos(B0) */
+    double Sin_p1;   /* sin(phi1), phi1 is estimated latitude */
+    double Cos_p1;   /* cos(phi1) */
+    double Rn;       /* Earth radius at location */
+    double Sum;      /* numerator of cos(phi1) */
+    int At_Pole;     /* indicates location is in polar region */
+
+    At_Pole = FALSE;
+    if (X != 0.0)
+    {
+        *Longitude = atan2(Y,X);
+    }
+    else
+    {
+        if (Y > 0)
+        {
+            *Longitude = PI_OVER_2;
+        }
+        else if (Y < 0)
+        {
+            *Longitude = -PI_OVER_2;
+        }
+        else
+        {
+            At_Pole = TRUE;
+            *Longitude = 0.0;
+            if (Z > 0.0)
+            {  /* north pole */
+                *Latitude = PI_OVER_2;
+            }
+            else if (Z < 0.0)
+            {  /* south pole */
+                *Latitude = -PI_OVER_2;
+            }
+            else
+            {  /* center of earth */
+                *Latitude = PI_OVER_2;
+                *Height = -Geocent_b;
+                return;
+            } 
+        }
+    }
+    W2 = X*X + Y*Y;
+    W = sqrt(W2);
+    T0 = Z * AD_C;
+    S0 = sqrt(T0 * T0 + W2);
+    Sin_B0 = T0 / S0;
+    Cos_B0 = W / S0;
+    Sin3_B0 = Sin_B0 * Sin_B0 * Sin_B0;
+    T1 = Z + Geocent_b * Geocent_ep2 * Sin3_B0;
+    Sum = W - Geocent_a * Geocent_e2 * Cos_B0 * Cos_B0 * Cos_B0;
+    S1 = sqrt(T1*T1 + Sum * Sum);
+    Sin_p1 = T1 / S1;
+    Cos_p1 = Sum / S1;
+    Rn = Geocent_a / sqrt(1.0 - Geocent_e2 * Sin_p1 * Sin_p1);
+    if (Cos_p1 >= COS_67P5)
+    {
+        *Height = W / Cos_p1 - Rn;
+    }
+    else if (Cos_p1 <= -COS_67P5)
+    {
+        *Height = W / -Cos_p1 - Rn;
+    }
+    else
+    {
+        *Height = Z / Sin_p1 + Rn * (Geocent_e2 - 1.0);
+    }
+    if (At_Pole == FALSE)
+    {
+        *Latitude = atan(Sin_p1 / Cos_p1);
+    }
+#else /* defined(USE_ITERATIVE_METHOD) */
+/*
+* Reference...
+* ============
+* Wenzel, H.-G.(1985): Hochauflösende Kugelfunktionsmodelle für
+* das Gravitationspotential der Erde. Wiss. Arb. Univ. Hannover
+* Nr. 137, p. 130-131.
+
+* Programmed by GGA- Leibniz-Institue of Applied Geophysics
+*               Stilleweg 2
+*               D-30655 Hannover
+*               Federal Republic of Germany
+*               Internet: www.gga-hannover.de
+*
+*               Hannover, March 1999, April 2004.
+*               see also: comments in statements
+* remarks:
+* Mathematically exact and because of symmetry of rotation-ellipsoid,
+* each point (X,Y,Z) has at least two solutions (Latitude1,Longitude1,Height1) and
+* (Latitude2,Longitude2,Height2). Is point=(0.,0.,Z) (P=0.), so you get even
+* four solutions,	every two symmetrical to the semi-minor axis.
+* Here Height1 and Height2 have at least a difference in order of
+* radius of curvature (e.g. (0,0,b)=> (90.,0.,0.) or (-90.,0.,-2b);
+* (a+100.)*(sqrt(2.)/2.,sqrt(2.)/2.,0.) => (0.,45.,100.) or
+* (0.,225.,-(2a+100.))).
+* The algorithm always computes (Latitude,Longitude) with smallest |Height|.
+* For normal computations, that means |Height|<10000.m, algorithm normally
+* converges after to 2-3 steps!!!
+* But if |Height| has the amount of length of ellipsoid's axis
+* (e.g. -6300000.m),	algorithm needs about 15 steps.
+*/
+
+/* local defintions and variables */
+/* end-criterium of loop, accuracy of sin(Latitude) */
+#define genau   1.E-12
+#define genau2  (genau*genau)
+#define maxiter 30
+
+    double P;        /* distance between semi-minor axis and location */
+    double RR;       /* distance between center and location */
+    double CT;       /* sin of geocentric latitude */
+    double ST;       /* cos of geocentric latitude */
+    double RX;
+    double RK;
+    double RN;       /* Earth radius at location */
+    double CPHI0;    /* cos of start or old geodetic latitude in iterations */
+    double SPHI0;    /* sin of start or old geodetic latitude in iterations */
+    double CPHI;     /* cos of searched geodetic latitude */
+    double SPHI;     /* sin of searched geodetic latitude */
+    double SDPHI;    /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */
+    int At_Pole;     /* indicates location is in polar region */
+    int iter;        /* # of continous iteration, max. 30 is always enough (s.a.) */
+
+    At_Pole = FALSE;
+    P = sqrt(X*X+Y*Y);
+    RR = sqrt(X*X+Y*Y+Z*Z);
+
+/*	special cases for latitude and longitude */
+    if (P/Geocent_a < genau) {
+
+/*  special case, if P=0. (X=0., Y=0.) */
+        At_Pole = TRUE;
+	*Longitude = 0.;
+
+/*  if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis
+ *  of ellipsoid (=center of mass), Latitude becomes PI/2 */
+        if (RR/Geocent_a < genau) {
+            *Latitude = PI_OVER_2;
+            *Height   = -Geocent_b;
+            return ;
+
+        }
+    }
+    else {
+/*  ellipsoidal (geodetic) longitude
+ *  interval: -PI < Longitude <= +PI */
+        *Longitude=atan2(Y,X);
+    }
+
+/* --------------------------------------------------------------
+ * Following iterative algorithm was developped by
+ * "Institut für Erdmessung", University of Hannover, July 1988.
+ * Internet: www.ife.uni-hannover.de
+ * Iterative computation of CPHI,SPHI and Height.
+ * Iteration of CPHI and SPHI to 10**-12 radian resp.
+ * 2*10**-7 arcsec.
+ * --------------------------------------------------------------
+ */
+    CT = Z/RR;
+    ST = P/RR;
+    RX = 1.0/sqrt(1.0-Geocent_e2*(2.0-Geocent_e2)*ST*ST);
+    CPHI0 = ST*(1.0-Geocent_e2)*RX;
+    SPHI0 = CT*RX;
+    iter = 0;
+
+/* loop to find sin(Latitude) resp. Latitude
+ * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */
+    do
+    {
+        iter++;
+        RN = Geocent_a/sqrt(1.0-Geocent_e2*SPHI0*SPHI0);
+
+/*  ellipsoidal (geodetic) height */
+        *Height = P*CPHI0+Z*SPHI0-RN*(1.0-Geocent_e2*SPHI0*SPHI0);
+
+        RK = Geocent_e2*RN/(RN+*Height);
+        RX = 1.0/sqrt(1.0-RK*(2.0-RK)*ST*ST);
+        CPHI = ST*(1.0-RK)*RX;
+        SPHI = CT*RX;
+        SDPHI = SPHI*CPHI0-CPHI*SPHI0;
+        CPHI0 = CPHI;
+        SPHI0 = SPHI;
+    }
+    while (SDPHI*SDPHI > genau2 && iter < maxiter);
+
+/*	ellipsoidal (geodetic) latitude */
+    *Latitude=atan(SPHI/fabs(CPHI));
+
+    return;
+#endif /* defined(USE_ITERATIVE_METHOD) */
+} /* END OF Convert_Geocentric_To_Geodetic */
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_fahey.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_fahey.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_fahey.c	(revision 256)
@@ -0,0 +1,20 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_fahey.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph.";
+#define TOL 1e-6
+FORWARD(s_forward); /* spheroid */
+	xy.y = 1.819152 * ( xy.x = tan(0.5 * lp.phi) );
+	xy.x = 0.819152 * lp.lam * asqrt(1 - xy.x * xy.x);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = 2. * atan(xy.y /= 1.819152);
+	lp.lam = fabs(xy.y = 1. - xy.y * xy.y) < TOL ? 0. :
+		xy.x / (0.819152 * sqrt(xy.y));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(fahey) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_zpoly1.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_zpoly1.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_zpoly1.c	(revision 256)
@@ -0,0 +1,49 @@
+/* evaluate complex polynomial */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_zpoly1.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <projects.h>
+/* note: coefficients are always from C_1 to C_n
+**	i.e. C_0 == (0., 0)
+**	n should always be >= 1 though no checks are made
+*/
+	COMPLEX
+pj_zpoly1(COMPLEX z, COMPLEX *C, int n) {
+	COMPLEX a;
+	double t;
+
+	a = *(C += n);
+	while (n-- > 0) {
+		a.r = (--C)->r + z.r * (t = a.r) - z.i * a.i;
+		a.i = C->i + z.r * a.i + z.i * t;
+	}
+	a.r = z.r * (t = a.r) - z.i * a.i;
+	a.i = z.r * a.i + z.i * t;
+	return a;
+}
+/* evaluate complex polynomial and derivative */
+	COMPLEX
+pj_zpolyd1(COMPLEX z, COMPLEX *C, int n, COMPLEX *der) {
+	COMPLEX a, b;
+	double t;
+	int first = 1;
+
+	a = *(C += n);
+	while (n-- > 0) {
+		if (first) {
+			first = 0;
+			b = a;
+		} else {
+			b.r = a.r + z.r * (t = b.r) - z.i * b.i;
+			b.i = a.i + z.r * b.i + z.i * t;
+		}
+		a.r = (--C)->r + z.r * (t = a.r) - z.i * a.i;
+		a.i = C->i + z.r * a.i + z.i * t;
+	}
+	b.r = a.r + z.r * (t = b.r) - z.i * b.i;
+	b.i = a.i + z.r * b.i + z.i * t;
+	a.r = z.r * (t = a.r) - z.i * a.i;
+	a.i = z.r * a.i + z.i * t;
+	*der = b;
+	return a;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lcc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lcc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lcc.c	(revision 256)
@@ -0,0 +1,106 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_lcc.c	4.2	94/03/18	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	phi1; \
+	double	phi2; \
+	double	n; \
+	double	rho; \
+	double	rho0; \
+	double	c; \
+	int		ellips;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(lcc, "Lambert Conformal Conic")
+	"\n\tConic, Sph&Ell\n\tlat_1= and lat_2= or lat_0";
+# define EPS10	1.e-10
+FORWARD(e_forward); /* ellipsoid & spheroid */
+	if (fabs(fabs(lp.phi) - HALFPI) < EPS10) {
+		if ((lp.phi * P->n) <= 0.) F_ERROR;
+		P->rho = 0.;
+		}
+	else
+		P->rho = P->c * (P->ellips ? pow(pj_tsfn(lp.phi, sin(lp.phi),
+			P->e), P->n) : pow(tan(FORTPI + .5 * lp.phi), -P->n));
+	xy.x = P->k0 * (P->rho * sin( lp.lam *= P->n ) );
+	xy.y = P->k0 * (P->rho0 - P->rho * cos(lp.lam) );
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid & spheroid */
+	xy.x /= P->k0;
+	xy.y /= P->k0;
+	if( (P->rho = hypot(xy.x, xy.y = P->rho0 - xy.y)) != 0.0) {
+		if (P->n < 0.) {
+			P->rho = -P->rho;
+			xy.x = -xy.x;
+			xy.y = -xy.y;
+		}
+		if (P->ellips) {
+			if ((lp.phi = pj_phi2(pow(P->rho / P->c, 1./P->n), P->e))
+				== HUGE_VAL)
+				I_ERROR;
+		} else
+			lp.phi = 2. * atan(pow(P->c / P->rho, 1./P->n)) - HALFPI;
+		lp.lam = atan2(xy.x, xy.y) / P->n;
+	} else {
+		lp.lam = 0.;
+		lp.phi = P->n > 0. ? HALFPI : - HALFPI;
+	}
+	return (lp);
+}
+SPECIAL(fac) {
+	if (fabs(fabs(lp.phi) - HALFPI) < EPS10) {
+		if ((lp.phi * P->n) <= 0.) return;
+		P->rho = 0.;
+	} else
+		P->rho = P->c * (P->ellips ? pow(pj_tsfn(lp.phi, sin(lp.phi),
+			P->e), P->n) : pow(tan(FORTPI + .5 * lp.phi), -P->n));
+	fac->code |= IS_ANAL_HK + IS_ANAL_CONV;
+	fac->k = fac->h = P->k0 * P->n * P->rho /
+		pj_msfn(sin(lp.phi), cos(lp.phi), P->es);
+	fac->conv = - P->n * lp.lam;
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(lcc)
+	double cosphi, sinphi;
+	int secant;
+
+	P->phi1 = pj_param(P->params, "rlat_1").f;
+	if (pj_param(P->params, "tlat_2").i)
+		P->phi2 = pj_param(P->params, "rlat_2").f;
+	else {
+		P->phi2 = P->phi1;
+		if (!pj_param(P->params, "tlat_0").i)
+			P->phi0 = P->phi1;
+	}
+	if (fabs(P->phi1 + P->phi2) < EPS10) E_ERROR(-21);
+	P->n = sinphi = sin(P->phi1);
+	cosphi = cos(P->phi1);
+	secant = fabs(P->phi1 - P->phi2) >= EPS10;
+	if( (P->ellips = (P->es != 0.)) ) {
+		double ml1, m1;
+
+		P->e = sqrt(P->es);
+		m1 = pj_msfn(sinphi, cosphi, P->es);
+		ml1 = pj_tsfn(P->phi1, sinphi, P->e);
+		if (secant) { /* secant cone */
+			P->n = log(m1 /
+			   pj_msfn(sinphi = sin(P->phi2), cos(P->phi2), P->es));
+			P->n /= log(ml1 / pj_tsfn(P->phi2, sinphi, P->e));
+		}
+		P->c = (P->rho0 = m1 * pow(ml1, -P->n) / P->n);
+		P->rho0 *= (fabs(fabs(P->phi0) - HALFPI) < EPS10) ? 0. :
+			pow(pj_tsfn(P->phi0, sin(P->phi0), P->e), P->n);
+	} else {
+		if (secant)
+			P->n = log(cosphi / cos(P->phi2)) /
+			   log(tan(FORTPI + .5 * P->phi2) /
+			   tan(FORTPI + .5 * P->phi1));
+		P->c = cosphi * pow(tan(FORTPI + .5 * P->phi1), P->n) / P->n;
+		P->rho0 = (fabs(fabs(P->phi0) - HALFPI) < EPS10) ? 0. :
+			P->c * pow(tan(FORTPI + .5 * P->phi0), -P->n);
+	}
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+	P->spc = fac;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_intr.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_intr.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_intr.c	(revision 256)
@@ -0,0 +1,65 @@
+/* Determine nad table correction value */
+#ifndef lint
+static const char SCCSID[]="@(#)nad_intr.c	4.2   95/09/23 GIE REL";
+#endif
+#define PJ_LIB__
+#include <projects.h>
+	LP
+nad_intr(LP t, struct CTABLE *ct) {
+	LP val, frct;
+	ILP indx;
+	double m00, m10, m01, m11;
+	FLP *f00, *f10, *f01, *f11;
+	long index;
+	int in;
+
+	indx.lam = floor(t.lam /= ct->del.lam);
+	indx.phi = floor(t.phi /= ct->del.phi);
+	frct.lam = t.lam - indx.lam;
+	frct.phi = t.phi - indx.phi;
+	val.lam = val.phi = HUGE_VAL;
+	if (indx.lam < 0) {
+		if (indx.lam == -1 && frct.lam > 0.99999999999) {
+			++indx.lam;
+			frct.lam = 0.;
+		} else
+			return val;
+	} else if ((in = indx.lam + 1) >= ct->lim.lam) {
+		if (in == ct->lim.lam && frct.lam < 1e-11) {
+			--indx.lam;
+			frct.lam = 1.;
+		} else
+			return val;
+	}
+	if (indx.phi < 0) {
+		if (indx.phi == -1 && frct.phi > 0.99999999999) {
+			++indx.phi;
+			frct.phi = 0.;
+		} else
+			return val;
+	} else if ((in = indx.phi + 1) >= ct->lim.phi) {
+		if (in == ct->lim.phi && frct.phi < 1e-11) {
+			--indx.phi;
+			frct.phi = 1.;
+		} else
+			return val;
+	}
+	index = indx.phi * ct->lim.lam + indx.lam;
+	f00 = ct->cvs + index++;
+	f10 = ct->cvs + index;
+	index += ct->lim.lam;
+	f11 = ct->cvs + index--;
+	f01 = ct->cvs + index;
+	m11 = m10 = frct.lam;
+	m00 = m01 = 1. - frct.lam;
+	m11 *= frct.phi;
+	m01 *= frct.phi;
+	frct.phi = 1. - frct.phi;
+	m00 *= frct.phi;
+	m10 *= frct.phi;
+	val.lam = m00 * f00->lam + m10 * f10->lam +
+			  m01 * f01->lam + m11 * f11->lam;
+	val.phi = m00 * f00->phi + m10 * f10->phi +
+			  m01 * f01->phi + m11 * f11->phi;
+	return val;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/aasincos.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/aasincos.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/aasincos.c	(revision 256)
@@ -0,0 +1,36 @@
+/* arc sin, cosine, tan2 and sqrt that will NOT fail */
+#ifndef lint
+static const char SCCSID[]="@(#)aasincos.c	4.6	93/12/12	GIE	REL";
+#endif
+#include <projects.h>
+#define ONE_TOL	 1.00000000000001
+#define TOL	0.000000001
+#define ATOL 1e-50
+	double
+aasin(double v) {
+	double av;
+
+	if ((av = fabs(v)) >= 1.) {
+		if (av > ONE_TOL)
+			pj_errno = -19;
+		return (v < 0. ? -HALFPI : HALFPI);
+	}
+	return asin(v);
+}
+	double
+aacos(double v) {
+	double av;
+
+	if ((av = fabs(v)) >= 1.) {
+		if (av > ONE_TOL)
+			pj_errno = -19;
+		return (v < 0. ? PI : 0.);
+	}
+	return acos(v);
+}
+	double
+asqrt(double v) { return ((v <= 0) ? 0. : sqrt(v)); }
+	double
+aatan2(double n, double d) {
+	return ((fabs(n) < ATOL && fabs(d) < ATOL) ? 0. : atan2(n,d));
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sts.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sts.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sts.c	(revision 256)
@@ -0,0 +1,57 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_sts.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double C_x, C_y, C_p; \
+	int tan_mode;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(kav5, "Kavraisky V") "\n\tPCyl., Sph.";
+PROJ_HEAD(qua_aut, "Quartic Authalic") "\n\tPCyl., Sph.";
+PROJ_HEAD(mbt_s, "McBryde-Thomas Flat-Polar Sine (No. 1)") "\n\tPCyl., Sph.";
+PROJ_HEAD(fouc, "Foucaut") "\n\tPCyl., Sph.";
+FORWARD(s_forward); /* spheroid */
+	double c;
+
+	xy.x = P->C_x * lp.lam * cos(lp.phi);
+	xy.y = P->C_y;
+	lp.phi *= P->C_p;
+	c = cos(lp.phi);
+	if (P->tan_mode) {
+		xy.x *= c * c;
+		xy.y *= tan(lp.phi);
+	} else {
+		xy.x /= c;
+		xy.y *= sin(lp.phi);
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double c;
+	
+	xy.y /= P->C_y;
+	c = cos(lp.phi = P->tan_mode ? atan(xy.y) : aasin(xy.y));
+	lp.phi /= P->C_p;
+	lp.lam = xy.x / (P->C_x * cos(lp.phi /= P->C_p));
+	if (P->tan_mode)
+		lp.lam /= c * c;
+	else
+		lp.lam *= c;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P, double p, double q, int mode) {
+	P->es = 0.;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->C_x = q / p;
+	P->C_y = p;
+	P->C_p = 1/ q;
+	P->tan_mode = mode;
+	return P;
+}
+ENTRY0(kav5) ENDENTRY(setup(P, 1.50488, 1.35439, 0))
+ENTRY0(qua_aut) ENDENTRY(setup(P, 2., 2., 0))
+ENTRY0(mbt_s) ENDENTRY(setup(P, 1.48875, 1.36509, 0))
+ENTRY0(fouc) ENDENTRY(setup(P, 2., 2., 1))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tcc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tcc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tcc.c	(revision 256)
@@ -0,0 +1,20 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_tcc.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double ap;
+#define EPS10 1.e-10
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv.";
+FORWARD(s_forward); /* spheroid */
+	double b, bt;
+
+	b = cos(lp.phi) * sin(lp.lam);
+	if ((bt = 1. - b * b) < EPS10) F_ERROR;
+	xy.x = b / sqrt(bt);
+	xy.y = atan2(tan(lp.phi) , cos(lp.lam));
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(tcc) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_deriv.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_deriv.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_deriv.c	(revision 256)
@@ -0,0 +1,36 @@
+/* dervative of (*P->fwd) projection */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_deriv.c	4.4	93/06/12	GIE	REL";
+#endif
+#define PJ_LIB__
+#include "projects.h"
+	int
+pj_deriv(LP lp, double h, PJ *P, struct DERIVS *der) {
+	XY t;
+
+	lp.lam += h;
+	lp.phi += h;
+	if (fabs(lp.phi) > HALFPI) return 1;
+	h += h;
+	t = (*P->fwd)(lp, P);
+	if (t.x == HUGE_VAL) return 1;
+	der->x_l = t.x; der->y_p = t.y; der->x_p = -t.x; der->y_l = -t.y;
+	lp.phi -= h;
+	if (fabs(lp.phi) > HALFPI) return 1;
+	t = (*P->fwd)(lp, P);
+	if (t.x == HUGE_VAL) return 1;
+	der->x_l += t.x; der->y_p -= t.y; der->x_p += t.x; der->y_l -= t.y;
+	lp.lam -= h;
+	t = (*P->fwd)(lp, P);
+	if (t.x == HUGE_VAL) return 1;
+	der->x_l -= t.x; der->y_p -= t.y; der->x_p += t.x; der->y_l += t.y;
+	lp.phi += h;
+	t = (*P->fwd)(lp, P);
+	if (t.x == HUGE_VAL) return 1;
+	der->x_l -= t.x; der->y_p += t.y; der->x_p -= t.x; der->y_l += t.y;
+	der->x_l /= (h += h);
+	der->y_p /= h;
+	der->x_p /= h;
+	der->y_l /= h;
+	return 0;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp5.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp5.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp5.c	(revision 256)
@@ -0,0 +1,29 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_putp5.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	A, B;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(putp5, "Putnins P5") "\n\tPCyl., Sph.";
+PROJ_HEAD(putp5p, "Putnins P5'") "\n\tPCyl., Sph.";
+#define C	1.01346
+#define D	1.2158542
+FORWARD(s_forward); /* spheroid */
+	xy.x = C * lp.lam * (P->A - P->B * sqrt(1. + D * lp.phi * lp.phi));
+	xy.y = C * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / C;
+	lp.lam = xy.x / (C * (P->A - P->B * sqrt(1. + D * lp.phi * lp.phi)));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
+	return P;
+}
+ENTRY0(putp5) P->A = 2.; P->B = 1.; ENDENTRY(setup(P))
+ENTRY0(putp5p) P->A = 1.5; P->B = 0.5; ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_ellps.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_ellps.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_ellps.c	(revision 256)
@@ -0,0 +1,59 @@
+/* definition of standard geoids */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_ellps.c	4.6	95/08/25	GIE	REL";
+#endif
+#define PJ_ELLPS__
+#include "projects.h"
+
+C_NAMESPACE struct PJ_ELLPS
+pj_ellps[] = {
+"MERIT",	"a=6378137.0", "rf=298.257", "MERIT 1983",
+"SGS85",	"a=6378136.0", "rf=298.257",  "Soviet Geodetic System 85",
+"GRS80",	"a=6378137.0", "rf=298.257222101", "GRS 1980(IUGG, 1980)",
+"IAU76",	"a=6378140.0", "rf=298.257", "IAU 1976",
+"airy",		"a=6377563.396", "b=6356256.910", "Airy 1830",
+"APL4.9",	"a=6378137.0.",  "rf=298.25", "Appl. Physics. 1965",
+"NWL9D",	"a=6378145.0.",  "rf=298.25", "Naval Weapons Lab., 1965",
+"mod_airy",	"a=6377340.189", "b=6356034.446", "Modified Airy",
+"andrae",	"a=6377104.43",  "rf=300.0", 	"Andrae 1876 (Den., Iclnd.)",
+"aust_SA",	"a=6378160.0", "rf=298.25", "Australian Natl & S. Amer. 1969",
+"GRS67",	"a=6378160.0", "rf=298.2471674270", "GRS 67(IUGG 1967)",
+"bessel",	"a=6377397.155", "rf=299.1528128", "Bessel 1841",
+"bess_nam",	"a=6377483.865", "rf=299.1528128", "Bessel 1841 (Namibia)",
+"clrk66",	"a=6378206.4", "b=6356583.8", "Clarke 1866",
+"clrk80",	"a=6378249.145", "rf=293.4663", "Clarke 1880 mod.",
+"CPM",  	"a=6375738.7", "rf=334.29", "Comm. des Poids et Mesures 1799",
+"delmbr",	"a=6376428.",  "rf=311.5", "Delambre 1810 (Belgium)",
+"engelis",	"a=6378136.05", "rf=298.2566", "Engelis 1985",
+"evrst30",  "a=6377276.345", "rf=300.8017",  "Everest 1830",
+"evrst48",  "a=6377304.063", "rf=300.8017",  "Everest 1948",
+"evrst56",  "a=6377301.243", "rf=300.8017",  "Everest 1956",
+"evrst69",  "a=6377295.664", "rf=300.8017",  "Everest 1969",
+"evrstSS",  "a=6377298.556", "rf=300.8017",  "Everest (Sabah & Sarawak)",
+"fschr60",  "a=6378166.",   "rf=298.3", "Fischer (Mercury Datum) 1960",
+"fschr60m", "a=6378155.",   "rf=298.3", "Modified Fischer 1960",
+"fschr68",  "a=6378150.",   "rf=298.3", "Fischer 1968",
+"helmert",  "a=6378200.",   "rf=298.3", "Helmert 1906",
+"hough",	"a=6378270.0", "rf=297.", "Hough",
+"intl",		"a=6378388.0", "rf=297.", "International 1909 (Hayford)",
+"krass",	"a=6378245.0", "rf=298.3", "Krassovsky, 1942",
+"kaula",	"a=6378163.",  "rf=298.24", "Kaula 1961",
+"lerch",	"a=6378139.",  "rf=298.257", "Lerch 1979",
+"mprts",	"a=6397300.",  "rf=191.", "Maupertius 1738",
+"new_intl",	"a=6378157.5", "b=6356772.2", "New International 1967",
+"plessis",	"a=6376523.",  "b=6355863.", "Plessis 1817 (France)",
+"SEasia",	"a=6378155.0", "b=6356773.3205", "Southeast Asia",
+"walbeck",	"a=6376896.0", "b=6355834.8467", "Walbeck",
+"WGS60",    "a=6378165.0",  "rf=298.3", "WGS 60",
+"WGS66",	"a=6378145.0", "rf=298.25", "WGS 66",
+"WGS72",	"a=6378135.0", "rf=298.26", "WGS 72",
+"WGS84",    "a=6378137.0",  "rf=298.257223563", "WGS 84",
+"sphere",   "a=6370997.0",  "b=6370997.0", "Normal Sphere (r=6370997)",
+0,0,0,0
+};
+
+struct PJ_ELLPS *pj_get_ellps_ref()
+
+{
+    return pj_ellps;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_fwd.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_fwd.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_fwd.c	(revision 256)
@@ -0,0 +1,37 @@
+/* general forward projection */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_fwd.c	4.4	93/06/12	GIE	REL";
+#endif
+#define PJ_LIB__
+#include <projects.h>
+#include <errno.h>
+# define EPS 1.0e-12
+	XY /* forward projection entry */
+pj_fwd(LP lp, PJ *P) {
+	XY xy;
+	double t;
+
+	/* check for forward and latitude or longitude overange */
+	if ((t = fabs(lp.phi)-HALFPI) > EPS || fabs(lp.lam) > 10.) {
+		xy.x = xy.y = HUGE_VAL;
+		pj_errno = -14;
+	} else { /* proceed with projection */
+		errno = pj_errno = 0;
+		if (fabs(t) <= EPS)
+			lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+		else if (P->geoc)
+			lp.phi = atan(P->rone_es * tan(lp.phi));
+		lp.lam -= P->lam0;	/* compute del lp.lam */
+		if (!P->over)
+			lp.lam = adjlon(lp.lam); /* adjust del longitude */
+		xy = (*P->fwd)(lp, P); /* project */
+		if (pj_errno || (pj_errno = errno))
+			xy.x = xy.y = HUGE_VAL;
+		/* adjust for major axis and easting/northings */
+		else {
+			xy.x = P->fr_meter * (P->a * xy.x + P->x0);
+			xy.y = P->fr_meter * (P->a * xy.y + P->y0);
+		}
+	}
+	return xy;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_stere.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_stere.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_stere.c	(revision 256)
@@ -0,0 +1,244 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_stere.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double phits; \
+	double sinX1; \
+	double cosX1; \
+	double akm1; \
+	int	mode;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts=";
+PROJ_HEAD(ups, "Universal Polar Stereographic") "\n\tAzi, Sph&Ell\n\tsouth";
+#define sinph0	P->sinX1
+#define cosph0	P->cosX1
+#define EPS10	1.e-10
+#define TOL	1.e-8
+#define NITER	8
+#define CONV	1.e-10
+#define S_POLE	0
+#define N_POLE	1
+#define OBLIQ	2
+#define EQUIT	3
+	static double
+ssfn_(double phit, double sinphi, double eccen) {
+	sinphi *= eccen;
+	return (tan (.5 * (HALFPI + phit)) *
+	   pow((1. - sinphi) / (1. + sinphi), .5 * eccen));
+}
+FORWARD(e_forward); /* ellipsoid */
+	double coslam, sinlam, sinX=0.0, cosX=0.0, X, A, sinphi;
+
+	coslam = cos(lp.lam);
+	sinlam = sin(lp.lam);
+	sinphi = sin(lp.phi);
+	if (P->mode == OBLIQ || P->mode == EQUIT) {
+		sinX = sin(X = 2. * atan(ssfn_(lp.phi, sinphi, P->e)) - HALFPI);
+		cosX = cos(X);
+	}
+	switch (P->mode) {
+	case OBLIQ:
+		A = P->akm1 / (P->cosX1 * (1. + P->sinX1 * sinX +
+		   P->cosX1 * cosX * coslam));
+		xy.y = A * (P->cosX1 * sinX - P->sinX1 * cosX * coslam);
+		goto xmul;
+	case EQUIT:
+		A = 2. * P->akm1 / (1. + cosX * coslam);
+		xy.y = A * sinX;
+xmul:
+		xy.x = A * cosX;
+		break;
+	case S_POLE:
+		lp.phi = -lp.phi;
+		coslam = - coslam;
+		sinphi = -sinphi;
+	case N_POLE:
+		xy.x = P->akm1 * pj_tsfn(lp.phi, sinphi, P->e);
+		xy.y = - xy.x * coslam;
+		break;
+	}
+	xy.x = xy.x * sinlam;
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	double  sinphi, cosphi, coslam, sinlam;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	sinlam = sin(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+		xy.y = 1. + cosphi * coslam;
+		goto oblcon;
+	case OBLIQ:
+		xy.y = 1. + sinph0 * sinphi + cosph0 * cosphi * coslam;
+oblcon:
+		if (xy.y <= EPS10) F_ERROR;
+		xy.x = (xy.y = P->akm1 / xy.y) * cosphi * sinlam;
+		xy.y *= (P->mode == EQUIT) ? sinphi :
+		   cosph0 * sinphi - sinph0 * cosphi * coslam;
+		break;
+	case N_POLE:
+		coslam = - coslam;
+		lp.phi = - lp.phi;
+	case S_POLE:
+		if (fabs(lp.phi - HALFPI) < TOL) F_ERROR;
+		xy.x = sinlam * ( xy.y = P->akm1 * tan(FORTPI + .5 * lp.phi) );
+		xy.y *= coslam;
+		break;
+	}
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double cosphi, sinphi, tp=0.0, phi_l=0.0, rho, halfe=0.0, halfpi=0.0;
+	int i;
+
+	rho = hypot(xy.x, xy.y);
+	switch (P->mode) {
+	case OBLIQ:
+	case EQUIT:
+		cosphi = cos( tp = 2. * atan2(rho * P->cosX1 , P->akm1) );
+		sinphi = sin(tp);
+                if( rho == 0.0 )
+		    phi_l = asin(cosphi * P->sinX1);
+                else
+		    phi_l = asin(cosphi * P->sinX1 + (xy.y * sinphi * P->cosX1 / rho));
+
+		tp = tan(.5 * (HALFPI + phi_l));
+		xy.x *= sinphi;
+		xy.y = rho * P->cosX1 * cosphi - xy.y * P->sinX1* sinphi;
+		halfpi = HALFPI;
+		halfe = .5 * P->e;
+		break;
+	case N_POLE:
+		xy.y = -xy.y;
+	case S_POLE:
+		phi_l = HALFPI - 2. * atan(tp = - rho / P->akm1);
+		halfpi = -HALFPI;
+		halfe = -.5 * P->e;
+		break;
+	}
+	for (i = NITER; i--; phi_l = lp.phi) {
+		sinphi = P->e * sin(phi_l);
+		lp.phi = 2. * atan(tp * pow((1.+sinphi)/(1.-sinphi),
+		   halfe)) - halfpi;
+		if (fabs(phi_l - lp.phi) < CONV) {
+			if (P->mode == S_POLE)
+				lp.phi = -lp.phi;
+			lp.lam = (xy.x == 0. && xy.y == 0.) ? 0. : atan2(xy.x, xy.y);
+			return (lp);
+		}
+	}
+	I_ERROR;
+}
+INVERSE(s_inverse); /* spheroid */
+	double  c, rh, sinc, cosc;
+
+	sinc = sin(c = 2. * atan((rh = hypot(xy.x, xy.y)) / P->akm1));
+	cosc = cos(c);
+	lp.lam = 0.;
+	switch (P->mode) {
+	case EQUIT:
+		if (fabs(rh) <= EPS10)
+			lp.phi = 0.;
+		else
+			lp.phi = asin(xy.y * sinc / rh);
+		if (cosc != 0. || xy.x != 0.)
+			lp.lam = atan2(xy.x * sinc, cosc * rh);
+		break;
+	case OBLIQ:
+		if (fabs(rh) <= EPS10)
+			lp.phi = P->phi0;
+		else
+			lp.phi = asin(cosc * sinph0 + xy.y * sinc * cosph0 / rh);
+		if ((c = cosc - sinph0 * sin(lp.phi)) != 0. || xy.x != 0.)
+			lp.lam = atan2(xy.x * sinc * cosph0, c * rh);
+		break;
+	case N_POLE:
+		xy.y = -xy.y;
+	case S_POLE:
+		if (fabs(rh) <= EPS10)
+			lp.phi = P->phi0;
+		else
+			lp.phi = asin(P->mode == S_POLE ? - cosc : cosc);
+		lp.lam = (xy.x == 0. && xy.y == 0.) ? 0. : atan2(xy.x, xy.y);
+		break;
+	}
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) { /* general initialization */
+	double t;
+
+	if (fabs((t = fabs(P->phi0)) - HALFPI) < EPS10)
+		P->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+	else
+		P->mode = t > EPS10 ? OBLIQ : EQUIT;
+	P->phits = fabs(P->phits);
+	if (P->es) {
+		double X;
+
+		switch (P->mode) {
+		case N_POLE:
+		case S_POLE:
+			if (fabs(P->phits - HALFPI) < EPS10)
+				P->akm1 = 2. * P->k0 /
+				   sqrt(pow(1+P->e,1+P->e)*pow(1-P->e,1-P->e));
+			else {
+				P->akm1 = cos(P->phits) /
+				   pj_tsfn(P->phits, t = sin(P->phits), P->e);
+				t *= P->e;
+				P->akm1 /= sqrt(1. - t * t);
+			}
+			break;
+		case EQUIT:
+			P->akm1 = 2. * P->k0;
+			break;
+		case OBLIQ:
+			t = sin(P->phi0);
+			X = 2. * atan(ssfn_(P->phi0, t, P->e)) - HALFPI;
+			t *= P->e;
+			P->akm1 = 2. * P->k0 * cos(P->phi0) / sqrt(1. - t * t);
+			P->sinX1 = sin(X);
+			P->cosX1 = cos(X);
+			break;
+		}
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		switch (P->mode) {
+		case OBLIQ:
+			sinph0 = sin(P->phi0);
+			cosph0 = cos(P->phi0);
+		case EQUIT:
+			P->akm1 = 2. * P->k0;
+			break;
+		case S_POLE:
+		case N_POLE:
+			P->akm1 = fabs(P->phits - HALFPI) >= EPS10 ?
+			   cos(P->phits) / tan(FORTPI - .5 * P->phits) :
+			   2. * P->k0 ;
+			break;
+		}
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+	return P;
+}
+ENTRY0(stere)
+	P->phits = pj_param(P->params, "tlat_ts").i ?
+		P->phits = pj_param(P->params, "rlat_ts").f : HALFPI;
+ENDENTRY(setup(P))
+ENTRY0(ups)
+	/* International Ellipsoid */
+	P->phi0 = pj_param(P->params, "bsouth").i ? - HALFPI: HALFPI;
+	if (!P->es) E_ERROR(-34);
+	P->k0 = .994;
+	P->x0 = 2000000.;
+	P->y0 = 2000000.;
+	P->phits = HALFPI;
+	P->lam0 = 0.;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_labrd.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_labrd.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_labrd.c	(revision 256)
@@ -0,0 +1,112 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_labrd.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	Az, kRg, p0s, A, C, Ca, Cb, Cc, Cd; \
+	int		rot;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(labrd, "Laborde") "\n\tCyl, Sph\n\tSpecial for Madagascar";
+#define EPS	1.e-10
+FORWARD(e_forward);
+	double V1, V2, ps, sinps, cosps, sinps2, cosps2, I1, I2, I3, I4, I5, I6,
+		x2, y2, t;
+
+	V1 = P->A * log( tan(FORTPI + .5 * lp.phi) );
+	t = P->e * sin(lp.phi);
+	V2 = .5 * P->e * P->A * log ((1. + t)/(1. - t));
+	ps = 2. * (atan(exp(V1 - V2 + P->C)) - FORTPI);
+	I1 = ps - P->p0s;
+	cosps = cos(ps);	cosps2 = cosps * cosps;
+	sinps = sin(ps);	sinps2 = sinps * sinps;
+	I4 = P->A * cosps;
+	I2 = .5 * P->A * I4 * sinps;
+	I3 = I2 * P->A * P->A * (5. * cosps2 - sinps2) / 12.;
+	I6 = I4 * P->A * P->A;
+	I5 = I6 * (cosps2 - sinps2) / 6.;
+	I6 *= P->A * P->A *
+		(5. * cosps2 * cosps2 + sinps2 * (sinps2 - 18. * cosps2)) / 120.;
+	t = lp.lam * lp.lam;
+	xy.x = P->kRg * lp.lam * (I4 + t * (I5 + t * I6));
+	xy.y = P->kRg * (I1 + t * (I2 + t * I3));
+	x2 = xy.x * xy.x;
+	y2 = xy.y * xy.y;
+	V1 = 3. * xy.x * y2 - xy.x * x2;
+	V2 = xy.y * y2 - 3. * x2 * xy.y;
+	xy.x += P->Ca * V1 + P->Cb * V2;
+	xy.y += P->Ca * V2 - P->Cb * V1;
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid & spheroid */
+	double x2, y2, V1, V2, V3, V4, t, t2, ps, pe, tpe, s,
+		I7, I8, I9, I10, I11, d, Re;
+	int i;
+
+	x2 = xy.x * xy.x;
+	y2 = xy.y * xy.y;
+	V1 = 3. * xy.x * y2 - xy.x * x2;
+	V2 = xy.y * y2 - 3. * x2 * xy.y;
+	V3 = xy.x * (5. * y2 * y2 + x2 * (-10. * y2 + x2 ));
+	V4 = xy.y * (5. * x2 * x2 + y2 * (-10. * x2 + y2 ));
+	xy.x += - P->Ca * V1 - P->Cb * V2 + P->Cc * V3 + P->Cd * V4;
+	xy.y +=   P->Cb * V1 - P->Ca * V2 - P->Cd * V3 + P->Cc * V4;
+	ps = P->p0s + xy.y / P->kRg;
+	pe = ps + P->phi0 - P->p0s;
+	for ( i = 20; i; --i) {
+		V1 = P->A * log(tan(FORTPI + .5 * pe));
+		tpe = P->e * sin(pe);
+		V2 = .5 * P->e * P->A * log((1. + tpe)/(1. - tpe));
+		t = ps - 2. * (atan(exp(V1 - V2 + P->C)) - FORTPI);
+		pe += t;
+		if (fabs(t) < EPS)
+			break;
+	}
+/*
+	if (!i) {
+	} else {
+	}
+*/
+	t = P->e * sin(pe);
+	t = 1. - t * t;
+	Re = P->one_es / ( t * sqrt(t) );
+	t = tan(ps);
+	t2 = t * t;
+	s = P->kRg * P->kRg;
+	d = Re * P->k0 * P->kRg;
+	I7 = t / (2. * d);
+	I8 = t * (5. + 3. * t2) / (24. * d * s);
+	d = cos(ps) * P->kRg * P->A;
+	I9 = 1. / d;
+	d *= s;
+	I10 = (1. + 2. * t2) / (6. * d);
+	I11 = (5. + t2 * (28. + 24. * t2)) / (120. * d * s);
+	x2 = xy.x * xy.x;
+	lp.phi = pe + x2 * (-I7 + I8 * x2);
+	lp.lam = xy.x * (I9 + x2 * (-I10 + x2 * I11));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(labrd)
+	double Az, sinp, R, N, t;
+
+	P->rot	= pj_param(P->params, "bno_rot").i == 0;
+	Az = pj_param(P->params, "razi").f;
+	sinp = sin(P->phi0);
+	t = 1. - P->es * sinp * sinp;
+	N = 1. / sqrt(t);
+	R = P->one_es * N / t;
+	P->kRg = P->k0 * sqrt( N * R );
+	P->p0s = atan( sqrt(R / N) * tan(P->phi0) );
+	P->A = sinp / sin(P->p0s);
+	t = P->e * sinp;
+	P->C = .5 * P->e * P->A * log((1. + t)/(1. - t)) +
+		- P->A * log( tan(FORTPI + .5 * P->phi0))
+		+ log( tan(FORTPI + .5 * P->p0s));
+	t = Az + Az;
+	P->Ca = (1. - cos(t)) * ( P->Cb = 1. / (12. * P->kRg * P->kRg) );
+	P->Cb *= sin(t);
+	P->Cc = 3. * (P->Ca * P->Ca - P->Cb * P->Cb);
+	P->Cd = 6. * P->Ca * P->Cb;
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_errno.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_errno.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_errno.c	(revision 256)
@@ -0,0 +1,20 @@
+/* For full ANSI compliance of global variable */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_errno.c	4.3	95/06/03	GIE	REL";
+#endif
+
+#include <projects.h>
+
+C_NAMESPACE int pj_errno = 0;
+
+/************************************************************************/
+/*                          pj_get_errno_ref()                          */
+/************************************************************************/
+
+int *pj_get_errno_ref()
+
+{
+    return &pj_errno;
+}
+
+/* end */
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_somerc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_somerc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_somerc.c	(revision 256)
@@ -0,0 +1,69 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_somerc.c	4.1	95/08/09	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	K, c, hlf_e, kR, cosp0, sinp0;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(somerc, "Swiss. Obl. Mercator") "\n\tCyl, Ell\n\tFor CH1903";
+#define EPS	1.e-10
+#define NITER 6
+FORWARD(e_forward);
+	double phip, lamp, phipp, lampp, sp, cp;
+
+	sp = P->e * sin(lp.phi);
+	phip = 2.* atan( exp( P->c * (
+		log(tan(FORTPI + 0.5 * lp.phi)) - P->hlf_e * log((1. + sp)/(1. - sp)))
+		+ P->K)) - HALFPI;
+	lamp = P->c * lp.lam;
+	cp = cos(phip);
+	phipp = aasin(P->cosp0 * sin(phip) - P->sinp0 * cp * cos(lamp));
+	lampp = aasin(cp * sin(lamp) / cos(phipp));
+	xy.x = P->kR * lampp;
+	xy.y = P->kR * log(tan(FORTPI + 0.5 * phipp));
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid & spheroid */
+	double phip, lamp, phipp, lampp, cp, esp, con, delp;
+	int i;
+
+	phipp = 2. * (atan(exp(xy.y / P->kR)) - FORTPI);
+	lampp = xy.x / P->kR;
+	cp = cos(phipp);
+	phip = aasin(P->cosp0 * sin(phipp) + P->sinp0 * cp * cos(lampp));
+	lamp = aasin(cp * sin(lampp) / cos(phip));
+	con = (P->K - log(tan(FORTPI + 0.5 * phip)))/P->c;
+	for (i = NITER; i ; --i) {
+		esp = P->e * sin(phip);
+		delp = (con + log(tan(FORTPI + 0.5 * phip)) - P->hlf_e *
+			log((1. + esp)/(1. - esp)) ) *
+			(1. - esp * esp) * cos(phip) * P->rone_es;
+		phip -= delp;
+		if (fabs(delp) < EPS)
+			break;
+	}
+	if (i) {
+		lp.phi = phip;
+		lp.lam = lamp / P->c;
+	} else
+		I_ERROR
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(somerc)
+	double cp, phip0, sp;
+
+	P->hlf_e = 0.5 * P->e;
+	cp = cos(P->phi0);
+	cp *= cp;
+	P->c = sqrt(1 + P->es * cp * cp * P->rone_es);
+	sp = sin(P->phi0);
+	P->cosp0 = cos( phip0 = aasin(P->sinp0 = sp / P->c) );
+	sp *= P->e;
+	P->K = log(tan(FORTPI + 0.5 * phip0)) - P->c * (
+		log(tan(FORTPI + 0.5 * P->phi0)) - P->hlf_e *
+		log((1. + sp) / (1. - sp)));
+	P->kR = P->k0 * sqrt(P->one_es) / (1. - sp * sp);
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_apply_gridshift.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_apply_gridshift.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_apply_gridshift.c	(revision 256)
@@ -0,0 +1,178 @@
+/******************************************************************************
+ * $Id: pj_apply_gridshift.c,v 1.8 2003/03/20 21:29:41 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Apply datum shifts based on grid shift files (normally NAD27 to
+ *           NAD83 or the reverse).  This module is responsible for keeping
+ *           a list of loaded grids, and calling with each one that is 
+ *           allowed for a given datum (expressed as the nadgrids= parameter).
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_apply_gridshift.c,v $
+ * Revision 1.8  2003/03/20 21:29:41  warmerda
+ * Fixed bug in checking against grid bounds.
+ *
+ * Revision 1.7  2003/03/17 19:45:23  warmerda
+ * improved error handling
+ *
+ * Revision 1.6  2003/03/17 18:56:34  warmerda
+ * implement heirarchical NTv2 gridinfos
+ *
+ * Revision 1.5  2003/03/15 06:02:02  warmerda
+ * preliminary NTv2 support, major restructure of datum shifting
+ *
+ * Revision 1.4  2002/07/08 02:32:05  warmerda
+ * ensure clean C++ builds
+ *
+ * Revision 1.3  2002/04/30 16:27:27  warmerda
+ * improve debug output
+ *
+ * Revision 1.2  2001/03/15 16:57:55  warmerda
+ * fixed intermittent problem in pj_load_nadgrids()
+ *
+ * Revision 1.1  2000/07/06 23:32:27  warmerda
+ * New
+ *
+ */
+
+#define PJ_LIB__
+
+#include <projects.h>
+#include <string.h>
+#include <math.h>
+
+/************************************************************************/
+/*                         pj_apply_gridshift()                         */
+/************************************************************************/
+
+int pj_apply_gridshift( const char *nadgrids, int inverse, 
+                        long point_count, int point_offset,
+                        double *x, double *y, double *z )
+
+{
+    int grid_count = 0;
+    PJ_GRIDINFO   **tables;
+    int  i;
+    int debug_flag = getenv( "PROJ_DEBUG" ) != NULL;
+    static int debug_count = 0;
+
+    pj_errno = 0;
+
+    tables = pj_gridlist_from_nadgrids( nadgrids, &grid_count);
+    if( tables == NULL || grid_count == 0 )
+        return pj_errno;
+
+    for( i = 0; i < point_count; i++ )
+    {
+        long io = i * point_offset;
+        LP   input, output;
+        int  itable;
+
+        input.phi = y[io];
+        input.lam = x[io];
+        output.phi = HUGE_VAL;
+        output.lam = HUGE_VAL;
+
+        /* keep trying till we find a table that works */
+        for( itable = 0; itable < grid_count; itable++ )
+        {
+            PJ_GRIDINFO *gi = tables[itable];
+            struct CTABLE *ct = gi->ct;
+
+            /* skip tables that don't match our point at all.  */
+            if( ct->ll.phi > input.phi || ct->ll.lam > input.lam
+                || ct->ll.phi + (ct->lim.phi-1) * ct->del.phi < input.phi
+                || ct->ll.lam + (ct->lim.lam-1) * ct->del.lam < input.lam )
+                continue;
+
+            /* If we have child nodes, check to see if any of them apply. */
+            if( gi->child != NULL )
+            {
+                PJ_GRIDINFO *child;
+
+                for( child = gi->child; child != NULL; child = child->next )
+                {
+                    struct CTABLE *ct1 = child->ct;
+
+                    if( ct1->ll.phi > input.phi || ct1->ll.lam > input.lam
+                      || ct1->ll.phi+(ct1->lim.phi-1)*ct1->del.phi < input.phi
+                      || ct1->ll.lam+(ct1->lim.lam-1)*ct1->del.lam < input.lam)
+                        continue;
+
+                    break;
+                }
+
+                /* we found a more refined child node to use */
+                if( child != NULL )
+                {
+                    gi = child;
+                    ct = child->ct;
+                }
+            }
+
+            /* load the grid shift info if we don't have it. */
+            if( ct->cvs == NULL && !pj_gridinfo_load( gi ) )
+            {
+                pj_errno = -38;
+                return pj_errno;
+            }
+            
+            output = nad_cvt( input, inverse, ct );
+            if( output.lam != HUGE_VAL )
+            {
+                if( debug_flag && debug_count++ < 20 )
+                    fprintf( stderr,
+                             "pj_apply_gridshift(): used %s\n",
+                             ct->id );
+                break;
+            }
+        }
+
+        if( output.lam == HUGE_VAL )
+        {
+            if( debug_flag )
+            {
+                fprintf( stderr, 
+                         "pj_apply_gridshift(): failed to find a grid shift table for\n"
+                         "                      location (%.7fdW,%.7fdN)\n",
+                         x[io] * RAD_TO_DEG, 
+                         y[io] * RAD_TO_DEG );
+                fprintf( stderr, 
+                         "   tried: %s\n", nadgrids );
+            }
+        
+            pj_errno = -38;
+            return pj_errno;
+        }
+        else
+        {
+            y[io] = output.phi;
+            x[io] = output.lam;
+        }
+    }
+
+    return 0;
+}
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wink2.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wink2.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wink2.c	(revision 256)
@@ -0,0 +1,37 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_wink2.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PROJ_PARMS__ \
+	double	cosphi1;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(wink2, "Winkel II") "\n\tPCyl., Sph., no inv.\n\tlat_1=";
+#define MAX_ITER    10
+#define LOOP_TOL    1e-7
+#define TWO_D_PI 0.636619772367581343
+FORWARD(s_forward); /* spheroid */
+	double k, V;
+	int i;
+
+	xy.y = lp.phi * TWO_D_PI;
+	k = PI * sin(lp.phi);
+	lp.phi *= 1.8;
+	for (i = MAX_ITER; i ; --i) {
+		lp.phi -= V = (lp.phi + sin(lp.phi) - k) /
+			(1. + cos(lp.phi));
+		if (fabs(V) < LOOP_TOL)
+			break;
+	}
+	if (!i)
+		lp.phi = (lp.phi < 0.) ? -HALFPI : HALFPI;
+	else
+		lp.phi *= 0.5;
+	xy.x = 0.5 * lp.lam * (cos(lp.phi) + P->cosphi1);
+	xy.y = FORTPI * (sin(lp.phi) + xy.y);
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(wink2)
+	P->cosphi1 = cos(pj_param(P->params, "rlat_1").f);
+	P->es = 0.; P->inv = 0; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/bch2bps.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/bch2bps.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/bch2bps.c	(revision 256)
@@ -0,0 +1,143 @@
+/* convert bivariate w Chebyshev series to w Power series */
+#ifndef lint
+static const char SCCSID[]="@(#)bch2bps.c	4.5	94/03/22	GIE	REL";
+#endif
+#include <projects.h>
+/* basic support procedures */
+	static void /* clear vector to zero */
+clear(projUV *p, int n) { static const projUV c = {0., 0.}; while (n--) *p++ = c; }
+	static void /* clear matrix rows to zero */
+bclear(projUV **p, int n, int m) { while (n--) clear(*p++, m); }
+	static void /* move vector */
+bmove(projUV *a, projUV *b, int n) { while (n--) *a++ = *b++; }
+	static void /* a <- m * b - c */
+submop(projUV *a, double m, projUV *b, projUV *c, int n) {
+	while (n--) {
+		a->u = m * b->u - c->u;
+		a++->v = m * b++->v - c++->v;
+	}
+}
+	static void /* a <- b - c */
+subop(projUV *a, projUV *b, projUV *c, int n) {
+	while (n--) {
+		a->u = b->u - c->u;
+		a++->v = b++->v - c++->v;
+	}
+}
+	static void /* multiply vector a by scalar m */
+dmult(projUV *a, double m, int n) { while(n--) { a->u *= m; a->v *= m; ++a; } }
+	static void /* row adjust a[] <- a[] - m * b[] */
+dadd(projUV *a, projUV *b, double m, int n) {
+	while(n--) {
+		a->u -= m * b->u;
+		a++->v -= m * b++->v;
+	}
+}
+	static void /* convert row to pover series */
+rows(projUV *c, projUV *d, int n) {
+	projUV sv, *dd;
+	int j, k;
+
+	dd = (projUV *)vector1(n-1, sizeof(projUV));
+	sv.u = sv.v = 0.;
+	for (j = 0; j < n; ++j) d[j] = dd[j] = sv;
+	d[0] = c[n-1];
+	for (j = n-2; j >= 1; --j) {
+		for (k = n-j; k >= 1; --k) {
+			sv = d[k];
+			d[k].u = 2. * d[k-1].u - dd[k].u;
+			d[k].v = 2. * d[k-1].v - dd[k].v;
+			dd[k] = sv;
+		}
+		sv = d[0];
+		d[0].u = -dd[0].u + c[j].u;
+		d[0].v = -dd[0].v + c[j].v;
+		dd[0] = sv;
+	}
+	for (j = n-1; j >= 1; --j) {
+		d[j].u = d[j-1].u - dd[j].u;
+		d[j].v = d[j-1].v - dd[j].v;
+	}
+	d[0].u = -dd[0].u + .5 * c[0].u;
+	d[0].v = -dd[0].v + .5 * c[0].v;
+	pj_dalloc(dd);
+}
+	static void /* convert columns to power series */
+cols(projUV **c, projUV **d, int nu, int nv) {
+	projUV *sv, **dd;
+	int j, k;
+
+	dd = (projUV **)vector2(nu, nv, sizeof(projUV));
+	sv = (projUV *)vector1(nv, sizeof(projUV));
+	bclear(d, nu, nv);
+	bclear(dd, nu, nv);
+	bmove(d[0], c[nu-1], nv);
+	for (j = nu-2; j >= 1; --j) {
+		for (k = nu-j; k >= 1; --k) {
+			bmove(sv, d[k], nv);
+			submop(d[k], 2., d[k-1], dd[k], nv);
+			bmove(dd[k], sv, nv);
+		}
+		bmove(sv, d[0], nv);
+		subop(d[0], c[j], dd[0], nv);
+		bmove(dd[0], sv, nv);
+	}
+	for (j = nu-1; j >= 1; --j)
+		subop(d[j], d[j-1], dd[j], nv);
+	submop(d[0], .5, c[0], dd[0], nv);
+	freev2((void **) dd, nu);
+	pj_dalloc(sv);
+}
+	static void /* row adjust for range -1 to 1 to a to b */
+rowshft(double a, double b, projUV *d, int n) {
+	int k, j;
+	double fac, cnst;
+
+	cnst = 2. / (b - a);
+	fac = cnst;
+	for (j = 1; j < n; ++j) {
+		d[j].u *= fac;
+		d[j].v *= fac;
+		fac *= cnst;
+	}
+	cnst = .5 * (a + b);
+	for (j = 0; j <= n-2; ++j)
+		for (k = n - 2; k >= j; --k) {
+			d[k].u -= cnst * d[k+1].u;
+			d[k].v -= cnst * d[k+1].v;
+		}
+}
+	static void /* column adjust for range -1 to 1 to a to b */
+colshft(double a, double b, projUV **d, int n, int m) {
+	int k, j;
+	double fac, cnst;
+
+	cnst = 2. / (b - a);
+	fac = cnst;
+	for (j = 1; j < n; ++j) {
+		dmult(d[j], fac, m);
+		fac *= cnst;
+	}
+	cnst = .5 * (a + b);
+	for (j = 0; j <= n-2; ++j)
+		for (k = n - 2; k >= j; --k)
+			dadd(d[k], d[k+1], cnst, m);
+}
+	int /* entry point */
+bch2bps(projUV a, projUV b, projUV **c, int nu, int nv) {
+	projUV **d;
+	int i;
+
+	if (nu < 1 || nv < 1 || !(d = (projUV **)vector2(nu, nv, sizeof(projUV))))
+		return 0;
+	/* do rows to power series */
+	for (i = 0; i < nu; ++i) {
+		rows(c[i], d[i], nv);
+		rowshft(a.v, b.v, d[i], nv);
+	}
+	/* do columns to power series */
+	cols(d, c, nu, nv);
+	colshft(a.u, b.u, c, nu, nv);
+	freev2((void **) d, nu);
+	return 1;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ortho.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ortho.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ortho.c	(revision 256)
@@ -0,0 +1,98 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_ortho.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	sinph0; \
+	double	cosph0; \
+	int		mode;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph.";
+#define EPS10 1.e-10
+#define N_POLE	0
+#define S_POLE 1
+#define EQUIT	2
+#define OBLIQ	3
+FORWARD(s_forward); /* spheroid */
+	double  coslam, cosphi, sinphi;
+
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+		if (cosphi * coslam < - EPS10) F_ERROR;
+		xy.y = sin(lp.phi);
+		break;
+	case OBLIQ:
+		if (P->sinph0 * (sinphi = sin(lp.phi)) +
+		   P->cosph0 * cosphi * coslam < - EPS10) F_ERROR;
+		xy.y = P->cosph0 * sinphi - P->sinph0 * cosphi * coslam;
+		break;
+	case N_POLE:
+		coslam = - coslam;
+	case S_POLE:
+		if (fabs(lp.phi - P->phi0) - EPS10 > HALFPI) F_ERROR;
+		xy.y = cosphi * coslam;
+		break;
+	}
+	xy.x = cosphi * sin(lp.lam);
+	return (xy);
+}
+
+INVERSE(s_inverse); /* spheroid */
+    double  rh, cosc, sinc;
+
+    if ((sinc = (rh = hypot(xy.x, xy.y))) > 1.) {
+        if ((sinc - 1.) > EPS10) I_ERROR;
+        sinc = 1.;
+    }
+    cosc = sqrt(1. - sinc * sinc); /* in this range OK */
+    if (fabs(rh) <= EPS10) {
+        lp.phi = P->phi0;
+        lp.lam = 0.0;
+    } else {
+        switch (P->mode) {
+        case N_POLE:
+            xy.y = -xy.y;
+            lp.phi = acos(sinc);
+            break;
+        case S_POLE:
+            lp.phi = - acos(sinc);
+            break;
+        case EQUIT:
+            lp.phi = xy.y * sinc / rh;
+            xy.x *= sinc;
+            xy.y = cosc * rh;
+            goto sinchk;
+        case OBLIQ:
+            lp.phi = cosc * P->sinph0 + xy.y * sinc * P->cosph0 /rh;
+            xy.y = (cosc - P->sinph0 * lp.phi) * rh;
+            xy.x *= sinc * P->cosph0;
+        sinchk:
+            if (fabs(lp.phi) >= 1.)
+                lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+            else
+                lp.phi = asin(lp.phi);
+            break;
+        }
+        lp.lam = (xy.y == 0. && (P->mode == OBLIQ || P->mode == EQUIT))
+             ? (xy.x == 0. ? 0. : xy.x < 0. ? -HALFPI : HALFPI)
+                           : atan2(xy.x, xy.y);
+    }
+    return (lp);
+}
+
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(ortho)
+	if (fabs(fabs(P->phi0) - HALFPI) <= EPS10)
+		P->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+	else if (fabs(P->phi0) > EPS10) {
+		P->mode = OBLIQ;
+		P->sinph0 = sin(P->phi0);
+		P->cosph0 = cos(P->phi0);
+	} else
+		P->mode = EQUIT;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg.c	(revision 256)
@@ -0,0 +1,81 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_vandg.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(vandg, "van der Grinten (I)") "\n\tMisc Sph";
+# define TOL		1.e-10
+# define THIRD		.33333333333333333333
+# define TWO_THRD	.66666666666666666666
+# define C2_27		.07407407407407407407
+# define PI4_3		4.18879020478639098458
+# define PISQ		9.86960440108935861869
+# define TPISQ		19.73920880217871723738
+# define HPISQ		4.93480220054467930934
+FORWARD(s_forward); /* spheroid */
+	double  al, al2, g, g2, p2;
+
+	p2 = fabs(lp.phi / HALFPI);
+	if ((p2 - TOL) > 1.) F_ERROR;
+	if (p2 > 1.)
+		p2 = 1.;
+	if (fabs(lp.phi) <= TOL) {
+		xy.x = lp.lam;
+		xy.y = 0.;
+	} else if (fabs(lp.lam) <= TOL || fabs(p2 - 1.) < TOL) {
+		xy.x = 0.;
+		xy.y = PI * tan(.5 * asin(p2));
+		if (lp.phi < 0.) xy.y = -xy.y;
+	} else {
+		al = .5 * fabs(PI / lp.lam - lp.lam / PI);
+		al2 = al * al;
+		g = sqrt(1. - p2 * p2);
+		g = g / (p2 + g - 1.);
+		g2 = g * g;
+		p2 = g * (2. / p2 - 1.);
+		p2 = p2 * p2;
+		xy.x = g - p2; g = p2 + al2;
+		xy.x = PI * (al * xy.x + sqrt(al2 * xy.x * xy.x - g * (g2 - p2))) / g;
+		if (lp.lam < 0.) xy.x = -xy.x;
+		xy.y = fabs(xy.x / PI);
+		xy.y = 1. - xy.y * (xy.y + 2. * al);
+		if (xy.y < -TOL) F_ERROR;
+		if (xy.y < 0.)	xy.y = 0.;
+		else		xy.y = sqrt(xy.y) * (lp.phi < 0. ? -PI : PI);
+	}
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t, c0, c1, c2, c3, al, r2, r, m, d, ay, x2, y2;
+
+	x2 = xy.x * xy.x;
+	if ((ay = fabs(xy.y)) < TOL) {
+		lp.phi = 0.;
+		t = x2 * x2 + TPISQ * (x2 + HPISQ);
+		lp.lam = fabs(xy.x) <= TOL ? 0. :
+		   .5 * (x2 - PISQ + sqrt(t)) / xy.x;
+		return (lp);
+	}
+	y2 = xy.y * xy.y;
+	r = x2 + y2;	r2 = r * r;
+	c1 = - PI * ay * (r + PISQ);
+	c3 = r2 + TWOPI * (ay * r + PI * (y2 + PI * (ay + HALFPI)));
+	c2 = c1 + PISQ * (r - 3. *  y2);
+	c0 = PI * ay;
+	c2 /= c3;
+	al = c1 / c3 - THIRD * c2 * c2;
+	m = 2. * sqrt(-THIRD * al);
+	d = C2_27 * c2 * c2 * c2 + (c0 * c0 - THIRD * c2 * c1) / c3;
+	if (((t = fabs(d = 3. * d / (al * m))) - TOL) <= 1.) {
+		d = t > 1. ? (d > 0. ? 0. : PI) : acos(d);
+		lp.phi = PI * (m * cos(d * THIRD + PI4_3) - THIRD * c2);
+		if (xy.y < 0.) lp.phi = -lp.phi;
+		t = r2 + TPISQ * (x2 - y2 + HPISQ);
+		lp.lam = fabs(xy.x) <= TOL ? 0. :
+		   .5 * (r - PISQ + (t <= 0. ? 0. : sqrt(t))) / xy.x;
+	} else
+		I_ERROR;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(vandg) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_utils.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_utils.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_utils.c	(revision 256)
@@ -0,0 +1,172 @@
+/******************************************************************************
+ * $Id: pj_utils.c,v 1.3 2002/12/14 20:14:00 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Some utility functions we don't want to bother putting in
+ *           their own source files.
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2001, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_utils.c,v $
+ * Revision 1.3  2002/12/14 20:14:00  warmerda
+ * added pj_is_geocent, added +pm support to pj_get_def
+ *
+ * Revision 1.2  2002/04/30 17:01:51  warmerda
+ * Removed printf() statement.
+ *
+ * Revision 1.1  2001/04/05 04:22:46  warmerda
+ * New
+ *
+ */
+
+#define PJ_LIB__
+
+#include <projects.h>
+#include <string.h>
+#include <math.h>
+
+/************************************************************************/
+/*                           pj_is_latlong()                            */
+/*                                                                      */
+/*      Returns TRUE if this coordinate system object is                */
+/*      geographic.                                                     */
+/************************************************************************/
+
+int pj_is_latlong( PJ *pj )
+
+{
+    return pj == NULL || pj->is_latlong;
+}
+
+/************************************************************************/
+/*                           pj_is_geocent()                            */
+/*                                                                      */
+/*      Returns TRUE if this coordinate system object is geocentric.    */
+/************************************************************************/
+
+int pj_is_geocent( PJ *pj )
+
+{
+    return pj != NULL && pj->is_geocent;
+}
+
+/************************************************************************/
+/*                        pj_latlong_from_proj()                        */
+/*                                                                      */
+/*      Return a PJ* definition defining the lat/long coordinate        */
+/*      system on which a projection is based.  If the coordinate       */
+/*      system passed in is latlong, a clone of the same will be        */
+/*      returned.                                                       */
+/************************************************************************/
+
+PJ *pj_latlong_from_proj( PJ *pj_in )
+
+{
+    char	defn[512];
+    int		got_datum = FALSE;
+
+    pj_errno = 0;
+    strcpy( defn, "+proj=latlong" );
+
+    if( pj_param(pj_in->params, "tdatum").i )
+    {
+        got_datum = TRUE;
+        sprintf( defn+strlen(defn), " +datum=%s", 
+                 pj_param(pj_in->params,"sdatum").s );
+    }
+    else if( pj_param(pj_in->params, "tellps").i )
+    {
+        sprintf( defn+strlen(defn), " +ellps=%s", 
+                 pj_param(pj_in->params,"sellps").s );
+    }
+    else if( pj_param(pj_in->params, "ta").i )
+    {
+        sprintf( defn+strlen(defn), " +a=%s", 
+                 pj_param(pj_in->params,"sa").s );
+            
+        if( pj_param(pj_in->params, "tb").i )
+            sprintf( defn+strlen(defn), " +b=%s", 
+                     pj_param(pj_in->params,"sb").s );
+        else if( pj_param(pj_in->params, "tes").i )
+            sprintf( defn+strlen(defn), " +es=%s", 
+                     pj_param(pj_in->params,"ses").s );
+        else if( pj_param(pj_in->params, "tf").i )
+            sprintf( defn+strlen(defn), " +f=%s", 
+                     pj_param(pj_in->params,"sf").s );
+        else
+            sprintf( defn+strlen(defn), " +es=%.4f", 
+                     pj_in->es );
+    }
+    else
+    {
+        pj_errno = -13;
+
+        return NULL;
+    }
+
+    if( !got_datum )
+    {
+        if( pj_param(pj_in->params, "ttowgs84").i )
+            sprintf( defn+strlen(defn), " +towgs84=%s", 
+                     pj_param(pj_in->params,"stowgs84").s );
+
+        if( pj_param(pj_in->params, "ttowgs84").i )
+            sprintf( defn+strlen(defn), " +towgs84=%s", 
+                     pj_param(pj_in->params,"stowgs84").s );
+
+        if( pj_param(pj_in->params, "tnadgrids").i )
+            sprintf( defn+strlen(defn), " +nadgrids=%s", 
+                     pj_param(pj_in->params,"snadgrids").s );
+    }
+
+    /* copy over some other information related to ellipsoid */
+    if( pj_param(pj_in->params, "tR").i )
+        sprintf( defn+strlen(defn), " +R=%s", 
+                 pj_param(pj_in->params,"sR").s );
+
+    if( pj_param(pj_in->params, "tR_A").i )
+        sprintf( defn+strlen(defn), " +R_A" );
+
+    if( pj_param(pj_in->params, "tR_V").i )
+        sprintf( defn+strlen(defn), " +R_V" );
+
+    if( pj_param(pj_in->params, "tR_a").i )
+        sprintf( defn+strlen(defn), " +R_a" );
+
+    if( pj_param(pj_in->params, "tR_lat_a").i )
+        sprintf( defn+strlen(defn), " +R_lat_a=%s", 
+                 pj_param(pj_in->params,"sR_lat_a").s );
+
+    if( pj_param(pj_in->params, "tR_lat_g").i )
+        sprintf( defn+strlen(defn), " +R_lat_g=%s", 
+                 pj_param(pj_in->params,"sR_lat_g").s );
+
+    /* copy over prime meridian */
+    if( pj_param(pj_in->params, "tpm").i )
+        sprintf( defn+strlen(defn), " +pm=%s", 
+                 pj_param(pj_in->params,"spm").s );
+
+    return pj_init_plus( defn );
+}
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bonne.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bonne.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bonne.c	(revision 256)
@@ -0,0 +1,88 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_bonne.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double phi1; \
+	double cphi1; \
+	double am1; \
+	double m1; \
+	double *en;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
+	"\n\tConic Sph&Ell\n\tlat_1=";
+#define EPS10	1e-10
+FORWARD(e_forward); /* ellipsoid */
+	double rh, E, c;
+
+	rh = P->am1 + P->m1 - pj_mlfn(lp.phi, E = sin(lp.phi), c = cos(lp.phi), P->en);
+	E = c * lp.lam / (rh * sqrt(1. - P->es * E * E));
+	xy.x = rh * sin(E);
+	xy.y = P->am1 - rh * cos(E);
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	double E, rh;
+
+	rh = P->cphi1 + P->phi1 - lp.phi;
+	if (fabs(rh) > EPS10) {
+		xy.x = rh * sin(E = lp.lam * cos(lp.phi) / rh);
+		xy.y = P->cphi1 - rh * cos(E);
+	} else
+		xy.x = xy.y = 0.;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double rh;
+
+	rh = hypot(xy.x, xy.y = P->cphi1 - xy.y);
+	lp.phi = P->cphi1 + P->phi1 - rh;
+	if (fabs(lp.phi) > HALFPI) I_ERROR;
+	if (fabs(fabs(lp.phi) - HALFPI) <= EPS10)
+		lp.lam = 0.;
+	else
+		lp.lam = rh * atan2(xy.x, xy.y) / cos(lp.phi);
+	return (lp);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double s, rh;
+
+	rh = hypot(xy.x, xy.y = P->am1 - xy.y);
+	lp.phi = pj_inv_mlfn(P->am1 + P->m1 - rh, P->es, P->en);
+	if ((s = fabs(lp.phi)) < HALFPI) {
+		s = sin(lp.phi);
+		lp.lam = rh * atan2(xy.x, xy.y) *
+		   sqrt(1. - P->es * s * s) / cos(lp.phi);
+	} else if (fabs(s - HALFPI) <= EPS10)
+		lp.lam = 0.;
+	else I_ERROR;
+	return (lp);
+}
+FREEUP;
+	if (P) {
+		if (P->en)
+			pj_dalloc(P->en);
+		pj_dalloc(P);
+	}
+}
+ENTRY1(bonne, en)
+	double c;
+
+	P->phi1 = pj_param(P->params, "rlat_1").f;
+	if (fabs(P->phi1) < EPS10) E_ERROR(-23);
+	if (P->es) {
+		P->en = pj_enfn(P->es);
+		P->m1 = pj_mlfn(P->phi1, P->am1 = sin(P->phi1),
+			c = cos(P->phi1), P->en);
+		P->am1 = c / (sqrt(1. - P->es * P->am1 * P->am1) * P->am1);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		if (fabs(P->phi1) + EPS10 >= HALFPI)
+			P->cphi1 = 0.;
+		else
+			P->cphi1 = 1. / tan(P->phi1);
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nell_h.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nell_h.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nell_h.c	(revision 256)
@@ -0,0 +1,33 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_nell_h.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(nell_h, "Nell-Hammer") "\n\tPCyl., Sph.";
+#define NITER 9
+#define EPS 1e-7
+FORWARD(s_forward); /* spheroid */
+	xy.x = 0.5 * lp.lam * (1. + cos(lp.phi));
+	xy.y = 2.0 * (lp.phi - tan(0.5 *lp.phi));
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double V, c, p;
+	int i;
+
+	p = 0.5 * xy.y;
+	for (i = NITER; i ; --i) {
+		c = cos(0.5 * lp.phi);
+		lp.phi -= V = (lp.phi - tan(lp.phi/2) - p)/(1. - 0.5/(c*c));
+		if (fabs(V) < EPS)
+			break;
+	}
+	if (!i) {
+		lp.phi = p < 0. ? -HALFPI : HALFPI;
+		lp.lam = 2. * xy.x;
+	} else
+		lp.lam = 2. * xy.x / (1. + cos(lp.phi));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(nell_h) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/CMakeLists.txt
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/CMakeLists.txt	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/CMakeLists.txt	(revision 256)
@@ -0,0 +1,21 @@
+set(LIB_NAME crsjniproj)
+
+FILE(GLOB SOURCES "*.c*")
+
+include_directories(
+	${CMAKE_SOURCE_DIR}/include
+	${JAVA_INCLUDE_PATH}
+	${JAVA_INCLUDE_PATH2}
+	#${PROJ_INCLUDE_DIR}
+)
+
+SET(LIBRARIES_OPTIMIZED 
+    #${PROJ_LIBRARY}
+)
+
+SET(LIBRARIES_DEBUG
+    #${PROJ_LIBRARY}
+)
+
+SETUP_JNILIB(${LIB_NAME})
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_msfn.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_msfn.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_msfn.c	(revision 256)
@@ -0,0 +1,10 @@
+/* determine constant small m */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_msfn.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <math.h>
+#include <projects.h>
+	double
+pj_msfn(double sinphi, double cosphi, double es) {
+	return (cosphi / sqrt (1. - es * sinphi * sinphi));
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_omerc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_omerc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_omerc.c	(revision 256)
@@ -0,0 +1,169 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_omerc.c	4.2	95/01/01	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	alpha, lamc, lam1, phi1, lam2, phi2, Gamma, al, bl, el, \
+		singam, cosgam, sinrot, cosrot, u_0; \
+	int		ellips, rot;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(omerc, "Oblique Mercator")
+	"\n\tCyl, Sph&Ell\n\t no_rot rot_conv no_uoff and\n\t"
+"alpha= lonc= or\n\t lon_1= lat_1= lon_2= lat_2=";
+#define TOL	1.e-7
+#define EPS	1.e-10
+#define TSFN0(x)	tan(.5 * (HALFPI - (x)))
+FORWARD(e_forward); /* ellipsoid & spheroid */
+	double  con, q, s, ul, us, vl, vs;
+
+	vl = sin(P->bl * lp.lam);
+	if (fabs(fabs(lp.phi) - HALFPI) <= EPS) {
+		ul = lp.phi < 0. ? -P->singam : P->singam;
+		us = P->al * lp.phi / P->bl;
+	} else {
+		q = P->el / (P->ellips ? pow(pj_tsfn(lp.phi, sin(lp.phi), P->e), P->bl)
+			: TSFN0(lp.phi));
+		s = .5 * (q - 1. / q);
+		ul = 2. * (s * P->singam - vl * P->cosgam) / (q + 1. / q);
+		con = cos(P->bl * lp.lam);
+		if (fabs(con) >= TOL) {
+			us = P->al * atan((s * P->cosgam + vl * P->singam) / con) / P->bl;
+			if (con < 0.)
+				us += PI * P->al / P->bl;
+		} else
+			us = P->al * P->bl * lp.lam;
+	}
+	if (fabs(fabs(ul) - 1.) <= EPS) F_ERROR;
+	vs = .5 * P->al * log((1. - ul) / (1. + ul)) / P->bl;
+	us -= P->u_0;
+	if (! P->rot) {
+		xy.x = us;
+		xy.y = vs;
+	} else {
+		xy.x = vs * P->cosrot + us * P->sinrot;
+		xy.y = us * P->cosrot - vs * P->sinrot;
+	}
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid & spheroid */
+	double  q, s, ul, us, vl, vs;
+
+	if (! P->rot) {
+		us = xy.x;
+		vs = xy.y;
+	} else {
+		vs = xy.x * P->cosrot - xy.y * P->sinrot;
+		us = xy.y * P->cosrot + xy.x * P->sinrot;
+	}
+	us += P->u_0;
+	q = exp(- P->bl * vs / P->al);
+	s = .5 * (q - 1. / q);
+	vl = sin(P->bl * us / P->al);
+	ul = 2. * (vl * P->cosgam + s * P->singam) / (q + 1. / q);
+	if (fabs(fabs(ul) - 1.) < EPS) {
+		lp.lam = 0.;
+		lp.phi = ul < 0. ? -HALFPI : HALFPI;
+	} else {
+		lp.phi = P->el / sqrt((1. + ul) / (1. - ul));
+		if (P->ellips) {
+			if ((lp.phi = pj_phi2(pow(lp.phi, 1. / P->bl), P->e)) == HUGE_VAL)
+				I_ERROR;
+		} else
+			lp.phi = HALFPI - 2. * atan(lp.phi);
+		lp.lam = - atan2((s * P->cosgam -
+			vl * P->singam), cos(P->bl * us / P->al)) / P->bl;
+	}
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(omerc)
+	double con, com, cosph0, d, f, h, l, sinph0, p, j;
+	int azi;
+
+	P->rot	= pj_param(P->params, "bno_rot").i == 0;
+	if( (azi	= pj_param(P->params, "talpha").i) != 0.0) {
+		P->lamc	= pj_param(P->params, "rlonc").f;
+		P->alpha	= pj_param(P->params, "ralpha").f;
+		if ( fabs(P->alpha) <= TOL ||
+			fabs(fabs(P->phi0) - HALFPI) <= TOL ||
+			fabs(fabs(P->alpha) - HALFPI) <= TOL)
+			E_ERROR(-32);
+	} else {
+		P->lam1	= pj_param(P->params, "rlon_1").f;
+		P->phi1	= pj_param(P->params, "rlat_1").f;
+		P->lam2	= pj_param(P->params, "rlon_2").f;
+		P->phi2	= pj_param(P->params, "rlat_2").f;
+		if (fabs(P->phi1 - P->phi2) <= TOL ||
+			(con = fabs(P->phi1)) <= TOL ||
+			fabs(con - HALFPI) <= TOL ||
+			fabs(fabs(P->phi0) - HALFPI) <= TOL ||
+			fabs(fabs(P->phi2) - HALFPI) <= TOL) E_ERROR(-33);
+	}
+	com = (P->ellips = P->es > 0.) ? sqrt(P->one_es) : 1.;
+	if (fabs(P->phi0) > EPS) {
+		sinph0 = sin(P->phi0);
+		cosph0 = cos(P->phi0);
+		if (P->ellips) {
+			con = 1. - P->es * sinph0 * sinph0;
+			P->bl = cosph0 * cosph0;
+			P->bl = sqrt(1. + P->es * P->bl * P->bl / P->one_es);
+			P->al = P->bl * P->k0 * com / con;
+			d = P->bl * com / (cosph0 * sqrt(con));
+		} else {
+			P->bl = 1.;
+			P->al = P->k0;
+			d = 1. / cosph0;
+		}
+		if ((f = d * d - 1.) <= 0.)
+			f = 0.;
+		else {
+			f = sqrt(f);
+			if (P->phi0 < 0.)
+				f = -f;
+		}
+		P->el = f += d;
+		if (P->ellips)	P->el *= pow(pj_tsfn(P->phi0, sinph0, P->e), P->bl);
+		else		P->el *= TSFN0(P->phi0);
+	} else {
+		P->bl = 1. / com;
+		P->al = P->k0;
+		P->el = d = f = 1.;
+	}
+	if (azi) {
+		P->Gamma = asin(sin(P->alpha) / d);
+		P->lam0 = P->lamc - asin((.5 * (f - 1. / f)) *
+		   tan(P->Gamma)) / P->bl;
+	} else {
+		if (P->ellips) {
+			h = pow(pj_tsfn(P->phi1, sin(P->phi1), P->e), P->bl);
+			l = pow(pj_tsfn(P->phi2, sin(P->phi2), P->e), P->bl);
+		} else {
+			h = TSFN0(P->phi1);
+			l = TSFN0(P->phi2);
+		}
+		f = P->el / h;
+		p = (l - h) / (l + h);
+		j = P->el * P->el;
+		j = (j - l * h) / (j + l * h);
+		if ((con = P->lam1 - P->lam2) < -PI)
+			P->lam2 -= TWOPI;
+		else if (con > PI)
+			P->lam2 += TWOPI;
+		P->lam0 = adjlon(.5 * (P->lam1 + P->lam2) - atan(
+		   j * tan(.5 * P->bl * (P->lam1 - P->lam2)) / p) / P->bl);
+		P->Gamma = atan(2. * sin(P->bl * adjlon(P->lam1 - P->lam0)) /
+		   (f - 1. / f));
+		P->alpha = asin(d * sin(P->Gamma));
+	}
+	P->singam = sin(P->Gamma);
+	P->cosgam = cos(P->Gamma);
+	f = pj_param(P->params, "brot_conv").i ? P->Gamma : P->alpha;
+	P->sinrot = sin(f);
+	P->cosrot = cos(f);
+	P->u_0 = pj_param(P->params, "bno_uoff").i ? 0. :
+		fabs(P->al * atan(sqrt(d * d - 1.) / P->cosrot) / P->bl);
+	if (P->phi0 < 0.)
+		P->u_0 = - P->u_0;
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_strerrno.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_strerrno.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_strerrno.c	(revision 256)
@@ -0,0 +1,84 @@
+/* list of projection system pj_errno values */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_strerrno.c	4.12   94/05/25 GIE REL";
+#endif
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <projects.h>
+	static char *
+pj_err_list[] = {
+	"no arguments in initialization list",	/*  -1 */
+	"no options found in 'init' file",		/*  -2 */
+	"no colon in init= string",			/*  -3 */
+	"projection not named",				/*  -4 */
+	"unknown projection id",			/*  -5 */
+	"effective eccentricity = 1.",			/*  -6 */
+	"unknown unit conversion id",			/*  -7 */
+	"invalid boolean param argument",		/*  -8 */
+	"unknown elliptical parameter name",	        /*  -9 */
+	"reciprocal flattening (1/f) = 0",		/* -10 */
+	"|radius reference latitude| > 90",		/* -11 */
+	"squared eccentricity < 0",			/* -12 */
+	"major axis or radius = 0 or not given",	/* -13 */
+	"latitude or longitude exceeded limits",	/* -14 */
+	"invalid x or y",				/* -15 */
+	"improperly formed DMS value",			/* -16 */
+	"non-convergent inverse meridinal dist",	/* -17 */
+	"non-convergent inverse phi2",			/* -18 */
+	"acos/asin: |arg| >1.+1e-14",			/* -19 */
+	"tolerance condition error",			/* -20 */
+	"conic lat_1 = -lat_2",				/* -21 */
+	"lat_1 >= 90",					/* -22 */
+	"lat_1 = 0",					/* -23 */
+	"lat_ts >= 90",					/* -24 */
+	"no distance between control points",		/* -25 */
+	"projection not selected to be rotated",	/* -26 */
+	"W <= 0 or M <= 0",				/* -27 */
+	"lsat not in 1-5 range",			/* -28 */
+	"path not in range",				/* -29 */
+	"h <= 0",					/* -30 */
+	"k <= 0",					/* -31 */
+	"lat_0 = 0 or 90 or alpha = 90",		/* -32 */
+	"lat_1=lat_2 or lat_1=0 or lat_2=90",		/* -33 */
+	"elliptical usage required",			/* -34 */
+	"invalid UTM zone number",			/* -35 */
+	"arg(s) out of range for Tcheby eval",		/* -36 */
+	"failed to find projection to be rotated",	/* -37 */
+	"failed to load NAD27-83 correction file",  	/* -38 */
+	"both n & m must be spec'd and > 0",		/* -39 */
+	"n <= 0, n > 1 or not specified",		/* -40 */
+	"lat_1 or lat_2 not specified",			/* -41 */
+	"|lat_1| == |lat_2|",				/* -42 */
+	"lat_0 is pi/2 from mean lat",			/* -43 */
+	"unparseable coordinate system definition",	/* -44 */
+	"geocentric transformation missing z or ellps",	/* -45 */
+	"unknown prime meridian conversion id",		/* -46 */
+};
+	char *
+pj_strerrno(int err) 
+{
+    static char note[50];
+
+    if (err > 0)
+#ifdef HAVE_STRERROR
+        return strerror(err);
+#else
+    {   
+        sprintf(note,"no system list, errno: %d\n", err);
+        return note;
+    }
+#endif
+    else if (err < 0) {
+        int adjusted_err = - err - 1;
+        if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *)))
+            return(pj_err_list[adjusted_err]);
+        else
+        {
+            sprintf( note, "invalid projection system error (%d)",
+                     err );
+            return note;
+        }
+    } else
+        return NULL;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg4.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg4.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_vandg4.c	(revision 256)
@@ -0,0 +1,44 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_vandg4.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(vandg4, "van der Grinten IV") "\n\tMisc Sph, no inv.";
+#define TOL	1e-10
+#define TWORPI	0.63661977236758134308
+FORWARD(s_forward); /* spheroid */
+	double x1, t, bt, ct, ft, bt2, ct2, dt, dt2;
+
+	if (fabs(lp.phi) < TOL) {
+		xy.x = lp.lam;
+		xy.y = 0.;
+	} else if (fabs(lp.lam) < TOL || fabs(fabs(lp.phi) - HALFPI) < TOL) {
+		xy.x = 0.;
+		xy.y = lp.phi;
+	} else {
+		bt = fabs(TWORPI * lp.phi);
+		bt2 = bt * bt;
+		ct = 0.5 * (bt * (8. - bt * (2. + bt2)) - 5.)
+			/ (bt2 * (bt - 1.));
+		ct2 = ct * ct;
+		dt = TWORPI * lp.lam;
+		dt = dt + 1. / dt;
+		dt = sqrt(dt * dt - 4.);
+		if ((fabs(lp.lam) - HALFPI) < 0.) dt = -dt;
+		dt2 = dt * dt;
+		x1 = bt + ct; x1 *= x1;
+		t = bt + 3.*ct;
+		ft = x1 * (bt2 + ct2 * dt2 - 1.) + (1.-bt2) * (
+			bt2 * (t * t + 4. * ct2) +
+			ct2 * (12. * bt * ct + 4. * ct2) );
+		x1 = (dt*(x1 + ct2 - 1.) + 2.*sqrt(ft)) /
+			(4.* x1 + dt2);
+		xy.x = HALFPI * x1;
+		xy.y = HALFPI * sqrt(1. + dt * fabs(x1) - x1 * x1);
+		if (lp.lam < 0.) xy.x = -xy.x;
+		if (lp.phi < 0.) xy.y = -xy.y;
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(vandg4) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck1.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck1.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck1.c	(revision 256)
@@ -0,0 +1,22 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eck1.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(eck1, "Eckert I") "\n\tPCyl., Sph.";
+#define FC	.92131773192356127802
+#define RP	.31830988618379067154
+FORWARD(s_forward); /* spheroid */
+	xy.x = FC * lp.lam * (1. - RP * fabs(lp.phi));
+	xy.y = FC * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / FC;
+	lp.lam = xy.x / (FC * (1. - RP * fabs(lp.phi)));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(eck1)
+	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_datum_set.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_datum_set.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_datum_set.c	(revision 256)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * $Id: pj_datum_set.c,v 1.2 2001/04/04 21:13:21 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Apply datum definition to PJ structure from initialization string.
+ * Author:   Frank Warmerdam, warmerda@home.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_datum_set.c,v $
+ * Revision 1.2  2001/04/04 21:13:21  warmerda
+ * do arcsecond/radian and ppm datum parm transformation in pj_set_datum()
+ *
+ * Revision 1.1  2000/07/06 23:32:27  warmerda
+ * New
+ *
+ */
+
+#include <projects.h>
+#include <string.h>
+
+/* SEC_TO_RAD = Pi/180/3600 */
+#define SEC_TO_RAD 4.84813681109535993589914102357e-6
+
+/************************************************************************/
+/*                            pj_datum_set()                            */
+/************************************************************************/
+
+int pj_datum_set(paralist *pl, PJ *projdef)
+
+{
+    const char *name, *towgs84, *nadgrids;
+
+    projdef->datum_type = PJD_UNKNOWN;
+
+/* -------------------------------------------------------------------- */
+/*      Is there a datum definition in the parameters list?  If so,     */
+/*      add the defining values to the parameter list.  Note that       */
+/*      this will append the ellipse definition as well as the          */
+/*      towgs84= and related parameters.  It should also be pointed     */
+/*      out that the addition is permanent rather than temporary        */
+/*      like most other keyword expansion so that the ellipse           */
+/*      definition will last into the pj_ell_set() function called      */
+/*      after this one.                                                 */
+/* -------------------------------------------------------------------- */
+    if( (name = pj_param(pl,"sdatum").s) != NULL )
+    {
+        paralist *curr;
+        const char *s;
+        int i;
+
+        /* find the end of the list, so we can add to it */
+        for (curr = pl; curr && curr->next ; curr = curr->next) {}
+        
+        /* find the datum definition */
+        for (i = 0; (s = pj_datums[i].id) && strcmp(name, s) ; ++i) {}
+
+        if (!s) { pj_errno = -9; return 1; }
+
+        if( pj_datums[i].ellipse_id && strlen(pj_datums[i].ellipse_id) > 0 )
+        {
+            char	entry[100];
+            
+            strcpy( entry, "ellps=" );
+            strncat( entry, pj_datums[i].ellipse_id, 80 );
+            curr = curr->next = pj_mkparam(entry);
+        }
+        
+        if( pj_datums[i].defn && strlen(pj_datums[i].defn) > 0 )
+            curr = curr->next = pj_mkparam(pj_datums[i].defn);
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Check for nadgrids parameter.                                   */
+/* -------------------------------------------------------------------- */
+    if( (nadgrids = pj_param(pl,"snadgrids").s) != NULL )
+    {
+        /* We don't actually save the value separately.  It will continue
+           to exist int he param list for use in pj_apply_gridshift.c */
+
+        projdef->datum_type = PJD_GRIDSHIFT;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Check for towgs84 parameter.                                    */
+/* -------------------------------------------------------------------- */
+    else if( (towgs84 = pj_param(pl,"stowgs84").s) != NULL )
+    {
+        int    parm_count = 0;
+        const char *s;
+
+        memset( projdef->datum_params, 0, sizeof(double) * 7);
+
+        /* parse out the parameters */
+        s = towgs84;
+        for( s = towgs84; *s != '\0'; ) 
+        {
+            projdef->datum_params[parm_count++] = atof(s);
+            while( *s != '\0' && *s != ',' )
+                s++;
+            if( *s == ',' )
+                s++;
+        }
+
+        if( projdef->datum_params[3] != 0.0 
+            || projdef->datum_params[4] != 0.0 
+            || projdef->datum_params[5] != 0.0 
+            || projdef->datum_params[6] != 0.0 )
+        {
+            projdef->datum_type = PJD_7PARAM;
+
+            /* transform from arc seconds to radians */
+            projdef->datum_params[3] *= SEC_TO_RAD;
+            projdef->datum_params[4] *= SEC_TO_RAD;
+            projdef->datum_params[5] *= SEC_TO_RAD;
+            /* transform from parts per million to scaling factor */
+            projdef->datum_params[6] = 
+                (projdef->datum_params[6]/1000000.0) + 1;
+        }
+        else 
+            projdef->datum_type = PJD_3PARAM;
+
+        /* Note that pj_init() will later switch datum_type to 
+           PJD_WGS84 if shifts are all zero, and ellipsoid is WGS84 or GRS80 */
+    }
+
+    return 0;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck5.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck5.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck5.c	(revision 256)
@@ -0,0 +1,21 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eck5.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(eck5, "Eckert V") "\n\tPCyl, Sph.";
+#define XF	0.44101277172455148219
+#define RXF	2.26750802723822639137
+#define YF	0.88202554344910296438
+#define RYF	1.13375401361911319568
+FORWARD(s_forward); /* spheroid */
+	xy.x = XF * (1. + cos(lp.phi)) * lp.lam;
+	xy.y = YF * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.lam = RXF * xy.x / (1. + cos( lp.phi = RYF * xy.y));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(eck5); P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/crsJniProj.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/crsJniProj.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/crsJniProj.c	(revision 256)
@@ -0,0 +1,338 @@
+/**********************************************************************
+ * $Id: crsJniProj.c,v 1.9 2006/09/07 10:38:13
+ *
+ * Name:     crsJniProj.c
+ * Project:  Proj-4.4.9. Cartographic Projections library(Gerald Evenden).
+ * Purpose:  Projections Basic Funcions.
+ * Author:   Miguel Garcia Jimenez, garciajimenez.miguel@gmail.com
+ * Collaborator: Jose Luis Gomez Martinez, jolugomar@gmail.com
+ *               David Hernandez Lopez , dhernan@agr-ab.uclm.es
+ * Modified: Rafael Gaitán <rgaitan@ai2.upv.es>
+ *
+ **********************************************************************/
+/* gvSIG. Sistema de Informacion Geografica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ */
+
+#include "projects.h"
+#include <jni.h>
+#include <proj_api.h>
+
+#define arraysize 300
+
+//Realizar una operacion entre CRS, pasando como parametros tres arrays de doubles(puntos)
+JNIEXPORT int JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_operation
+(JNIEnv * env, jobject parent, jdoubleArray firstcoord, jdoubleArray secondcoord, jdoubleArray values, jlong src, jlong dest)
+{
+	int err = 0;
+	int i;
+	projPJ src_pj, dst_pj; // comprobar si se puede quitar
+	jboolean isCopy;
+	jdouble *xcoord;
+	jdouble *ycoord;
+	jdouble *zcoord; 
+	jint sizeofdata;
+	
+	src_pj = (projPJ)src;
+	dst_pj = (projPJ)dest;
+		
+	xcoord = (*env)->GetDoubleArrayElements(env, firstcoord, &isCopy);
+	ycoord = (*env)->GetDoubleArrayElements(env, secondcoord, &isCopy);
+	zcoord = (*env)->GetDoubleArrayElements(env, values, &isCopy);
+	sizeofdata = (*env)->GetArrayLength(env, firstcoord);
+	if(src_pj->is_latlong == 1)
+	{
+		for(i = 0;i<sizeofdata;i++)
+		{
+			*xcoord = *xcoord / (180/PI);
+			*ycoord = *ycoord / (180/PI);
+
+			err = pj_transform( src_pj, dst_pj,1,1, xcoord, ycoord, zcoord);
+			if(dst_pj->is_latlong == 1)
+			{
+				*xcoord = *xcoord * (180/PI);
+				*ycoord = *ycoord * (180/PI);
+
+			}
+			xcoord++;
+			ycoord++;
+			zcoord++;
+		}
+	}
+	if(src_pj->is_latlong == 0)
+	{
+		for(i = 0;i<sizeofdata;i++)
+		{
+			err = pj_transform( src_pj, dst_pj,1,1, xcoord, ycoord, zcoord);
+
+			if(dst_pj->is_latlong == 1)
+			{
+				*xcoord = *xcoord * (180/PI);
+				*ycoord = *ycoord * (180/PI);
+			}
+			xcoord++;
+			ycoord++;
+			zcoord++;
+		}
+	}
+	xcoord = xcoord - sizeofdata;
+	ycoord = ycoord - sizeofdata;
+	zcoord = zcoord - sizeofdata;
+	(* env)->ReleaseDoubleArrayElements(env,firstcoord,(jdouble *) xcoord,0);
+	(* env)->ReleaseDoubleArrayElements(env,secondcoord,(jdouble *) ycoord,0);
+	(* env)->ReleaseDoubleArrayElements(env,values,(jdouble *) zcoord,0);
+	// return 1; // pendiente de analizar error
+	return err;
+}
+
+//Realizar una operacion entre CRS, pasando como parametros tres doubles(puntos)
+
+JNIEXPORT int JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_operationSimple
+(JNIEnv * env, jobject parent, jdouble firstcoord, jdouble secondcoord, jdouble values, jlong src, jlong dest)
+{
+	int err = 0;
+	int i;
+	projPJ src_pj, dst_pj; // comprobar si se puede quitar
+	double x,y,z;
+	double *xcoord;
+	double *ycoord;
+	double *zcoord;
+	
+	src_pj = (projPJ)src;
+	dst_pj = (projPJ)dest;
+
+	x=firstcoord;
+	y=secondcoord;
+	z=values;
+	*xcoord = firstcoord;
+	*ycoord = secondcoord;
+	*zcoord = values;
+
+	if(src_pj->is_latlong == 1)
+	{
+		*xcoord = *xcoord / (180/PI);
+		*ycoord = *ycoord / (180/PI);
+	}
+
+	err = pj_transform( src_pj, dst_pj,1,1, xcoord,ycoord,zcoord);
+
+	if(dst_pj->is_latlong == 1)
+	{
+		*xcoord = *xcoord * (180/PI);
+		*ycoord = *ycoord * (180/PI);
+	}
+
+	firstcoord =*xcoord;
+	secondcoord =*ycoord;
+	values =*zcoord;
+
+	// return 1; // pendiente de analizar error
+	return err;
+}
+
+//Realizar una operacion entre CRS, pasando como parametro un array de tres dobles(puntos)
+
+JNIEXPORT int JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_operationArraySimple
+(JNIEnv * env, jobject parent, jdoubleArray coord, jlong src, jlong dest)
+{
+	int err = 0;
+	projPJ src_pj, dst_pj; // comprobar si se puede quitar
+	jdouble *xcoord;
+	jdouble *zcoord;
+	jdouble *ycoord;
+	
+	src_pj = (projPJ)src;
+	dst_pj = (projPJ)dest;
+	
+	zcoord = (* env)-> GetDoubleArrayElements(env, coord, NULL);
+	xcoord = zcoord++;
+	ycoord = zcoord++;
+
+	if(src_pj->is_latlong == 1)
+	{
+		*xcoord = *xcoord / (180/PI);
+		*ycoord = *ycoord / (180/PI);
+	}
+
+	err = pj_transform( src_pj, dst_pj,1,1, xcoord, ycoord, zcoord);
+
+	if(dst_pj->is_latlong == 1)
+	{
+		*xcoord = *xcoord * (180/PI);
+		*ycoord = *ycoord * (180/PI);
+	}
+
+	(* env)->ReleaseDoubleArrayElements(env,coord,(jdouble *) xcoord,0);
+
+	// return 1; // pendiente de analizar error
+	return err;
+}
+
+//Crea un CRS a partir de una cadena proj4, devolviendo la direccion de memoria del CRS
+
+JNIEXPORT projPJ JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_loadCrs
+(JNIEnv * env, jobject parent, jstring strCrs)
+{
+	projPJ src_pj;
+	char * srcproj_def = (char *) (*env)->GetStringUTFChars (env, strCrs, 0);
+	if (!(src_pj = pj_init_plus(srcproj_def))) return 0;
+	return src_pj;
+}
+
+//Libera la direccion de memoria del CRS creado
+
+JNIEXPORT void JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_freeCrs
+(JNIEnv * env, jobject parent, jlong crs )
+{
+	projPJ proj_pj;
+	proj_pj = crs;
+	pj_free( proj_pj );
+}
+
+//Devuelve un 1 si el CRS es latlong,  un 0 en caso contrario o un codigo de error (negativo) si el crs no está bien creado.
+
+JNIEXPORT int JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_isLatlong
+(JNIEnv * env, jobject parent, jlong crs)
+{
+	projPJ proj_pj = crs;
+
+	int *err = pj_get_errno_ref();
+	if(*err>=0)
+	return proj_pj->is_latlong;
+	else
+	return *err;
+}
+
+//Devuelve el codigo de error correspondiente al ultimo crs creado.
+
+JNIEXPORT int JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_getErrno
+(JNIEnv * env, jobject parent)
+{
+	int *err = pj_get_errno_ref();
+	return *err;
+}
+
+//Traduce un codigo de error a su correspondiente mensaje.
+
+JNIEXPORT jstring JNICALL Java_org_gvsig_crs_proj_JNIBaseCrs_strErrno
+(JNIEnv * env, jobject parent, jint errno)
+{
+	int err = errno;
+	char * strerr = pj_strerrno(err);
+	return (*env)->NewStringUTF(env,strerr);
+}
+
+/*!
+ * \brief
+ * retrieves projection parameters
+ *
+ * JNI informations:
+ * Class:     org_proj4_Projections
+ * Method:    getProjInfo
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ *
+ *
+ * \param env - parameter used by jni (see JNI specification)
+ * \param parent - parameter used by jni (see JNI specification)
+ * \param projdefinition - definition of the projection
+ */
+/*
+ JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getProjInfo
+ (JNIEnv * env, jobject parent, jstring projdefinition)
+ {
+ PJ *pj;
+ char * pjdesc;
+ char info[arraysize];
+
+ char * proj_def = (char *) (*env)->GetStringUTFChars (env, projdefinition, 0);
+
+ if (!(pj = pj_init_plus(proj_def)))
+ exit(1);
+
+ // put together all the info of the projection and free the pointer to pjdesc
+ pjdesc = pj_get_def(pj, 0);
+ strcpy(info,pjdesc);
+ pj_dalloc(pjdesc);
+
+ return (*env)->NewStringUTF(env,info);
+ }
+ */
+
+/*!
+ * \brief
+ * retrieves ellipsoid parameters
+ *
+ * JNI informations:
+ * Class:     org_proj4_Projections
+ * Method:    getEllipsInfo
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ *
+ *
+ * \param env - parameter used by jni (see JNI specification)
+ * \param parent - parameter used by jni (see JNI specification)
+ * \param projdefinition - definition of the projection
+ */
+/*
+ JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getEllipsInfo
+ (JNIEnv * env, jobject parent, jstring projdefinition)
+ {
+ PJ *pj;
+ char * pjdesc;
+ char ellipseinfo[arraysize];
+ char temp[50];
+
+ char * proj_def = (char *) (*env)->GetStringUTFChars (env, projdefinition, 0);
+
+ if (!(pj = pj_init_plus(proj_def)))
+ exit(1);
+
+ // put together all the info of the ellipsoid
+ //  sprintf(temp,"name: %s;", pj->descr);
+ sprintf(temp,"name: not available;");
+ strcpy(ellipseinfo,temp);
+ sprintf(temp,"a: %lf;", pj->a);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"e: %lf;", pj->e);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"es: %lf;", pj->es);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"ra: %lf;", pj->ra);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"one_es: %lf;", pj->one_es);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"rone_es: %lf;", pj->rone_es);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"lam0: %lf;", pj->lam0);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"phi0: %lf;", pj->phi0);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"x0: %lf;", pj->x0);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"y0: %lf;", pj->y0);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"k0: %lf;", pj->k0);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"to_meter: %lf;", pj->to_meter);
+ strcat(ellipseinfo,temp);
+ sprintf(temp,"fr_meter: %lf;", pj->fr_meter);
+ strcat(ellipseinfo,temp);
+
+ return (*env)->NewStringUTF(env,ellipseinfo);
+ }
+ */
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbt_fps.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbt_fps.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbt_fps.c	(revision 256)
@@ -0,0 +1,41 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_mbt_fps.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(mbt_fps, "McBryde-Thomas Flat-Pole Sine (No. 2)") "\n\tCyl., Sph.";
+#define MAX_ITER	10
+#define LOOP_TOL	1e-7
+#define C1 0.45503
+#define C2 1.36509
+#define C3 1.41546
+#define C_x 0.22248
+#define C_y 1.44492
+#define C1_2 0.33333333333333333333333333
+FORWARD(s_forward); /* spheroid */
+	double k, V, t;
+	int i;
+
+	k = C3 * sin(lp.phi);
+	for (i = MAX_ITER; i ; --i) {
+		t = lp.phi / C2;
+		lp.phi -= V = (C1 * sin(t) + sin(lp.phi) - k) /
+			(C1_2 * cos(t) + cos(lp.phi));
+		if (fabs(V) < LOOP_TOL)
+			break;
+	}
+	t = lp.phi / C2;
+	xy.x = C_x * lp.lam * (1. + 3. * cos(lp.phi)/cos(t) );
+	xy.y = C_y * sin(t);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t, s;
+
+	lp.phi = C2 * (t = aasin(xy.y / C_y));
+	lp.lam = xy.x / (C_x * (1. + 3. * cos(lp.phi)/cos(t)));
+	lp.phi = aasin((C1 * sin(t) + sin(lp.phi)) / C3);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(mbt_fps) P->es = 0; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nell.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nell.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_nell.c	(revision 256)
@@ -0,0 +1,34 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_nell.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(nell, "Nell") "\n\tPCyl., Sph.";
+#define MAX_ITER	10
+#define LOOP_TOL	1e-7
+FORWARD(s_forward); /* spheroid */
+	double k, V;
+	int i;
+
+	k = 2. * sin(lp.phi);
+	V = lp.phi * lp.phi;
+	lp.phi *= 1.00371 + V * (-0.0935382 + V * -0.011412);
+	for (i = MAX_ITER; i ; --i) {
+		lp.phi -= V = (lp.phi + sin(lp.phi) - k) /
+			(1. + cos(lp.phi));
+		if (fabs(V) < LOOP_TOL)
+			break;
+	}
+	xy.x = 0.5 * lp.lam * (1. + cos(lp.phi));
+	xy.y = lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double th, s;
+
+	lp.lam = 2. * xy.x / (1. + cos(xy.y));
+	lp.phi = aasin(0.5 * (xy.y + sin(xy.y)));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(nell) P->es = 0; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/vector1.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/vector1.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/vector1.c	(revision 256)
@@ -0,0 +1,32 @@
+/* make storage for one and two dimensional matricies */
+#ifndef lint
+static const char SCCSID[]="@(#)vector1.c	4.4	94/03/22	GIE	REL";
+#endif
+#include <stdlib.h>
+#include <projects.h>
+	void * /* one dimension array */
+vector1(int nvals, int size) { return((void *)pj_malloc(size * nvals)); }
+	void /* free 2D array */
+freev2(void **v, int nrows) {
+	if (v) {
+		for (v += nrows; nrows > 0; --nrows)
+			pj_dalloc(*--v);
+		pj_dalloc(v);
+	}
+}
+	void ** /* two dimension array */
+vector2(int nrows, int ncols, int size) {
+	void **s;
+
+	if (s = (void **)pj_malloc(sizeof(void *) * nrows)) {
+		int rsize, i;
+
+		rsize = size * ncols;
+		for (i = 0; i < nrows; ++i)
+			if (!(s[i] = pj_malloc(rsize))) {
+				freev2(s, i);
+				return (void **)0;
+			}
+	}
+	return s;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_datums.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_datums.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_datums.c	(revision 256)
@@ -0,0 +1,122 @@
+/******************************************************************************
+ * $Id: pj_datums.c,v 1.10 2004/10/28 16:07:55 fwarmerdam Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Built in datum list.
+ * Author:   Frank Warmerdam, warmerda@home.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_datums.c,v $
+ * Revision 1.10  2004/10/28 16:07:55  fwarmerdam
+ * added pj_get_*_ref() accessors
+ *
+ * Revision 1.9  2004/05/04 01:15:21  warmerda
+ * Added NZGD49 datum - see bug 339
+ *
+ * Revision 1.8  2003/03/28 14:29:28  warmerda
+ * Fixed ire65 definition ... use mod_airy, not modif_airy.
+ *
+ * Revision 1.7  2003/03/17 21:37:22  warmerda
+ * make NAD27 grids optional, added alaska and ntv2
+ *
+ * Revision 1.6  2003/02/06 03:37:52  warmerda
+ * Fixed typo in madrid prime meridian value.
+ *
+ * Revision 1.5  2003/01/15 14:34:55  warmerda
+ * Added some datums as suggested by GRASS team
+ *
+ * Revision 1.4  2002/12/09 16:01:02  warmerda
+ * added prime meridian support
+ *
+ * Revision 1.3  2002/07/08 02:32:05  warmerda
+ * ensure clean C++ builds
+ *
+ * Revision 1.2  2001/04/05 19:32:41  warmerda
+ * added ntv1_can.dat to NAD27 list
+ *
+ * Revision 1.1  2000/07/06 23:32:27  warmerda
+ * New
+ *
+ */
+
+#define PJ_DATUMS__
+
+#include <projects.h>
+
+/* 
+ * The ellipse code must match one from pj_ellps.c.  The datum id should
+ * be kept to 12 characters or less if possible.  Use the official OGC 
+ * datum name for the comments if available. 
+ */
+
+C_NAMESPACE struct PJ_DATUMS pj_datums[] = {
+/* id       definition                               ellipse  comments */
+/* --       ----------                               -------  -------- */
+"WGS84",    "towgs84=0,0,0", 		             "WGS84", "",
+"GGRS87",   "towgs84=-199.87,74.79,246.62",          "GRS80", 
+				"Greek_Geodetic_Reference_System_1987",
+"NAD83",    "towgs84=0,0,0",                         "GRS80", 
+				"North_American_Datum_1983",
+"NAD27",    "nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",           
+                                                     "clrk66", 
+				"North_American_Datum_1927",
+"potsdam",  "towgs84=606.0,23.0,413.0",  "bessel",  "Potsdam Rauenberg 1950 DHDN",
+"carthage",  "towgs84=-263.0,6.0,431.0",  "clark80",  "Carthage 1934 Tunisia",
+"hermannskogel", "towgs84=653.0,-212.0,449.0",  "bessel",  "Hermannskogel",
+"ire65",  "towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",  "mod_airy",  "Ireland 1965",
+"nzgd49",    "towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", "intl", "New Zealand Geodetic Datum 1949",
+NULL,       NULL,                                    NULL,    NULL 
+};
+
+struct PJ_DATUMS *pj_get_datums_ref()
+
+{
+    return pj_datums;
+}
+
+C_NAMESPACE struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = {
+    /* id        definition                         */
+    /* --        ----------                         */
+    "greenwich", "0dE",
+    "lisbon",    "9d07'54.862\"W",
+    "paris",     "2d20'14.025\"E",
+    "bogota",    "74d04'51.3\"E",
+    "madrid",    "3d41'16.58\"W",
+    "rome",      "12d27'8.4\"E",
+    "bern",      "7d26'22.5\"E",
+    "jakarta",   "106d48'27.79\"E",
+    "ferro",     "17d40'W",
+    "brussels",  "4d22'4.71\"E",
+    "stockholm", "18d3'29.8\"E",
+    "athens",    "23d42'58.815\"E",
+    "oslo",      "10d43'22.5\"E",
+    NULL,        NULL 
+};
+
+struct PJ_PRIME_MERIDIANS *pj_get_prime_meridians_ref()
+
+{
+    return pj_prime_meridians;
+}
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag2.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag2.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag2.c	(revision 256)
@@ -0,0 +1,24 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_wag2.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(wag2, "Wagner II") "\n\tPCyl., Sph.";
+#define C_x 0.92483
+#define C_y 1.38725
+#define C_p1 0.88022
+#define C_p2 0.88550
+FORWARD(s_forward); /* spheroid */
+	lp.phi = aasin(C_p1 * sin(C_p2 * lp.phi));
+	xy.x = C_x * lp.lam * cos(lp.phi);
+	xy.y = C_y * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / C_y;
+	lp.lam = xy.x / (C_x * cos(lp.phi));
+	lp.phi = aasin(sin(lp.phi) / C_p1) / C_p2;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(wag2) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_param.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_param.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_param.c	(revision 256)
@@ -0,0 +1,107 @@
+/* put parameters in linked list and retrieve */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_param.c	4.4	93/06/12	GIE	REL";
+#endif
+#include <projects.h>
+#include <stdio.h>
+#include <string.h>
+	paralist * /* create parameter list entry */
+pj_mkparam(char *str) {
+	paralist *newitem;
+
+	if (newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) {
+		newitem->used = 0;
+		newitem->next = 0;
+		if (*str == '+')
+			++str;
+		(void)strcpy(newitem->param, str);
+	}
+	return newitem;
+}
+
+/************************************************************************/
+/*                              pj_param()                              */
+/*                                                                      */
+/*      Test for presence or get parameter value.  The first            */
+/*      character in `opt' is a parameter type which can take the       */
+/*      values:                                                         */
+/*                                                                      */
+/*       `t' - test for presence, return TRUE/FALSE in PVALUE.i         */
+/*       `i' - integer value returned in PVALUE.i                       */
+/*       `d' - simple valued real input returned in PVALUE.f            */
+/*       `r' - degrees (DMS translation applied), returned as           */
+/*             radians in PVALUE.f                                      */
+/*       `s' - string returned in PVALUE.s                              */
+/*       `b' - test for t/T/f/F, return in PVALUE.i                     */
+/*                                                                      */
+/************************************************************************/
+
+	PVALUE /* test for presence or get parameter value */
+pj_param(paralist *pl, char *opt) {
+	int type;
+	unsigned l;
+	PVALUE value;
+
+	type = *opt++;
+	/* simple linear lookup */
+	l = strlen(opt);
+	while (pl && !(!strncmp(pl->param, opt, l) &&
+	  (!pl->param[l] || pl->param[l] == '=')))
+		pl = pl->next;
+	if (type == 't')
+		value.i = pl != 0;
+	else if (pl) {
+		pl->used |= 1;
+		opt = pl->param + l;
+		if (*opt == '=')
+			++opt;
+		switch (type) {
+		case 'i':	/* integer input */
+			value.i = atoi(opt);
+			break;
+		case 'd':	/* simple real input */
+			value.f = atof(opt);
+			break;
+		case 'r':	/* degrees input */
+			value.f = dmstor(opt, 0);
+			break;
+		case 's':	/* char string */
+			value.s = opt;
+			break;
+		case 'b':	/* boolean */
+			switch (*opt) {
+			case 'F': case 'f':
+				value.i = 0;
+				break;
+			case '\0': case 'T': case 't':
+				value.i = 1;
+				break;
+			default:
+				pj_errno = -8;
+				value.i = 0;
+				break;
+			}
+			break;
+		default:
+bum_type:	/* note: this is an error in parameter, not a user error */
+			fprintf(stderr, "invalid request to pj_param, fatal\n");
+			exit(1);
+		}
+	} else /* not given */
+		switch (type) {
+		case 'b':
+		case 'i':
+			value.i = 0;
+			break;
+		case 'd':
+		case 'r':
+			value.f = 0.;
+			break;
+		case 's':
+			value.s = 0;
+			break;
+		default:
+			goto bum_type;
+		}
+	return value;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gridinfo.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gridinfo.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gridinfo.c	(revision 256)
@@ -0,0 +1,698 @@
+/******************************************************************************
+ * $Id: pj_gridinfo.c,v 1.6 2004/10/30 04:03:03 fwarmerdam Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Functions for handling individual PJ_GRIDINFO's.  Includes
+ *           loaders for all formats but CTABLE (in nad_init.c).
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_gridinfo.c,v $
+ * Revision 1.6  2004/10/30 04:03:03  fwarmerdam
+ * fixed reported information in ctable debug message
+ *
+ * Revision 1.5  2003/08/20 13:23:58  warmerda
+ * Avoid unsigned char / char casting issues for VC++.
+ *
+ * Revision 1.4  2003/03/19 03:36:41  warmerda
+ * Fixed so swap_words() works when it should.
+ *
+ * Revision 1.3  2003/03/17 19:44:45  warmerda
+ * improved debugging, reduce header read size
+ *
+ * Revision 1.2  2003/03/17 18:56:34  warmerda
+ * implement heirarchical NTv2 gridinfos
+ *
+ * Revision 1.1  2003/03/15 06:01:18  warmerda
+ * New
+ *
+ */
+
+#define PJ_LIB__
+
+#include <projects.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+#include <assert.h>
+
+/************************************************************************/
+/*                             swap_words()                             */
+/*                                                                      */
+/*      Convert the byte order of the given word(s) in place.           */
+/************************************************************************/
+
+static int  byte_order_test = 1;
+#define IS_LSB	(((unsigned char *) (&byte_order_test))[0] == 1)
+
+static void swap_words( unsigned char *data, int word_size, int word_count )
+
+{
+    int	word;
+
+    for( word = 0; word < word_count; word++ )
+    {
+        int	i;
+        
+        for( i = 0; i < word_size/2; i++ )
+        {
+            int	t;
+            
+            t = data[i];
+            data[i] = data[word_size-i-1];
+            data[word_size-i-1] = t;
+        }
+        
+        data += word_size;
+    }
+}
+
+/************************************************************************/
+/*                          pj_gridinfo_free()                          */
+/************************************************************************/
+
+void pj_gridinfo_free( PJ_GRIDINFO *gi )
+
+{
+    if( gi == NULL )
+        return;
+
+    if( gi->child != NULL )
+    {
+        PJ_GRIDINFO *child, *next;
+
+        for( child = gi->child; child != NULL; child=next)
+        {
+            next=child->next;
+            pj_gridinfo_free( child );
+        }
+    }
+
+    if( gi->ct != NULL )
+        nad_free( gi->ct );
+    
+    free( gi->gridname );
+    if( gi->filename != NULL )
+        free( gi->filename );
+
+    pj_dalloc( gi );
+}
+
+/************************************************************************/
+/*                          pj_gridinfo_load()                          */
+/*                                                                      */
+/*      This function is intended to implement delayed loading of       */
+/*      the data contents of a grid file.  The header and related       */
+/*      stuff are loaded by pj_gridinfo_init().                         */
+/************************************************************************/
+
+int pj_gridinfo_load( PJ_GRIDINFO *gi )
+
+{
+    if( gi == NULL || gi->ct == NULL )
+        return 0;
+
+/* -------------------------------------------------------------------- */
+/*      ctable is currently loaded on initialization though there is    */
+/*      no real reason not to support delayed loading for it as well.   */
+/* -------------------------------------------------------------------- */
+    if( strcmp(gi->format,"ctable") == 0 )
+    {
+        FILE *fid;
+        int result;
+
+        fid = pj_open_lib( gi->filename, "rb" );
+        
+        if( fid == NULL )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+
+        result = nad_ctable_load( gi->ct, fid );
+
+        fclose( fid );
+
+        return result;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      NTv1 format.                                                    */
+/*      We process one line at a time.  Note that the array storage     */
+/*      direction (e-w) is different in the NTv1 file and what          */
+/*      the CTABLE is supposed to have.  The phi/lam are also           */
+/*      reversed, and we have to be aware of byte swapping.             */
+/* -------------------------------------------------------------------- */
+    else if( strcmp(gi->format,"ntv1") == 0 )
+    {
+        double	*row_buf;
+        int	row;
+        FILE *fid;
+
+        fid = pj_open_lib( gi->filename, "rb" );
+        
+        if( fid == NULL )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+
+        fseek( fid, gi->grid_offset, SEEK_SET );
+
+        row_buf = (double *) pj_malloc(gi->ct->lim.lam * sizeof(double) * 2);
+        gi->ct->cvs = (FLP *) pj_malloc(gi->ct->lim.lam*gi->ct->lim.phi*sizeof(FLP));
+        if( row_buf == NULL || gi->ct->cvs == NULL )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+        
+        for( row = 0; row < gi->ct->lim.phi; row++ )
+        {
+            int	    i;
+            FLP     *cvs;
+            double  *diff_seconds;
+
+            if( fread( row_buf, sizeof(double), gi->ct->lim.lam * 2, fid ) 
+                != 2 * gi->ct->lim.lam )
+            {
+                pj_dalloc( row_buf );
+                pj_dalloc( gi->ct->cvs );
+                pj_errno = -38;
+                return 0;
+            }
+
+            if( IS_LSB )
+                swap_words( (unsigned char *) row_buf, 8, gi->ct->lim.lam*2 );
+
+            /* convert seconds to radians */
+            diff_seconds = row_buf;
+
+            for( i = 0; i < gi->ct->lim.lam; i++ )
+            {
+                cvs = gi->ct->cvs + (row) * gi->ct->lim.lam
+                    + (gi->ct->lim.lam - i - 1);
+
+                cvs->phi = *(diff_seconds++) * ((PI/180.0) / 3600.0);
+                cvs->lam = *(diff_seconds++) * ((PI/180.0) / 3600.0);
+            }
+        }
+
+        pj_dalloc( row_buf );
+
+        fclose( fid );
+
+        return 1;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      NTv2 format.                                                    */
+/*      We process one line at a time.  Note that the array storage     */
+/*      direction (e-w) is different in the NTv2 file and what          */
+/*      the CTABLE is supposed to have.  The phi/lam are also           */
+/*      reversed, and we have to be aware of byte swapping.             */
+/* -------------------------------------------------------------------- */
+    else if( strcmp(gi->format,"ntv2") == 0 )
+    {
+        float	*row_buf;
+        int	row;
+        FILE *fid;
+
+        if( getenv("PROJ_DEBUG") != NULL )
+        {
+            fprintf( stderr, "NTv2 - loading grid %s\n", gi->ct->id );
+        }
+
+        fid = pj_open_lib( gi->filename, "rb" );
+        
+        if( fid == NULL )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+
+        fseek( fid, gi->grid_offset, SEEK_SET );
+
+        row_buf = (float *) pj_malloc(gi->ct->lim.lam * sizeof(float) * 4);
+        gi->ct->cvs = (FLP *) pj_malloc(gi->ct->lim.lam*gi->ct->lim.phi*sizeof(FLP));
+        if( row_buf == NULL || gi->ct->cvs == NULL )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+        
+        for( row = 0; row < gi->ct->lim.phi; row++ )
+        {
+            int	    i;
+            FLP     *cvs;
+            float   *diff_seconds;
+
+            if( fread( row_buf, sizeof(float), gi->ct->lim.lam*4, fid ) 
+                != 4 * gi->ct->lim.lam )
+            {
+                pj_dalloc( row_buf );
+                pj_dalloc( gi->ct->cvs );
+                gi->ct->cvs = NULL;
+                pj_errno = -38;
+                return 0;
+            }
+
+            if( !IS_LSB )
+                swap_words( (unsigned char *) row_buf, 4, 
+                            gi->ct->lim.lam*4 );
+
+            /* convert seconds to radians */
+            diff_seconds = row_buf;
+
+            for( i = 0; i < gi->ct->lim.lam; i++ )
+            {
+                cvs = gi->ct->cvs + (row) * gi->ct->lim.lam
+                    + (gi->ct->lim.lam - i - 1);
+
+                cvs->phi = *(diff_seconds++) * ((PI/180.0) / 3600.0);
+                cvs->lam = *(diff_seconds++) * ((PI/180.0) / 3600.0);
+                diff_seconds += 2; /* skip accuracy values */
+            }
+        }
+
+        pj_dalloc( row_buf );
+
+        fclose( fid );
+
+        return 1;
+    }
+
+    else
+    {
+        return 0;
+    }
+}
+
+/************************************************************************/
+/*                       pj_gridinfo_init_ntv2()                        */
+/*                                                                      */
+/*      Load a ntv2 (.gsb) file.                                        */
+/************************************************************************/
+
+static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
+
+{
+    unsigned char header[11*16];
+    int num_subfiles, subfile;
+
+    assert( sizeof(int) == 4 );
+    assert( sizeof(double) == 8 );
+    if( sizeof(int) != 4 || sizeof(double) != 8 )
+    {
+        fprintf( stderr, 
+                 "basic types of inappropraiate size in pj_gridinfo_init_ntv2()\n" );
+        pj_errno = -38;
+        return 0;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Read the overview header.                                       */
+/* -------------------------------------------------------------------- */
+    if( fread( header, sizeof(header), 1, fid ) != 1 )
+    {
+        pj_errno = -38;
+        return 0;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Byte swap interesting fields if needed.                         */
+/* -------------------------------------------------------------------- */
+    if( !IS_LSB )
+    {
+        swap_words( header+8, 4, 1 );
+        swap_words( header+8+16, 4, 1 );
+        swap_words( header+8+32, 4, 1 );
+        swap_words( header+8+7*16, 8, 1 );
+        swap_words( header+8+8*16, 8, 1 );
+        swap_words( header+8+9*16, 8, 1 );
+        swap_words( header+8+10*16, 8, 1 );
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Get the subfile count out ... all we really use for now.        */
+/* -------------------------------------------------------------------- */
+    memcpy( &num_subfiles, header+8+32, 4 );
+
+/* ==================================================================== */
+/*      Step through the subfiles, creating a PJ_GRIDINFO for each.     */
+/* ==================================================================== */
+    for( subfile = 0; subfile < num_subfiles; subfile++ )
+    {
+        struct CTABLE *ct;
+        LP ur;
+        int gs_count;
+        PJ_GRIDINFO *gi;
+
+/* -------------------------------------------------------------------- */
+/*      Read header.                                                    */
+/* -------------------------------------------------------------------- */
+        if( fread( header, sizeof(header), 1, fid ) != 1 )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+
+        if( strncmp((const char *) header,"SUB_NAME",8) != 0 )
+        {
+            pj_errno = -38;
+            return 0;
+        }
+        
+/* -------------------------------------------------------------------- */
+/*      Byte swap interesting fields if needed.                         */
+/* -------------------------------------------------------------------- */
+        if( !IS_LSB )
+        {
+            swap_words( header+8+16*4, 8, 1 );
+            swap_words( header+8+16*5, 8, 1 );
+            swap_words( header+8+16*6, 8, 1 );
+            swap_words( header+8+16*7, 8, 1 );
+            swap_words( header+8+16*8, 8, 1 );
+            swap_words( header+8+16*9, 8, 1 );
+            swap_words( header+8+16*10, 4, 1 );
+        }
+        
+/* -------------------------------------------------------------------- */
+/*      Initialize a corresponding "ct" structure.                      */
+/* -------------------------------------------------------------------- */
+        ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
+        strncpy( ct->id, (const char *) header + 8, 8 );
+        ct->id[8] = '\0';
+
+        ct->ll.lam = - *((double *) (header+7*16+8)); /* W_LONG */
+        ct->ll.phi = *((double *) (header+4*16+8));   /* S_LAT */
+
+        ur.lam = - *((double *) (header+6*16+8));     /* E_LONG */
+        ur.phi = *((double *) (header+5*16+8));       /* N_LAT */
+
+        ct->del.lam = *((double *) (header+9*16+8));
+        ct->del.phi = *((double *) (header+8*16+8));
+
+        ct->lim.lam = (int) (fabs(ur.lam-ct->ll.lam)/ct->del.lam + 0.5) + 1;
+        ct->lim.phi = (int) (fabs(ur.phi-ct->ll.phi)/ct->del.phi + 0.5) + 1;
+
+        if( getenv("PROJ_DEBUG") != NULL )
+            fprintf( stderr, 
+                     "NTv2 %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
+                     ct->id, 
+                     ct->lim.lam, ct->lim.phi,
+                     ct->ll.lam/3600.0, ct->ll.phi/3600.0,
+                     ur.lam/3600.0, ur.phi/3600.0 );
+
+        ct->ll.lam *= DEG_TO_RAD/3600.0;
+        ct->ll.phi *= DEG_TO_RAD/3600.0;
+        ct->del.lam *= DEG_TO_RAD/3600.0;
+        ct->del.phi *= DEG_TO_RAD/3600.0;
+
+        memcpy( &gs_count, header + 8 + 16*10, 4 );
+        if( gs_count != ct->lim.lam * ct->lim.phi )
+        {
+            fprintf( stderr, 
+                     "GS_COUNT(%d) does not match expected cells (%dx%d=%d)\n",
+                     gs_count, ct->lim.lam, ct->lim.phi, 
+                     ct->lim.lam * ct->lim.phi );
+            pj_errno = -38;
+            return 0;
+        }
+
+        ct->cvs = NULL;
+
+/* -------------------------------------------------------------------- */
+/*      Create a new gridinfo for this if we aren't processing the      */
+/*      1st subfile, and initialize our grid info.                      */
+/* -------------------------------------------------------------------- */
+        if( subfile == 0 )
+            gi = gilist;
+        else
+        {
+            gi = (PJ_GRIDINFO *) pj_malloc(sizeof(PJ_GRIDINFO));
+            memset( gi, 0, sizeof(PJ_GRIDINFO) );
+    
+            gi->gridname = strdup( gilist->gridname );
+            gi->filename = strdup( gilist->filename );
+            gi->next = NULL;
+        }
+
+        gi->ct = ct;
+        gi->format = "ntv2";
+        gi->grid_offset = ftell( fid );
+
+/* -------------------------------------------------------------------- */
+/*      Attach to the correct list or sublist.                          */
+/* -------------------------------------------------------------------- */
+        if( strncmp((const char *)header+24,"NONE",4) == 0 )
+        {
+            if( gi != gilist )
+            {
+                PJ_GRIDINFO *lnk;
+
+                for( lnk = gilist; lnk->next != NULL; lnk = lnk->next ) {}
+                lnk->next = gi;
+            }
+        }
+
+        else
+        {
+            PJ_GRIDINFO *lnk;
+            PJ_GRIDINFO *gp = gilist;
+            
+            while( gp != NULL 
+                   && strncmp(gp->ct->id,(const char*)header+24,8) != 0 )
+                gp = gp->next;
+
+            if( gp == NULL )
+            {
+                if( getenv("PROJ_DEBUG") != NULL )
+                    fprintf( stderr, "pj_gridinfo_init_ntv2(): "
+                             "failed to find parent %8.8s for %.\n", 
+                             (const char *) header+24, gi->ct->id );
+
+                for( lnk = gp; lnk->next != NULL; lnk = lnk->next ) {}
+                lnk->next = gi;
+            }
+            else if( gp->child == NULL )
+            {
+                gp->child = gi;
+            }
+            else
+            {
+                for( lnk = gp->child; lnk->next != NULL; lnk = lnk->next ) {}
+                lnk->next = gi;
+            }
+        }
+
+/* -------------------------------------------------------------------- */
+/*      Seek past the data.                                             */
+/* -------------------------------------------------------------------- */
+        fseek( fid, gs_count * 16, SEEK_CUR );
+    }
+
+    return 1;
+}
+
+/************************************************************************/
+/*                       pj_gridinfo_init_ntv1()                        */
+/*                                                                      */
+/*      Load an NTv1 style Canadian grid shift file.                    */
+/************************************************************************/
+
+static int pj_gridinfo_init_ntv1( FILE * fid, PJ_GRIDINFO *gi )
+
+{
+    unsigned char header[176];
+    struct CTABLE *ct;
+    LP		ur;
+    
+    assert( sizeof(int) == 4 );
+    assert( sizeof(double) == 8 );
+    if( sizeof(int) != 4 || sizeof(double) != 8 )
+    {
+        fprintf( stderr, 
+                 "basic types of inappropraiate size in nad_load_ntv1()\n" );
+        pj_errno = -38;
+        return 0;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Read the header.                                                */
+/* -------------------------------------------------------------------- */
+    if( fread( header, sizeof(header), 1, fid ) != 1 )
+    {
+        pj_errno = -38;
+        return 0;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Regularize fields of interest.                                  */
+/* -------------------------------------------------------------------- */
+    if( IS_LSB )
+    {
+        swap_words( header+8, 4, 1 );
+        swap_words( header+24, 8, 1 );
+        swap_words( header+40, 8, 1 );
+        swap_words( header+56, 8, 1 );
+        swap_words( header+72, 8, 1 );
+        swap_words( header+88, 8, 1 );
+        swap_words( header+104, 8, 1 );
+    }
+
+    if( *((int *) (header+8)) != 12 )
+    {
+        pj_errno = -38;
+        printf("NTv1 grid shift file has wrong record count, corrupt?\n");
+        return 0;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Fill in CTABLE structure.                                       */
+/* -------------------------------------------------------------------- */
+    ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
+    strcpy( ct->id, "NTv1 Grid Shift File" );
+
+    ct->ll.lam = - *((double *) (header+72));
+    ct->ll.phi = *((double *) (header+24));
+    ur.lam = - *((double *) (header+56));
+    ur.phi = *((double *) (header+40));
+    ct->del.lam = *((double *) (header+104));
+    ct->del.phi = *((double *) (header+88));
+    ct->lim.lam = (int) (fabs(ur.lam-ct->ll.lam)/ct->del.lam + 0.5) + 1;
+    ct->lim.phi = (int) (fabs(ur.phi-ct->ll.phi)/ct->del.phi + 0.5) + 1;
+
+    if( getenv("PROJ_DEBUG") != NULL )
+        fprintf( stderr, 
+                 "NTv1 %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
+                 ct->lim.lam, ct->lim.phi,
+                 ct->ll.lam, ct->ll.phi, ur.lam, ur.phi );
+
+    ct->ll.lam *= DEG_TO_RAD;
+    ct->ll.phi *= DEG_TO_RAD;
+    ct->del.lam *= DEG_TO_RAD;
+    ct->del.phi *= DEG_TO_RAD;
+    ct->cvs = NULL;
+
+    gi->ct = ct;
+    gi->grid_offset = ftell( fid );
+    gi->format = "ntv1";
+
+    return 1;
+}
+
+/************************************************************************/
+/*                          pj_gridinfo_init()                          */
+/*                                                                      */
+/*      Open and parse header details from a datum gridshift file       */
+/*      returning a list of PJ_GRIDINFOs for the grids in that          */
+/*      file.  This superceeds use of nad_init() for modern             */
+/*      applications.                                                   */
+/************************************************************************/
+
+PJ_GRIDINFO *pj_gridinfo_init( const char *gridname )
+
+{
+    char 	fname[MAX_PATH_FILENAME+1];
+    PJ_GRIDINFO *gilist;
+    FILE 	*fp;
+    char	header[160];
+
+    errno = pj_errno = 0;
+
+/* -------------------------------------------------------------------- */
+/*      Initialize a GRIDINFO with stub info we would use if it         */
+/*      cannot be loaded.                                               */
+/* -------------------------------------------------------------------- */
+    gilist = (PJ_GRIDINFO *) pj_malloc(sizeof(PJ_GRIDINFO));
+    memset( gilist, 0, sizeof(PJ_GRIDINFO) );
+    
+    gilist->gridname = strdup( gridname );
+    gilist->filename = NULL;
+    gilist->format = "missing";
+    gilist->grid_offset = 0;
+    gilist->ct = NULL;
+    gilist->next = NULL;
+
+/* -------------------------------------------------------------------- */
+/*      Open the file using the usual search rules.                     */
+/* -------------------------------------------------------------------- */
+    strcpy(fname, gridname);
+    if (!(fp = pj_open_lib(fname, "rb"))) {
+        pj_errno = errno;
+        return gilist;
+    }
+
+    gilist->filename = strdup(fname);
+    
+/* -------------------------------------------------------------------- */
+/*      Load a header, to determine the file type.                      */
+/* -------------------------------------------------------------------- */
+    if( fread( header, sizeof(header), 1, fp ) != 1 )
+    {
+        fclose( fp );
+        pj_errno = -38;
+        return gilist;
+    }
+
+    fseek( fp, SEEK_SET, 0 );
+
+/* -------------------------------------------------------------------- */
+/*      Determine file type.                                            */
+/* -------------------------------------------------------------------- */
+    if( strncmp(header + 0, "HEADER", 6) == 0 
+        && strncmp(header + 96, "W GRID", 6) == 0 
+        && strncmp(header + 144, "TO      NAD83   ", 16) == 0 )
+    {
+        pj_gridinfo_init_ntv1( fp, gilist );
+    }
+    
+    else if( strncmp(header + 0, "NUM_OREC", 8) == 0 
+             && strncmp(header + 48, "GS_TYPE", 7) == 0 )
+    {
+        pj_gridinfo_init_ntv2( fp, gilist );
+    }
+    
+    else
+    {
+        struct CTABLE *ct = nad_ctable_init( fp );
+
+        gilist->format = "ctable";
+        gilist->ct = ct;
+
+        if( getenv("PROJ_DEBUG") != NULL )
+            fprintf( stderr, 
+                     "Ctable %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
+                     ct->id, 
+                     ct->lim.lam, ct->lim.phi,
+                     ct->ll.lam * RAD_TO_DEG, ct->ll.phi * RAD_TO_DEG,
+                     (ct->ll.lam + (ct->lim.lam-1)*ct->del.lam) * RAD_TO_DEG, 
+                     (ct->ll.phi + (ct->lim.phi-1)*ct->del.phi) * RAD_TO_DEG );
+    }
+
+    fclose(fp);
+
+    return gilist;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_factors.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_factors.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_factors.c	(revision 256)
@@ -0,0 +1,86 @@
+/* projection scale factors */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_factors.c	4.9	94/03/17	GIE	REL";
+#endif
+#define PJ_LIB__
+#include <projects.h>
+#include <errno.h>
+#ifndef DEFAULT_H
+#define DEFAULT_H   1e-5    /* radian default for numeric h */
+#endif
+#define EPS 1.0e-12
+	int
+pj_factors(LP lp, PJ *P, double h, struct FACTORS *fac) {
+	struct DERIVS der;
+	double cosphi, t, n, r;
+
+	/* check for forward and latitude or longitude overange */
+	if ((t = fabs(lp.phi)-HALFPI) > EPS || fabs(lp.lam) > 10.) {
+		pj_errno = -14;
+		return 1;
+	} else { /* proceed */
+		errno = pj_errno = 0;
+		if (fabs(t) <= EPS) /* adjust to pi/2 */
+			lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+		else if (P->geoc)
+			lp.phi = atan(P->rone_es * tan(lp.phi));
+		lp.lam -= P->lam0;	/* compute del lp.lam */
+		if (!P->over)
+			lp.lam = adjlon(lp.lam); /* adjust del longitude */
+		if (h <= 0.)
+			h = DEFAULT_H;
+		if (P->spc)	/* get what projection analytic values */
+			P->spc(lp, P, fac);
+		if (((fac->code & (IS_ANAL_XL_YL+IS_ANAL_XP_YP)) !=
+			  (IS_ANAL_XL_YL+IS_ANAL_XP_YP)) &&
+			  pj_deriv(lp, h, P, &der))
+			return 1;
+		if (!(fac->code & IS_ANAL_XL_YL)) {
+			fac->der.x_l = der.x_l;
+			fac->der.y_l = der.y_l;
+		}
+		if (!(fac->code & IS_ANAL_XP_YP)) {
+			fac->der.x_p = der.x_p;
+			fac->der.y_p = der.y_p;
+		}
+		cosphi = cos(lp.phi);
+		if (!(fac->code & IS_ANAL_HK)) {
+			fac->h = hypot(fac->der.x_p, fac->der.y_p);
+			fac->k = hypot(fac->der.x_l, fac->der.y_l) / cosphi;
+			if (P->es) {
+				t = sin(lp.phi);
+				t = 1. - P->es * t * t;
+				n = sqrt(t);
+				fac->h *= t * n / P->one_es;
+				fac->k *= n;
+				r = t * t / P->one_es;
+			} else
+				r = 1.;
+		} else if (P->es) {
+			r = sin(lp.phi);
+			r = 1. - P->es * r * r;
+			r = r * r / P->one_es;
+		} else
+			r = 1.;
+		/* convergence */
+		if (!(fac->code & IS_ANAL_CONV)) {
+			fac->conv = - atan2(fac->der.y_l, fac->der.x_l);
+			if (fac->code & IS_ANAL_XL_YL)
+				fac->code |= IS_ANAL_CONV;
+		}
+		/* areal scale factor */
+		fac->s = (fac->der.y_p * fac->der.x_l - fac->der.x_p * fac->der.y_l) *
+			r / cosphi;
+		/* meridian-parallel angle theta prime */
+		fac->thetap = aasin(fac->s / (fac->h * fac->k));
+		/* Tissot ellips axis */
+		t = fac->k * fac->k + fac->h * fac->h;
+		fac->a = sqrt(t + 2. * fac->s);
+		t = (t = t - 2. * fac->s) <= 0. ? 0. : sqrt(t);
+		fac->b = 0.5 * (fac->a - t);
+		fac->a = 0.5 * (fac->a + t);
+		/* omega */
+		fac->omega = 2. * aasin((fac->a - fac->b)/(fac->a + fac->b));
+	}
+	return 0;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_malloc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_malloc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_malloc.c	(revision 256)
@@ -0,0 +1,16 @@
+/* allocate and deallocate memory */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_malloc.c	4.3   93/06/12 GIE REL";
+#endif
+/* These routines are used so that applications can readily replace
+** projection system memory allocation/deallocation call with custom
+** application procedures.  */
+#include <projects.h>
+	void *
+pj_malloc(size_t size) {
+	return(malloc(size));
+}
+	void
+pj_dalloc(void *ptr) {
+	free(ptr);
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp2.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp2.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp2.c	(revision 256)
@@ -0,0 +1,43 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_putp2.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(putp2, "Putnins P2") "\n\tPCyl., Sph.";
+#define C_x	1.89490
+#define C_y	1.71848
+#define C_p 0.6141848493043784
+#define EPS	1e-10
+#define NITER	10
+#define PI_DIV_3	1.0471975511965977
+FORWARD(s_forward); /* spheroid */
+	double p, c, s, V;
+	int i;
+
+	p = C_p * sin(lp.phi);
+	s = lp.phi * lp.phi;
+	lp.phi *= 0.615709 + s * ( 0.00909953 + s * 0.0046292 );
+	for (i = NITER; i ; --i) {
+		c = cos(lp.phi);
+		s = sin(lp.phi);
+		lp.phi -= V = (lp.phi + s * (c - 1.) - p) /
+			(1. + c * (c - 1.) - s * s);
+		if (fabs(V) < EPS)
+			break;
+	}
+	if (!i)
+		lp.phi = lp.phi < 0 ? - PI_DIV_3 : PI_DIV_3;
+	xy.x = C_x * lp.lam * (cos(lp.phi) - 0.5);
+	xy.y = C_y * sin(lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double c;
+
+	lp.phi = aasin(xy.y / C_y);
+	lp.lam = xy.x / (C_x * ((c = cos(lp.phi)) - 0.5));
+	lp.phi = aasin((lp.phi + sin(lp.phi) * (c - 1.)) / C_p);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(putp2) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_transform.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_transform.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_transform.c	(revision 256)
@@ -0,0 +1,653 @@
+/******************************************************************************
+ * $Id: pj_transform.c,v 1.13 2004/10/25 15:34:36 fwarmerdam Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Perform overall coordinate system to coordinate system 
+ *           transformations (pj_transform() function) including reprojection
+ *           and datum shifting.
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_transform.c,v $
+ * Revision 1.13  2004/10/25 15:34:36  fwarmerdam
+ * make names of geodetic funcs from geotrans unique
+ *
+ * Revision 1.12  2004/05/03 19:45:23  warmerda
+ * Altered so that raw ellpses are treated as a essentially having a
+ * +towgs84=0,0,0 specification so ellpisoid shifts are applied.
+ * Fixed so that prime meridian shifts are applied if the coordinate system is
+ * not lat/long (ie. if it is projected).  This fixes:
+ * http://bugzilla.remotesensing.org/show_bug.cgi?id=510
+ *
+ * Revision 1.11  2004/01/24 09:37:19  warmerda
+ * pj_transform() will no longer return an error code if any of the points are
+ * transformable.  In this case the application is expected to check for
+ * HUGE_VAL to identify failed points.
+ * As part of the implementation, I added a list of pj_errno values that
+ * are transient (ie per-point) rather than indicating global failure for the
+ * coordinate system definition.  We use this in deciding which pj_fwd and
+ * pj_inv error codes are really fatal and should be reported.
+ *
+ * Revision 1.10  2003/08/21 02:09:06  warmerda
+ * added a bunch of HUGE_VAL checking
+ *
+ * Revision 1.9  2003/03/26 16:52:30  warmerda
+ * added check that an inverse transformation func exists
+ *
+ * Revision 1.8  2002/12/14 20:35:43  warmerda
+ * implement units support for geocentric coordinates
+ *
+ * Revision 1.7  2002/12/14 20:14:35  warmerda
+ * added geocentric support
+ *
+ * Revision 1.6  2002/12/09 16:01:02  warmerda
+ * added prime meridian support
+ *
+ * Revision 1.5  2002/12/01 19:25:26  warmerda
+ * applied fix for 7 param shift in pj_geocentric_from_wgs84, see bug 194
+ *
+ * Revision 1.4  2002/02/15 14:30:36  warmerda
+ * provide default Z array if none passed in in pj_datum_transform()
+ *
+ * Revision 1.3  2001/04/04 21:13:21  warmerda
+ * do arcsecond/radian and ppm datum parm transformation in pj_set_datum()
+ *
+ * Revision 1.2  2001/04/04 16:08:08  warmerda
+ * rewrote 7 param datum shift to match EPSG:9606, now works with example
+ *
+ * Revision 1.1  2000/07/06 23:32:27  warmerda
+ * New
+ *
+ */
+
+#include <projects.h>
+#include <string.h>
+#include <math.h>
+#include "geocent.h"
+
+PJ_CVSID("$Id: pj_transform.c,v 1.13 2004/10/25 15:34:36 fwarmerdam Exp $");
+
+#ifndef SRS_WGS84_SEMIMAJOR
+#define SRS_WGS84_SEMIMAJOR 6378137.0
+#endif
+
+#ifndef SRS_WGS84_ESQUARED
+#define SRS_WGS84_ESQUARED 0.006694379990
+#endif
+
+#define Dx_BF (defn->datum_params[0])
+#define Dy_BF (defn->datum_params[1])
+#define Dz_BF (defn->datum_params[2])
+#define Rx_BF (defn->datum_params[3])
+#define Ry_BF (defn->datum_params[4])
+#define Rz_BF (defn->datum_params[5])
+#define M_BF  (defn->datum_params[6])
+
+/* 
+** This table is intended to indicate for any given error code in 
+** the range 0 to -44, whether that error will occur for all locations (ie.
+** it is a problem with the coordinate system as a whole) in which case the
+** value would be 0, or if the problem is with the point being transformed
+** in which case the value is 1. 
+**
+** At some point we might want to move this array in with the error message
+** list or something, but while experimenting with it this should be fine. 
+*/
+
+static int transient_error[45] = {
+    /*             0  1  2  3  4  5  6  7  8  9   */
+    /* 0 to 9 */   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    /* 10 to 19 */ 0, 0, 0, 0, 1, 1, 0, 1, 1, 1,  
+    /* 20 to 29 */ 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
+    /* 30 to 39 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 
+    /* 40 to 44 */ 0, 0, 0, 0, 0 };
+
+/************************************************************************/
+/*                            pj_transform()                            */
+/*                                                                      */
+/*      Currently this function doesn't recognise if two projections    */
+/*      are identical (to short circuit reprojection) because it is     */
+/*      difficult to compare PJ structures (since there are some        */
+/*      projection specific components).                                */
+/************************************************************************/
+
+int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
+                  double *x, double *y, double *z )
+
+{
+    long      i;
+    int       need_datum_shift;
+
+    pj_errno = 0;
+
+    if( point_offset == 0 )
+        point_offset = 1;
+
+/* -------------------------------------------------------------------- */
+/*      Transform geocentric source coordinates to lat/long.            */
+/* -------------------------------------------------------------------- */
+    if( srcdefn->is_geocent )
+    {
+        if( z == NULL )
+        {
+            pj_errno = PJD_ERR_GEOCENTRIC;
+            return PJD_ERR_GEOCENTRIC;
+        }
+
+        if( srcdefn->to_meter != 1.0 )
+        {
+            for( i = 0; i < point_count; i++ )
+            {
+                x[point_offset*i] *= srcdefn->to_meter;
+                y[point_offset*i] *= srcdefn->to_meter;
+            }
+        }
+
+        if( pj_geocentric_to_geodetic( srcdefn->a, srcdefn->es,
+                                       point_count, point_offset, 
+                                       x, y, z ) != 0) 
+            return pj_errno;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Transform source points to lat/long, if they aren't             */
+/*      already.                                                        */
+/* -------------------------------------------------------------------- */
+    else if( !srcdefn->is_latlong )
+    {
+        if( srcdefn->inv == NULL )
+        {
+            pj_errno = -17; /* this isn't correct, we need a no inverse err */
+            if( getenv( "PROJ_DEBUG" ) != NULL )
+            {
+                fprintf( stderr, 
+                       "pj_transform(): source projection not invertable\n" );
+            }
+            return pj_errno;
+        }
+
+        for( i = 0; i < point_count; i++ )
+        {
+            XY         projected_loc;
+            LP	       geodetic_loc;
+
+            projected_loc.u = x[point_offset*i];
+            projected_loc.v = y[point_offset*i];
+
+            if( projected_loc.u == HUGE_VAL )
+                continue;
+
+            geodetic_loc = pj_inv( projected_loc, srcdefn );
+            if( pj_errno != 0 )
+            {
+                if( pj_errno > 0 || pj_errno < -44 || point_count == 1
+                    || transient_error[-pj_errno] == 0 )
+                    return pj_errno;
+                else
+                {
+                    geodetic_loc.u = HUGE_VAL;
+                    geodetic_loc.v = HUGE_VAL;
+                }
+            }
+
+            x[point_offset*i] = geodetic_loc.u;
+            y[point_offset*i] = geodetic_loc.v;
+        }
+    }
+/* -------------------------------------------------------------------- */
+/*      But if they are already lat long, adjust for the prime          */
+/*      meridian if there is one in effect.                             */
+/* -------------------------------------------------------------------- */
+    if( srcdefn->from_greenwich != 0.0 )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            if( x[point_offset*i] != HUGE_VAL )
+                x[point_offset*i] += srcdefn->from_greenwich;
+        }
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Convert datums if needed, and possible.                         */
+/* -------------------------------------------------------------------- */
+    if( pj_datum_transform( srcdefn, dstdefn, point_count, point_offset, 
+                            x, y, z ) != 0 )
+        return pj_errno;
+
+/* -------------------------------------------------------------------- */
+/*      But if they are staying lat long, adjust for the prime          */
+/*      meridian if there is one in effect.                             */
+/* -------------------------------------------------------------------- */
+    if( dstdefn->from_greenwich != 0.0 )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            if( x[point_offset*i] != HUGE_VAL )
+                x[point_offset*i] -= dstdefn->from_greenwich;
+        }
+    }
+
+
+/* -------------------------------------------------------------------- */
+/*      Transform destination latlong to geocentric if required.        */
+/* -------------------------------------------------------------------- */
+    if( dstdefn->is_geocent )
+    {
+        if( z == NULL )
+        {
+            pj_errno = PJD_ERR_GEOCENTRIC;
+            return PJD_ERR_GEOCENTRIC;
+        }
+
+        pj_geodetic_to_geocentric( dstdefn->a, dstdefn->es,
+                                   point_count, point_offset, x, y, z );
+
+        if( dstdefn->fr_meter != 1.0 )
+        {
+            for( i = 0; i < point_count; i++ )
+            {
+                if( x[point_offset*i] != HUGE_VAL )
+                {
+                    x[point_offset*i] *= dstdefn->fr_meter;
+                    y[point_offset*i] *= dstdefn->fr_meter;
+                }
+            }
+        }
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Transform destination points to projection coordinates, if      */
+/*      desired.                                                        */
+/* -------------------------------------------------------------------- */
+    else if( !dstdefn->is_latlong )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            XY         projected_loc;
+            LP	       geodetic_loc;
+
+            geodetic_loc.u = x[point_offset*i];
+            geodetic_loc.v = y[point_offset*i];
+
+            if( geodetic_loc.u == HUGE_VAL )
+                continue;
+
+            projected_loc = pj_fwd( geodetic_loc, dstdefn );
+            if( pj_errno != 0 )
+            {
+                if( pj_errno > 0 || pj_errno < -44 || point_count == 1
+                    || transient_error[-pj_errno] == 0 )
+                    return pj_errno;
+                else
+                {
+                    projected_loc.u = HUGE_VAL;
+                    projected_loc.v = HUGE_VAL;
+                }
+            }
+
+            x[point_offset*i] = projected_loc.u;
+            y[point_offset*i] = projected_loc.v;
+        }
+    }
+
+    return 0;
+}
+
+/************************************************************************/
+/*                     pj_geodetic_to_geocentric()                      */
+/************************************************************************/
+
+int pj_geodetic_to_geocentric( double a, double es, 
+                               long point_count, int point_offset,
+                               double *x, double *y, double *z )
+
+{
+    double b;
+    int    i;
+
+    if( es == 0.0 )
+        b = a;
+    else
+        b = a * sqrt(1-es);
+
+    if( pj_Set_Geocentric_Parameters( a, b ) != 0 )
+    {
+        pj_errno = PJD_ERR_GEOCENTRIC;
+        return pj_errno;
+    }
+
+    for( i = 0; i < point_count; i++ )
+    {
+        long io = i * point_offset;
+
+        if( pj_Convert_Geodetic_To_Geocentric( y[io], x[io], z[io], 
+                                            x+io, y+io, z+io ) != 0 )
+        {
+            pj_errno = PJD_ERR_GEOCENTRIC;
+            return PJD_ERR_GEOCENTRIC;
+        }
+    }
+
+    return 0;
+}
+
+/************************************************************************/
+/*                     pj_geodetic_to_geocentric()                      */
+/************************************************************************/
+
+int pj_geocentric_to_geodetic( double a, double es, 
+                               long point_count, int point_offset,
+                               double *x, double *y, double *z )
+
+{
+    double b;
+    int    i;
+
+    if( es == 0.0 )
+        b = a;
+    else
+        b = a * sqrt(1-es);
+
+    if( pj_Set_Geocentric_Parameters( a, b ) != 0 )
+    {
+        pj_errno = PJD_ERR_GEOCENTRIC;
+        return pj_errno;
+    }
+
+    for( i = 0; i < point_count; i++ )
+    {
+        long io = i * point_offset;
+
+        if( x[io] == HUGE_VAL )
+            continue;
+
+        pj_Convert_Geocentric_To_Geodetic( x[io], y[io], z[io], 
+                                        y+io, x+io, z+io );
+    }
+
+    return 0;
+}
+
+/************************************************************************/
+/*                         pj_compare_datums()                          */
+/*                                                                      */
+/*      Returns TRUE if the two datums are identical, otherwise         */
+/*      FALSE.                                                          */
+/************************************************************************/
+
+int pj_compare_datums( PJ *srcdefn, PJ *dstdefn )
+
+{
+    if( srcdefn->datum_type != dstdefn->datum_type )
+    {
+        return 0;
+    }
+    else if( srcdefn->a != dstdefn->a 
+             || ABS(srcdefn->es - dstdefn->es) > 0.000000000050 )
+    {
+        /* the tolerence for es is to ensure that GRS80 and WGS84 are
+           considered identical */
+        return 0;
+    }
+    else if( srcdefn->datum_type == PJD_3PARAM )
+    {
+        return (srcdefn->datum_params[0] == dstdefn->datum_params[0]
+                && srcdefn->datum_params[1] == dstdefn->datum_params[1]
+                && srcdefn->datum_params[2] == dstdefn->datum_params[2]);
+    }
+    else if( srcdefn->datum_type == PJD_7PARAM )
+    {
+        return (srcdefn->datum_params[0] == dstdefn->datum_params[0]
+                && srcdefn->datum_params[1] == dstdefn->datum_params[1]
+                && srcdefn->datum_params[2] == dstdefn->datum_params[2]
+                && srcdefn->datum_params[3] == dstdefn->datum_params[3]
+                && srcdefn->datum_params[4] == dstdefn->datum_params[4]
+                && srcdefn->datum_params[5] == dstdefn->datum_params[5]
+                && srcdefn->datum_params[6] == dstdefn->datum_params[6]);
+    }
+    else if( srcdefn->datum_type == PJD_GRIDSHIFT )
+    {
+        return strcmp( pj_param(srcdefn->params,"snadgrids").s,
+                       pj_param(dstdefn->params,"snadgrids").s ) == 0;
+    }
+    else
+        return 1;
+}
+
+/************************************************************************/
+/*                       pj_geocentic_to_wgs84()                        */
+/************************************************************************/
+
+int pj_geocentric_to_wgs84( PJ *defn, 
+                            long point_count, int point_offset,
+                            double *x, double *y, double *z )
+
+{
+    int       i;
+
+    pj_errno = 0;
+
+    if( defn->datum_type == PJD_3PARAM )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            long io = i * point_offset;
+            
+            if( x[io] == HUGE_VAL )
+                continue;
+
+            x[io] = x[io] + defn->datum_params[0];
+            y[io] = y[io] + defn->datum_params[1];
+            z[io] = z[io] + defn->datum_params[2];
+        }
+    }
+    else if( defn->datum_type == PJD_7PARAM )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            long io = i * point_offset;
+            double x_out, y_out, z_out;
+
+            if( x[io] == HUGE_VAL )
+                continue;
+
+            x_out = M_BF*(       x[io] - Rz_BF*y[io] + Ry_BF*z[io]) + Dx_BF;
+            y_out = M_BF*( Rz_BF*x[io] +       y[io] - Rx_BF*z[io]) + Dy_BF;
+            z_out = M_BF*(-Ry_BF*x[io] + Rx_BF*y[io] +       z[io]) + Dz_BF;
+
+            x[io] = x_out;
+            y[io] = y_out;
+            z[io] = z_out;
+        }
+    }
+
+    return 0;
+}
+
+/************************************************************************/
+/*                      pj_geocentic_from_wgs84()                       */
+/************************************************************************/
+
+int pj_geocentric_from_wgs84( PJ *defn, 
+                              long point_count, int point_offset,
+                              double *x, double *y, double *z )
+
+{
+    int       i;
+
+    pj_errno = 0;
+
+    if( defn->datum_type == PJD_3PARAM )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            long io = i * point_offset;
+
+            if( x[io] == HUGE_VAL )
+                continue;
+            
+            x[io] = x[io] - defn->datum_params[0];
+            y[io] = y[io] - defn->datum_params[1];
+            z[io] = z[io] - defn->datum_params[2];
+        }
+    }
+    else if( defn->datum_type == PJD_7PARAM )
+    {
+        for( i = 0; i < point_count; i++ )
+        {
+            long io = i * point_offset;
+            double x_tmp, y_tmp, z_tmp;
+
+            if( x[io] == HUGE_VAL )
+                continue;
+
+            x_tmp = (x[io] - Dx_BF) / M_BF;
+            y_tmp = (y[io] - Dy_BF) / M_BF;
+            z_tmp = (z[io] - Dz_BF) / M_BF;
+
+            x[io] =        x_tmp + Rz_BF*y_tmp - Ry_BF*z_tmp;
+            y[io] = -Rz_BF*x_tmp +       y_tmp + Rx_BF*z_tmp;
+            z[io] =  Ry_BF*x_tmp - Rx_BF*y_tmp +       z_tmp;
+        }
+    }
+
+    return 0;
+}
+
+/************************************************************************/
+/*                         pj_datum_transform()                         */
+/************************************************************************/
+
+int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, 
+                        long point_count, int point_offset,
+                        double *x, double *y, double *z )
+
+{
+    double      src_a, src_es, dst_a, dst_es;
+    int         z_is_temp = FALSE;
+
+    pj_errno = 0;
+
+/* -------------------------------------------------------------------- */
+/*      Short cut if the datums are identical.                          */
+/* -------------------------------------------------------------------- */
+    if( pj_compare_datums( srcdefn, dstdefn ) )
+        return 0;
+
+    src_a = srcdefn->a;
+    src_es = srcdefn->es;
+
+    dst_a = dstdefn->a;
+    dst_es = dstdefn->es;
+
+/* -------------------------------------------------------------------- */
+/*      Create a temporary Z array if one is not provided.              */
+/* -------------------------------------------------------------------- */
+    if( z == NULL )
+    {
+        int	bytes = sizeof(double) * point_count * point_offset;
+        z = (double *) pj_malloc(bytes);
+        memset( z, 0, bytes );
+        z_is_temp = TRUE;
+    }
+
+#define CHECK_RETURN {if( pj_errno != 0 ) { if( z_is_temp ) pj_dalloc(z); return pj_errno; }}
+
+/* -------------------------------------------------------------------- */
+/*	If this datum requires grid shifts, then apply it to geodetic   */
+/*      coordinates.                                                    */
+/* -------------------------------------------------------------------- */
+    if( srcdefn->datum_type == PJD_GRIDSHIFT )
+    {
+        pj_apply_gridshift( pj_param(srcdefn->params,"snadgrids").s, 0, 
+                            point_count, point_offset, x, y, z );
+        CHECK_RETURN;
+
+        src_a = SRS_WGS84_SEMIMAJOR;
+        src_es = 0.006694379990;
+    }
+
+    if( dstdefn->datum_type == PJD_GRIDSHIFT )
+    {
+        dst_a = SRS_WGS84_SEMIMAJOR;
+        dst_es = 0.006694379990;
+    }
+        
+/* ==================================================================== */
+/*      Do we need to go through geocentric coordinates?                */
+/* ==================================================================== */
+    if( src_es != dst_es || src_a != dst_a
+        || srcdefn->datum_type == PJD_3PARAM 
+        || srcdefn->datum_type == PJD_7PARAM
+        || dstdefn->datum_type == PJD_3PARAM 
+        || dstdefn->datum_type == PJD_7PARAM)
+    {
+/* -------------------------------------------------------------------- */
+/*      Convert to geocentric coordinates.                              */
+/* -------------------------------------------------------------------- */
+        pj_geodetic_to_geocentric( src_a, src_es,
+                                   point_count, point_offset, x, y, z );
+        CHECK_RETURN;
+
+/* -------------------------------------------------------------------- */
+/*      Convert between datums.                                         */
+/* -------------------------------------------------------------------- */
+        if( srcdefn->datum_type == PJD_3PARAM 
+            || srcdefn->datum_type == PJD_7PARAM )
+        {
+            pj_geocentric_to_wgs84( srcdefn, point_count, point_offset,x,y,z);
+            CHECK_RETURN;
+        }
+
+        if( dstdefn->datum_type == PJD_3PARAM 
+            || dstdefn->datum_type == PJD_7PARAM )
+        {
+            pj_geocentric_from_wgs84( dstdefn, point_count,point_offset,x,y,z);
+            CHECK_RETURN;
+        }
+
+/* -------------------------------------------------------------------- */
+/*      Convert back to geodetic coordinates.                           */
+/* -------------------------------------------------------------------- */
+        pj_geocentric_to_geodetic( dst_a, dst_es,
+                                   point_count, point_offset, x, y, z );
+        CHECK_RETURN;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Apply grid shift to destination if required.                    */
+/* -------------------------------------------------------------------- */
+    if( dstdefn->datum_type == PJD_GRIDSHIFT )
+    {
+        pj_apply_gridshift( pj_param(dstdefn->params,"snadgrids").s, 1,
+                            point_count, point_offset, x, y, z );
+        CHECK_RETURN;
+    }
+
+    if( z_is_temp )
+        pj_dalloc( z );
+
+    return 0;
+}
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eqdc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eqdc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eqdc.c	(revision 256)
@@ -0,0 +1,89 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eqdc.c	4.2	94/03/16	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double phi1; \
+	double phi2; \
+	double n; \
+	double rho; \
+	double rho0; \
+	double c; \
+	double *en; \
+	int		ellips;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(eqdc, "Equidistant Conic")
+	"\n\tConic, Sph&Ell\n\tlat_1= lat_2=";
+# define EPS10	1.e-10
+FORWARD(e_forward); /* sphere & ellipsoid */
+	P->rho = P->c - (P->ellips ? pj_mlfn(lp.phi, sin(lp.phi),
+		cos(lp.phi), P->en) : lp.phi);
+	xy.x = P->rho * sin( lp.lam *= P->n );
+	xy.y = P->rho0 - P->rho * cos(lp.lam);
+	return (xy);
+}
+INVERSE(e_inverse); /* sphere & ellipsoid */
+	if ((P->rho = hypot(xy.x, xy.y = P->rho0 - xy.y)) != 0.0 ) {
+		if (P->n < 0.) {
+			P->rho = -P->rho;
+			xy.x = -xy.x;
+			xy.y = -xy.y;
+		}
+		lp.phi = P->c - P->rho;
+		if (P->ellips)
+			lp.phi = pj_inv_mlfn(lp.phi, P->es, P->en);
+		lp.lam = atan2(xy.x, xy.y) / P->n;
+	} else {
+		lp.lam = 0.;
+		lp.phi = P->n > 0. ? HALFPI : - HALFPI;
+	}
+	return (lp);
+}
+SPECIAL(fac) {
+	double sinphi, cosphi;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	fac->code |= IS_ANAL_HK;
+	fac->h = 1.;
+	fac->k = P->n * (P->c - (P->ellips ? pj_mlfn(lp.phi, sinphi,
+		cosphi, P->en) : lp.phi)) / pj_msfn(sinphi, cosphi, P->es);
+}
+FREEUP; if (P) { if (P->en) pj_dalloc(P->en); pj_dalloc(P); } }
+ENTRY1(eqdc, en)
+	double cosphi, sinphi;
+	int secant;
+
+	P->phi1 = pj_param(P->params, "rlat_1").f;
+	P->phi2 = pj_param(P->params, "rlat_2").f;
+	if (fabs(P->phi1 + P->phi2) < EPS10) E_ERROR(-21);
+	if (!(P->en = pj_enfn(P->es)))
+		E_ERROR_0;
+	P->n = sinphi = sin(P->phi1);
+	cosphi = cos(P->phi1);
+	secant = fabs(P->phi1 - P->phi2) >= EPS10;
+	if( (P->ellips = (P->es > 0.)) ) {
+		double ml1, m1;
+
+		m1 = pj_msfn(sinphi, cosphi, P->es);
+		P->en = pj_enfn(P->es);
+		ml1 = pj_mlfn(P->phi1, sinphi, cosphi, P->en);
+		if (secant) { /* secant cone */
+			sinphi = sin(P->phi2);
+			cosphi = cos(P->phi2);
+			P->n = (m1 - pj_msfn(sinphi, cosphi, P->es)) /
+				(pj_mlfn(P->phi2, sinphi, cosphi, P->en) - ml1);
+		}
+		P->c = ml1 + m1 / P->n;
+		P->rho0 = P->c - pj_mlfn(P->phi0, sin(P->phi0),
+			cos(P->phi0), P->en);
+	} else {
+		if (secant)
+			P->n = (cosphi - cos(P->phi2)) / (P->phi2 - P->phi1);
+		P->c = P->phi1 + cos(P->phi1) / P->n;
+		P->rho0 = P->c - P->phi0;
+	}
+	P->inv = e_inverse;
+	P->fwd = e_forward;
+	P->spc = fac;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mod_ster.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mod_ster.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mod_ster.c	(revision 256)
@@ -0,0 +1,214 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_mod_ster.c	4.1	94/02/15	GIE	REL";
+#endif
+/* based upon Snyder and Linck, USGS-NMD */
+#define PROJ_PARMS__ \
+    COMPLEX	*zcoeff; \
+	double	cchio, schio; \
+	int		n;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(mil_os, "Miller Oblated Stereographic") "\n\tAzi(mod)";
+PROJ_HEAD(lee_os, "Lee Oblated Stereographic") "\n\tAzi(mod)";
+PROJ_HEAD(gs48, "Mod. Stererographics of 48 U.S.") "\n\tAzi(mod)";
+PROJ_HEAD(alsk, "Mod. Stererographics of Alaska") "\n\tAzi(mod)";
+PROJ_HEAD(gs50, "Mod. Stererographics of 50 U.S.") "\n\tAzi(mod)";
+#define EPSLN 1e-10
+
+FORWARD(e_forward); /* ellipsoid */
+	double sinlon, coslon, esphi, chi, schi, cchi, s;
+	COMPLEX p;
+
+	sinlon = sin(lp.lam);
+	coslon = cos(lp.lam);
+	esphi = P->e * sin(lp.phi);
+	chi = 2. * atan(tan((HALFPI + lp.phi) * .5) *
+		pow((1. - esphi) / (1. + esphi), P->e * .5)) - HALFPI;
+	schi = sin(chi);
+	cchi = cos(chi);
+	s = 2. / (1. + P->schio * schi + P->cchio * cchi * coslon);
+	p.r = s * cchi * sinlon;
+	p.i = s * (P->cchio * schi - P->schio * cchi * coslon);
+	p = pj_zpoly1(p, P->zcoeff, P->n);
+	xy.x = p.r;
+	xy.y = p.i;
+	return xy;
+}
+INVERSE(e_inverse); /* ellipsoid */
+	int nn;
+	COMPLEX p, fxy, fpxy, dp;
+	double den, rh, z, sinz, cosz, chi, phi, dphi, esphi;
+
+	p.r = xy.x;
+	p.i = xy.y;
+	for (nn = 20; nn ;--nn) {
+		fxy = pj_zpolyd1(p, P->zcoeff, P->n, &fpxy);
+		fxy.r -= xy.x;
+		fxy.i -= xy.y;
+		den = fpxy.r * fpxy.r + fpxy.i * fpxy.i;
+		dp.r = -(fxy.r * fpxy.r + fxy.i * fpxy.i) / den;
+		dp.i = -(fxy.i * fpxy.r - fxy.r * fpxy.i) / den;
+		p.r += dp.r;
+		p.i += dp.i;
+		if ((fabs(dp.r) + fabs(dp.i)) <= EPSLN)
+			break;
+	}
+	if (nn) {
+		rh = hypot(p.r, p.i);
+		z = 2. * atan(.5 * rh);
+		sinz = sin(z);
+		cosz = cos(z);
+		lp.lam = P->lam0;
+		if (fabs(rh) <= EPSLN) {
+			lp.phi = P->phi0;
+			return lp;
+		}
+		chi = aasin(cosz * P->schio + p.i * sinz * P->cchio / rh);
+		phi = chi;
+		for (nn = 20; nn ;--nn) {
+			esphi = P->e * sin(phi);
+			dphi = 2. * atan(tan((HALFPI + chi) * .5) *
+				pow((1. + esphi) / (1. - esphi), P->e * .5)) - HALFPI - phi;
+			phi += dphi;
+			if (fabs(dphi) <= EPSLN)
+				break;
+		}
+	}
+	if (nn) {
+		lp.phi = phi;
+		lp.lam = atan2(p.r * sinz, rh * P->cchio * cosz - p.i * 
+			P->schio * sinz);
+    } else
+		lp.lam = lp.phi = HUGE_VAL;
+	return lp;
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) { /* general initialization */
+	double esphi, chio;
+
+	if (P->es) {
+		esphi = P->e * sin(P->phi0);
+		chio = 2. * atan(tan((HALFPI + P->phi0) * .5) *
+			pow((1. - esphi) / (1. + esphi), P->e * .5)) - HALFPI;
+	} else
+		chio = P->phi0;
+	P->schio = sin(chio);
+	P->cchio = cos(chio);
+	P->inv = e_inverse; P->fwd = e_forward;
+	return P;
+}
+ENTRY0(mil_os)
+	static COMPLEX /* Miller Oblated Stereographic */
+AB[] = {
+	{0.924500,	0.},
+	{0.,			0.},
+	{0.019430,	0.}
+};
+
+	P->n = 2;
+	P->lam0 = DEG_TO_RAD * 20.;
+	P->phi0 = DEG_TO_RAD * 18.;
+	P->zcoeff = AB;
+	P->es = 0.;
+ENDENTRY(setup(P))
+ENTRY0(lee_os)
+	static COMPLEX /* Lee Oblated Stereographic */
+AB[] = {
+	{0.721316,	0.},
+	{0.,			0.},
+        {-0.0088162,	 -0.00617325}
+};
+
+	P->n = 2;
+	P->lam0 = DEG_TO_RAD * -165.;
+	P->phi0 = DEG_TO_RAD * -10.;
+	P->zcoeff = AB;
+	P->es = 0.;
+ENDENTRY(setup(P))
+ENTRY0(gs48)
+	static COMPLEX /* 48 United States */
+AB[] = {
+	{0.98879,	0.},
+	{0.,		0.},
+	{-0.050909,	0.},
+	{0.,		0.},
+        {0.075528,	0.}
+};
+
+	P->n = 4;
+	P->lam0 = DEG_TO_RAD * -96.;
+	P->phi0 = DEG_TO_RAD * -39.;
+	P->zcoeff = AB;
+	P->es = 0.;
+	P->a = 6370997.;
+ENDENTRY(setup(P))
+ENTRY0(alsk)
+	static COMPLEX
+ABe[] = { /* Alaska ellipsoid */
+	{.9945303,	0.},
+	{.0052083,	-.0027404},
+	{.0072721,	.0048181},
+	{-.0151089,	-.1932526},
+	{.0642675,	-.1381226},
+	{.3582802,	-.2884586}},
+ABs[] = { /* Alaska sphere */
+	{.9972523,	0.},
+	{.0052513,	-.0041175},
+	{.0074606,	.0048125},
+	{-.0153783,	-.1968253},
+	{.0636871,	-.1408027},
+        {.3660976,	-.2937382}
+};
+
+	P->n = 5;
+	P->lam0 = DEG_TO_RAD * -152.;
+	P->phi0 = DEG_TO_RAD * 64.;
+	if (P->es) { /* fixed ellipsoid/sphere */
+		P->zcoeff = ABe;
+		P->a = 6378206.4;
+		P->e = sqrt(P->es = 0.00676866);
+	} else {
+		P->zcoeff = ABs;
+		P->a = 6370997.;
+	}
+ENDENTRY(setup(P))
+ENTRY0(gs50)
+	static COMPLEX
+ABe[] = { /* GS50 ellipsoid */
+	{.9827497,	0.},
+	{.0210669,	.0053804},
+	{-.1031415,	-.0571664},
+	{-.0323337,	-.0322847},
+	{.0502303,	.1211983},
+	{.0251805,	.0895678},
+	{-.0012315,	-.1416121},
+	{.0072202,	-.1317091},
+	{-.0194029,	.0759677},
+        {-.0210072,	.0834037}
+},
+ABs[] = { /* GS50 sphere */
+	{.9842990,	0.},
+	{.0211642,	.0037608},
+	{-.1036018,	-.0575102},
+	{-.0329095,	-.0320119},
+	{.0499471,	.1223335},
+	{.0260460,	.0899805},
+	{.0007388,	-.1435792},
+	{.0075848,	-.1334108},
+	{-.0216473,	.0776645},
+        {-.0225161,	.0853673}
+};
+
+	P->n = 9;
+	P->lam0 = DEG_TO_RAD * -120.;
+	P->phi0 = DEG_TO_RAD * 45.;
+	if (P->es) { /* fixed ellipsoid/sphere */
+		P->zcoeff = ABe;
+		P->a = 6378206.4;
+		P->e = sqrt(P->es = 0.00676866);
+	} else {
+		P->zcoeff = ABs;
+		P->a = 6370997.;
+	}
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp6.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp6.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp6.c	(revision 256)
@@ -0,0 +1,62 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_putp6.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double C_x, C_y, A, B, D;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(putp6, "Putnins P6") "\n\tPCyl., Sph.";
+PROJ_HEAD(putp6p, "Putnins P6'") "\n\tPCyl., Sph.";
+#define EPS	1e-10
+#define NITER	10
+#define CON_POLE 1.732050807568877
+FORWARD(s_forward); /* spheroid */
+	double p, r, V;
+	int i;
+
+	p = P->B * sin(lp.phi);
+	lp.phi *=  1.10265779;
+	for (i = NITER; i ; --i) {
+		r = sqrt(1. + lp.phi * lp.phi);
+		lp.phi -= V = ( (P->A - r) * lp.phi - log(lp.phi + r) - p ) /
+			(P->A - 2. * r);
+		if (fabs(V) < EPS)
+			break;
+	}
+	if (!i)
+		lp.phi = p < 0. ? -CON_POLE : CON_POLE;
+	xy.x = P->C_x * lp.lam * (P->D - sqrt(1. + lp.phi * lp.phi));
+	xy.y = P->C_y * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double r;
+
+	lp.phi = xy.y / P->C_y;
+	r = sqrt(1. + lp.phi * lp.phi);
+	lp.lam = xy.x / (P->C_x * (P->D - r));
+	lp.phi = aasin( ( (P->A - r) * lp.phi - log(lp.phi + r) ) / P->B);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->es = 0.;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	return P;
+}
+ENTRY0(putp6)
+	P->C_x = 1.01346;
+	P->C_y = 0.91910;
+	P->A   = 4.;
+	P->B   = 2.1471437182129378784;
+	P->D   = 2.;
+ENDENTRY(setup(P))
+ENTRY0(putp6p)
+	P->C_x = 0.44329;
+	P->C_y = 0.80404;
+	P->A   = 6.;
+	P->B   = 5.61125;
+	P->D   = 3.;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gauss.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gauss.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_gauss.c	(revision 256)
@@ -0,0 +1,107 @@
+/*
+** libproj -- library of cartographic projections
+**
+** Copyright (c) 2003   Gerald I. Evenden
+*/
+static const char
+LIBPROJ_ID[] = "$Id: pj_gauss.c,v 1.1 2004/10/20 17:04:00 fwarmerdam Exp $";
+/*
+** Permission is hereby granted, free of charge, to any person obtaining
+** a copy of this software and associated documentation files (the
+** "Software"), to deal in the Software without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Software, and to
+** permit persons to whom the Software is furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be
+** included in all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#define PJ_LIB__
+#include <projects.h>
+
+#define MAX_ITER 20
+
+struct GAUSS {
+	double C;
+	double K;
+	double e;
+	double ratexp;
+};
+#define EN ((struct GAUSS *)en)
+#define DEL_TOL 1e-14
+	static double
+srat(double esinp, double exp) {
+	return(pow((1.-esinp)/(1.+esinp), exp));
+}
+
+	void *
+pj_gauss_ini(double e, double phi0, double *chi, double *rc) {
+	double sphi, cphi, es;
+	struct GAUSS *en;
+
+	if ((en = (struct GAUSS *)malloc(sizeof(struct GAUSS))) == NULL)
+		return (NULL);
+	es = e * e;
+	EN->e = e;
+	sphi = sin(phi0);
+	cphi = cos(phi0);  cphi *= cphi;
+	*rc = sqrt(1. - es) / (1. - es * sphi * sphi);
+	EN->C = sqrt(1. + es * cphi * cphi / (1. - es));
+	*chi = asin(sphi / EN->C);
+	EN->ratexp = 0.5 * EN->C * e;
+	EN->K = tan(.5 * *chi + FORTPI) / (
+		pow(tan(.5 * phi0 + FORTPI), EN->C) *
+		srat(EN->e * sphi, EN->ratexp)  );
+	return ((void *)en);
+}
+	LP
+pj_gauss(LP elp, const void *en) {
+	LP slp;
+
+	slp.phi = 2. * atan( EN->K *
+		pow(tan(.5 * elp.phi + FORTPI), EN->C) *
+		srat(EN->e * sin(elp.phi), EN->ratexp) ) - HALFPI;
+	slp.lam = EN->C * (elp.lam);
+	return(slp);
+}
+	LP
+pj_inv_gauss(LP slp, const void *en) {
+	LP elp;
+	double num;
+	int i;
+
+	elp.lam = slp.lam / EN->C;
+	num = pow(tan(.5 * slp.phi + FORTPI)/EN->K, 1./EN->C);
+	for (i = MAX_ITER; i; --i) {
+		elp.phi = 2. * atan(num * srat(EN->e * sin(slp.phi), -.5 * EN->e))
+			- HALFPI;
+		if (fabs(elp.phi - slp.phi) < DEL_TOL) break;
+			slp.phi = elp.phi;
+	}	
+	/* convergence failed */
+	if (!i)
+		pj_errno = -17;
+	return (elp);
+}
+/* Revision Log:
+** $Log: pj_gauss.c,v $
+** Revision 1.1  2004/10/20 17:04:00  fwarmerdam
+** New
+**
+** Revision 2.2  2004/03/15 16:07:42  gie
+** removed es from init structure
+**
+** Revision 2.1  2003/03/28 01:44:30  gie
+** Initial
+**
+*/
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/mk_cheby.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/mk_cheby.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/mk_cheby.c	(revision 256)
@@ -0,0 +1,164 @@
+#ifndef lint
+static const char SCCSID[]="@(#)mk_cheby.c	4.5	94/03/22	GIE	REL";
+#endif
+#include <projects.h>
+	static void /* sum coefficients less than res */
+eval(projUV **w, int nu, int nv, double res, projUV *resid) {
+	int i, j;
+	double ab;
+	projUV *s;
+
+	resid->u = resid->v = 0.;
+	for (i = 0; i < nu; ++i)
+		for (s = w[i], j = 0; j < nv; ++j, ++s) {
+			if ((ab = fabs(s->u)) < res)
+				resid->u += ab;
+			if ((ab = fabs(s->v)) < res)
+				resid->v += ab;
+		}
+}
+	static Tseries * /* create power series structure */
+makeT(int nru, int nrv) {
+	Tseries *T;
+	int i;
+
+	if ((T = (Tseries *)pj_malloc(sizeof(Tseries))) &&
+		(T->cu = (struct PW_COEF *)pj_malloc(
+			sizeof(struct PW_COEF) * nru)) &&
+		(T->cv = (struct PW_COEF *)pj_malloc(
+			sizeof(struct PW_COEF) * nrv))) {
+		for (i = 0; i < nru; ++i)
+			T->cu[i].c = 0;
+		for (i = 0; i < nrv; ++i)
+			T->cv[i].c = 0;
+		return T;
+	} else
+		return 0;
+}
+	Tseries *
+mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), 
+	int nu, int nv, int power) {
+	int j, i, nru, nrv, *ncu, *ncv;
+	Tseries *T;
+	projUV **w;
+	double cutres;
+
+	if (!(w = (projUV **)vector2(nu, nv, sizeof(projUV))) ||
+		!(ncu = (int *)vector1(nu + nv, sizeof(int))))
+		return 0;
+	ncv = ncu + nu;
+	if (!bchgen(a, b, nu, nv, w, func)) {
+		projUV *s;
+		double ab, *p;
+
+		/* analyse coefficients and adjust until residual OK */
+		cutres = res;
+		for (i = 4; i ; --i) {
+			eval(w, nu, nv, cutres, resid);
+			if (resid->u < res && resid->v < res)
+				break;
+			cutres *= 0.5;
+		}
+		if (i <= 0) /* warn of too many tries */
+			resid->u = - resid->u;
+		/* apply cut resolution and set pointers */
+		nru = nrv = 0;
+		for (j = 0; j < nu; ++j) {
+			ncu[j] = ncv[j] = 0; /* clear column maxes */
+			for (s = w[j], i = 0; i < nv; ++i, ++s) {
+				if ((ab = fabs(s->u)) < cutres) /* < resolution ? */
+					s->u = 0.;		/* clear coefficient */
+				else
+					ncu[j] = i + 1;	/* update column max */
+				if ((ab = fabs(s->v)) < cutres) /* same for v coef's */
+					s->v = 0.;
+				else
+					ncv[j] = i + 1;
+			}
+			if (ncu[j]) nru = j + 1;	/* update row max */
+			if (ncv[j]) nrv = j + 1;
+		}
+		if (power) { /* convert to bivariate power series */
+			if (!bch2bps(a, b, w, nu, nv))
+				goto error;
+			/* possible change in some row counts, so readjust */
+			nru = nrv = 0;
+			for (j = 0; j < nu; ++j) {
+				ncu[j] = ncv[j] = 0; /* clear column maxes */
+				for (s = w[j], i = 0; i < nv; ++i, ++s) {
+					if (s->u)
+						ncu[j] = i + 1;	/* update column max */
+					if (s->v)
+						ncv[j] = i + 1;
+				}
+				if (ncu[j]) nru = j + 1;	/* update row max */
+				if (ncv[j]) nrv = j + 1;
+			}
+			if (T = makeT(nru, nrv)) {
+				T->a = a;
+				T->b = b;
+				T->mu = nru - 1;
+				T->mv = nrv - 1;
+				T->power = 1;
+				for (i = 0; i < nru; ++i) /* store coefficient rows for u */
+					if (T->cu[i].m = ncu[i])
+						if ((p = T->cu[i].c =
+								(double *)pj_malloc(sizeof(double) * ncu[i])))
+							for (j = 0; j < ncu[i]; ++j)
+								*p++ = (w[i] + j)->u;
+						else
+							goto error;
+				for (i = 0; i < nrv; ++i) /* same for v */
+					if (T->cv[i].m = ncv[i])
+						if ((p = T->cv[i].c =
+								(double *)pj_malloc(sizeof(double) * ncv[i])))
+							for (j = 0; j < ncv[i]; ++j)
+								*p++ = (w[i] + j)->v;
+						else
+							goto error;
+			}
+		} else if (T = makeT(nru, nrv)) {
+			/* else make returned Chebyshev coefficient structure */
+			T->mu = nru - 1; /* save row degree */
+			T->mv = nrv - 1;
+			T->a.u = a.u + b.u; /* set argument scaling */
+			T->a.v = a.v + b.v;
+			T->b.u = 1. / (b.u - a.u);
+			T->b.v = 1. / (b.v - a.v);
+			T->power = 0;
+			for (i = 0; i < nru; ++i) /* store coefficient rows for u */
+				if (T->cu[i].m = ncu[i]) 
+					if ((p = T->cu[i].c =
+							(double *)pj_malloc(sizeof(double) * ncu[i])))
+						for (j = 0; j < ncu[i]; ++j)
+							*p++ = (w[i] + j)->u;
+					else
+						goto error;
+			for (i = 0; i < nrv; ++i) /* same for v */
+				if (T->cv[i].m = ncv[i])
+					if ((p = T->cv[i].c =
+							(double *)pj_malloc(sizeof(double) * ncv[i])))
+						for (j = 0; j < ncv[i]; ++j)
+							*p++ = (w[i] + j)->v;
+					else
+						goto error;
+		} else
+			goto error;
+	}
+	goto gohome;
+error:
+	if (T) { /* pj_dalloc up possible allocations */
+		for (i = 0; i <= T->mu; ++i)
+			if (T->cu[i].c)
+				pj_dalloc(T->cu[i].c);
+		for (i = 0; i <= T->mv; ++i)
+			if (T->cv[i].c)
+				pj_dalloc(T->cv[i].c);
+		pj_dalloc(T);
+	}
+	T = 0;
+gohome:
+	freev2((void **) w, nu);
+	pj_dalloc(ncu);
+	return T;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lask.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lask.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_lask.c	(revision 256)
@@ -0,0 +1,29 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_lask.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(lask, "Laskowski") "\n\tMisc Sph, no inv.";
+#define	a10	 0.975534
+#define	a12	-0.119161
+#define	a32	-0.0143059
+#define	a14	-0.0547009
+#define	b01	 1.00384
+#define	b21	 0.0802894
+#define	b03	 0.0998909
+#define	b41	 0.000199025
+#define	b23	-0.0285500
+#define	b05	-0.0491032
+FORWARD(s_forward); /* sphere */
+	double l2, p2;
+
+	l2 = lp.lam * lp.lam;
+	p2 = lp.phi * lp.phi;
+	xy.x = lp.lam * (a10 + p2 * (a12 + l2 * a32 + p2 * a14));
+	xy.y = lp.phi * (b01 + l2 * (b21 + p2 * b23 + l2 * b41) +
+		p2 * (b03 + p2 * b05));
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(lask) P->fwd = s_forward; P->inv = 0; P->es = 0.; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_for.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_for.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_for.c	(revision 256)
@@ -0,0 +1,106 @@
+#ifndef lint
+static const char SCCSID[]="@(#)geod_for.c	4.6	95/09/23	GIE	REL";
+#endif
+# include "projects.h"
+# include "geodesic.h"
+# define MERI_TOL 1e-9
+	static double
+th1,costh1,sinth1,sina12,cosa12,M,N,c1,c2,D,P,s1;
+	static int
+merid, signS;
+	void
+geod_pre(void) {
+	al12 = adjlon(al12); /* reduce to  +- 0-PI */
+	signS = fabs(al12) > HALFPI ? 1 : 0;
+	th1 = ellipse ? atan(onef * tan(phi1)) : phi1;
+	costh1 = cos(th1);
+	sinth1 = sin(th1);
+	if ((merid = fabs(sina12 = sin(al12)) < MERI_TOL)) {
+		sina12 = 0.;
+		cosa12 = fabs(al12) < HALFPI ? 1. : -1.;
+		M = 0.;
+	} else {
+		cosa12 = cos(al12);
+		M = costh1 * sina12;
+	}
+	N = costh1 * cosa12;
+	if (ellipse) {
+		if (merid) {
+			c1 = 0.;
+			c2 = f4;
+			D = 1. - c2;
+			D *= D;
+			P = c2 / D;
+		} else {
+			c1 = geod_f * M;
+			c2 = f4 * (1. - M * M);
+			D = (1. - c2)*(1. - c2 - c1 * M);
+			P = (1. + .5 * c1 * M) * c2 / D;
+		}
+	}
+	if (merid) s1 = HALFPI - th1;
+	else {
+		s1 = (fabs(M) >= 1.) ? 0. : acos(M);
+		s1 =  sinth1 / sin(s1);
+		s1 = (fabs(s1) >= 1.) ? 0. : acos(s1);
+	}
+}
+	void
+geod_for(void) {
+	double d,sind,u,V,X,ds,cosds,sinds,ss,de;
+
+	if (ellipse) {
+		d = geod_S / (D * geod_a);
+		if (signS) d = -d;
+		u = 2. * (s1 - d);
+		V = cos(u + d);
+		X = c2 * c2 * (sind = sin(d)) * cos(d) * (2. * V * V - 1.);
+		ds = d + X - 2. * P * V * (1. - 2. * P * cos(u)) * sind;
+		ss = s1 + s1 - ds;
+	} else {
+		ds = geod_S / geod_a;
+		if (signS) ds = - ds;
+	}
+	cosds = cos(ds);
+	sinds = sin(ds);
+	if (signS) sinds = - sinds;
+	al21 = N * cosds - sinth1 * sinds;
+	if (merid) {
+		phi2 = atan( tan(HALFPI + s1 - ds) / onef);
+		if (al21 > 0.) {
+			al21 = PI;
+			if (signS)
+				de = PI;
+			else {
+				phi2 = - phi2;
+				de = 0.;
+			}
+		} else {
+			al21 = 0.;
+			if (signS) {
+				phi2 = - phi2;
+				de = 0;
+			} else
+				de = PI;
+		}
+	} else {
+		al21 = atan(M / al21);
+		if (al21 > 0)
+			al21 += PI;
+		if (al12 < 0.)
+			al21 -= PI;
+		al21 = adjlon(al21);
+		phi2 = atan(-(sinth1 * cosds + N * sinds) * sin(al21) /
+			(ellipse ? onef * M : M));
+		de = atan2(sinds * sina12 ,
+			(costh1 * cosds - sinth1 * sinds * cosa12));
+		if (ellipse)
+			if (signS)
+				de += c1 * ((1. - c2) * ds +
+					c2 * sinds * cos(ss));
+			else
+				de -= c1 * ((1. - c2) * ds -
+					c2 * sinds * cos(ss));
+	}
+	lam2 = adjlon( lam1 + de );
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_init.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_init.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/nad_init.c	(revision 256)
@@ -0,0 +1,179 @@
+/******************************************************************************
+ * $Id: nad_init.c,v 1.8 2003/03/17 18:56:01 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Load datum shift files into memory.
+ * Author:   Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: nad_init.c,v $
+ * Revision 1.8  2003/03/17 18:56:01  warmerda
+ * implement delayed loading of ctable format files
+ *
+ * Revision 1.7  2003/03/15 06:02:02  warmerda
+ * preliminary NTv2 support, major restructure of datum shifting
+ *
+ * Revision 1.6  2002/07/08 02:32:05  warmerda
+ * ensure clean C++ builds
+ *
+ * Revision 1.5  2002/04/30 16:26:07  warmerda
+ * trip newlines of ctable id field
+ *
+ * Revision 1.4  2001/08/17 17:28:37  warmerda
+ * removed use of emess()
+ *
+ * Revision 1.3  2001/04/05 19:31:54  warmerda
+ * substantially reorganized and added NTv1 support
+ *
+ */
+
+#define PJ_LIB__
+
+#include <projects.h>
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <string.h>
+
+/************************************************************************/
+/*                          nad_ctable_load()                           */
+/*                                                                      */
+/*      Load the data portion of a ctable formatted grid.               */
+/************************************************************************/
+
+int nad_ctable_load( struct CTABLE *ct, FILE *fid )
+
+{
+    int  a_size;
+
+    fseek( fid, sizeof(struct CTABLE), SEEK_SET );
+
+    /* read all the actual shift values */
+    a_size = ct->lim.lam * ct->lim.phi;
+    ct->cvs = (FLP *) pj_malloc(sizeof(FLP) * a_size);
+    if( ct->cvs == NULL 
+        || fread(ct->cvs, sizeof(FLP), a_size, fid) != a_size )
+    {
+        pj_errno = -38;
+        return 0;
+    }
+
+    return 1;
+} 
+
+/************************************************************************/
+/*                          nad_ctable_init()                           */
+/*                                                                      */
+/*      Read the header portion of a "ctable" format grid.              */
+/************************************************************************/
+
+struct CTABLE *nad_ctable_init( FILE * fid )
+{
+    struct CTABLE *ct;
+    int		id_end;
+
+    /* read the table header */
+    ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
+    if( ct == NULL 
+        || fread( ct, sizeof(struct CTABLE), 1, fid ) != 1 )
+    {
+        pj_errno = -38;
+        return NULL;
+    }
+
+    /* do some minimal validation to ensure the structure isn't corrupt */
+    if( ct->lim.lam < 1 || ct->lim.lam > 100000 
+        || ct->lim.phi < 1 || ct->lim.phi > 100000 )
+    {
+        pj_errno = -38;
+        return NULL;
+    }
+    
+    /* trim white space and newlines off id */
+    for( id_end = strlen(ct->id)-1; id_end > 0; id_end-- )
+    {
+        if( ct->id[id_end] == '\n' || ct->id[id_end] == ' ' )
+            ct->id[id_end] = '\0';
+        else
+            break;
+    }
+
+    ct->cvs = NULL;
+
+    return ct;
+}
+
+/************************************************************************/
+/*                              nad_init()                              */
+/*                                                                      */
+/*      Read a datum shift file in any of the supported binary formats. */
+/************************************************************************/
+
+struct CTABLE *nad_init(char *name) 
+{
+    char 	fname[MAX_PATH_FILENAME+1];
+    struct CTABLE *ct;
+    FILE 	*fid;
+    char	header[512];
+
+    errno = pj_errno = 0;
+
+/* -------------------------------------------------------------------- */
+/*      Open the file using the usual search rules.                     */
+/* -------------------------------------------------------------------- */
+    strcpy(fname, name);
+    if (!(fid = pj_open_lib(fname, "rb"))) {
+        pj_errno = errno;
+        return 0;
+    }
+    
+    ct = nad_ctable_init( fid );
+    if( ct != NULL )
+    {
+        if( !nad_ctable_load( ct, fid ) )
+        {
+            nad_free( ct );
+            ct = NULL;
+        }
+    }
+
+    fclose(fid);
+    return ct;
+}
+
+/************************************************************************/
+/*                              nad_free()                              */
+/*                                                                      */
+/*      Free a CTABLE grid shift structure produced by nad_init().      */
+/************************************************************************/
+
+void nad_free(struct CTABLE *ct) 
+{
+    if (ct) {
+        if( ct->cvs != NULL )
+            pj_dalloc(ct->cvs);
+
+        pj_dalloc(ct);
+    }
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/bchgen.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/bchgen.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/bchgen.c	(revision 256)
@@ -0,0 +1,61 @@
+/* generate double bivariate Chebychev polynomial */
+#ifndef lint
+static const char SCCSID[]="@(#)bchgen.c	4.5	94/03/22	GIE	REL";
+#endif
+#include <projects.h>
+	int
+bchgen(projUV a, projUV b, int nu, int nv, projUV **f, projUV(*func)(projUV)) {
+	int i, j, k;
+	projUV arg, *t, bma, bpa, *c;
+	double d, fac;
+
+	bma.u = 0.5 * (b.u - a.u); bma.v = 0.5 * (b.v - a.v);
+	bpa.u = 0.5 * (b.u + a.u); bpa.v = 0.5 * (b.v + a.v);
+	for ( i = 0; i < nu; ++i) {
+		arg.u = cos(PI * (i + 0.5) / nu) * bma.u + bpa.u;
+		for ( j = 0; j < nv; ++j) {
+			arg.v = cos(PI * (j + 0.5) / nv) * bma.v + bpa.v;
+			f[i][j] = (*func)(arg);
+			if ((f[i][j]).u == HUGE_VAL)
+				return(1);
+		}
+	}
+	if (!(c = (projUV *) vector1(nu, sizeof(projUV)))) return 1;
+	fac = 2. / nu;
+	for ( j = 0; j < nv ; ++j) {
+		for ( i = 0; i < nu; ++i) {
+			arg.u = arg.v = 0.;
+			for (k = 0; k < nu; ++k) {
+				d = cos(PI * i * (k + .5) / nu);
+				arg.u += f[k][j].u * d;
+				arg.v += f[k][j].v * d;
+			}
+			arg.u *= fac;
+			arg.v *= fac;
+			c[i] = arg;
+		}
+		for (i = 0; i < nu; ++i)
+			f[i][j] = c[i];
+	}
+	pj_dalloc(c);
+	if (!(c = (projUV*) vector1(nv, sizeof(projUV)))) return 1;
+	fac = 2. / nv;
+	for ( i = 0; i < nu; ++i) {
+		t = f[i];
+		for (j = 0; j < nv; ++j) {
+			arg.u = arg.v = 0.;
+			for (k = 0; k < nv; ++k) {
+				d = cos(PI * j * (k + .5) / nv);
+				arg.u += t[k].u * d;
+				arg.v += t[k].v * d;
+			}
+			arg.u *= fac;
+			arg.v *= fac;
+			c[j] = arg;
+		}
+		f[i] = c;
+		c = t;
+	}
+	pj_dalloc(c);
+	return(0);
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_auth.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_auth.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_auth.c	(revision 256)
@@ -0,0 +1,33 @@
+/* determine latitude from authalic latitude */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_auth.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <projects.h>
+# define P00 .33333333333333333333
+# define P01 .17222222222222222222
+# define P02 .10257936507936507936
+# define P10 .06388888888888888888
+# define P11 .06640211640211640211
+# define P20 .01641501294219154443
+#define APA_SIZE 3
+	double *
+pj_authset(double es) {
+	double t, *APA;
+
+	if (APA = (double *)pj_malloc(APA_SIZE * sizeof(double))) {
+		APA[0] = es * P00;
+		t = es * es;
+		APA[0] += t * P01;
+		APA[1] = t * P10;
+		t *= es;
+		APA[0] += t * P02;
+		APA[1] += t * P11;
+		APA[2] = t * P20;
+	}
+	return APA;
+}
+	double
+pj_authlat(double beta, double *APA) {
+	double t = beta+beta;
+	return(beta + APA[0] * sin(t) + APA[1] * sin(t+t) + APA[2] * sin(t+t+t));
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/gen_cheb.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/gen_cheb.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/gen_cheb.c	(revision 256)
@@ -0,0 +1,74 @@
+/* generates 'T' option output */
+#ifndef lint
+static const char SCCSID[]="@(#)gen_cheb.c	4.9	95/09/23	GIE	REL";
+#endif
+#define PJ_LIB__
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <projects.h>
+#include "emess.h"
+#ifndef COEF_LINE_MAX
+#define COEF_LINE_MAX 60
+#endif
+	void
+gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P, int iargc, char **iargv) {
+	int NU = 15, NV = 15, i, res = -1, errin = 0, pwr;
+	char *arg, fmt[15];
+	projUV low, upp, resid;
+	Tseries *F;
+	extern void p_series(Tseries *, FILE *, char *);
+	double (*input)(const char *, char **);
+
+	input = inverse ? strtod : dmstor;
+	if (*s) low.u = input(s, &s); else ++errin;
+	if (*s == ',') upp.u = input(s+1, &s); else ++errin;
+	if (*s == ',') low.v = input(s+1, &s); else ++errin;
+	if (*s == ',') upp.v = input(s+1, &s); else ++errin;
+	if (errin)
+		emess(16,"null or absent -T parameters");
+	if (*s == ',') if (*++s != ',') res = strtol(s, &s, 10);
+	if (*s == ',') if (*++s != ',') NU = strtol(s, &s, 10);
+	if (*s == ',') if (*++s != ',') NV = strtol(s, &s, 10);
+	pwr = s && *s && !strcmp(s, ",P");
+	(void)printf("#proj_%s\n#    run-line:\n",
+		pwr ? "Power" : "Chebyshev");
+	if (iargc > 0) { /* proj execution audit trail */
+		int n = 0, L;
+
+		for( i = 0 ; iargc ; --iargc) {
+			arg = *iargv++;
+			if (*arg != '+') {
+				if (!n) { putchar('#'); ++n; }
+				(void)printf(" %s%n",arg, &L);
+				if ((n += L) > 50) { putchar('\n'); n = 0; }
+			}
+		}
+		if (n) putchar('\n');
+	}
+	(void)printf("# projection parameters\n");
+	pj_pr_list(P);
+	if (low.u == upp.u || low.v >= upp.v)
+		emess(16,"approx. argument range error");
+	if (low.u > upp.u)
+		low.u -= TWOPI;
+	if (NU < 2 || NV < 2)
+		emess(16,"approx. work dimensions (%d %d) too small",NU,NV);
+	if (!(F = mk_cheby(low, upp, pow(10., (double)res)*.5, &resid, proj,
+		NU, NV, pwr)))
+		emess(16,"generation of approx failed\nreason: %s\n",
+			pj_strerrno(errno));
+	(void)printf("%c,%.12g,%.12g,%.12g,%.12g,%.12g\n",inverse?'I':'F',
+		P->lam0*RAD_TO_DEG,
+		low.u*(inverse?1.:RAD_TO_DEG),upp.u*(inverse?1.:RAD_TO_DEG),
+		low.v*(inverse?1.:RAD_TO_DEG),upp.v*(inverse?1.:RAD_TO_DEG));
+	if (pwr)
+		strcpy(fmt, "%.15g");
+	else if (res <= 0)
+		(void)sprintf(fmt,"%%.%df",-res+1);
+	else
+		(void)strcpy(fmt,"%.0f");
+	p_series(F, stdout, fmt);
+	(void)printf("# |u,v| sums %g %g\n#end_proj_%s\n",
+		resid.u, resid.v, pwr ? "Power" : "Chebyshev");
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sconics.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sconics.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_sconics.c	(revision 256)
@@ -0,0 +1,157 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_sconics.c	4.1	94/05/22	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	n; \
+	double	rho_c; \
+	double	rho_0; \
+	double	sig; \
+	double	c1, c2; \
+	int		type;
+#define PJ_LIB__
+#include	<projects.h>
+#define EULER 0
+#define MURD1 1
+#define MURD2 2
+#define MURD3 3
+#define PCONIC 4
+#define TISSOT 5
+#define VITK1 6
+#define EPS10	1.e-10
+#define EPS 1e-10
+#define LINE2 "\n\tConic, Sph\n\tlat_1= and lat_2="
+PROJ_HEAD(tissot, "Tissot")
+	LINE2;
+PROJ_HEAD(murd1, "Murdoch I")
+	LINE2;
+PROJ_HEAD(murd2, "Murdoch II")
+	LINE2;
+PROJ_HEAD(murd3, "Murdoch III")
+	LINE2;
+PROJ_HEAD(euler, "Euler")
+	LINE2;
+PROJ_HEAD(pconic, "Perspective Conic")
+	LINE2;
+PROJ_HEAD(vitk1, "Vitkovsky I")
+	LINE2;
+/* get common factors for simple conics */
+	static int
+phi12(PJ *P, double *del) {
+	double p1, p2;
+	int err = 0;
+
+	if (!pj_param(P->params, "tlat_1").i ||
+		!pj_param(P->params, "tlat_2").i) {
+		err = -41;
+	} else {
+		p1 = pj_param(P->params, "rlat_1").f;
+		p2 = pj_param(P->params, "rlat_2").f;
+		*del = 0.5 * (p2 - p1);
+		P->sig = 0.5 * (p2 + p1);
+		err = (fabs(*del) < EPS || fabs(P->sig) < EPS) ? -42 : 0;
+		*del = *del;
+	}
+	return err;
+}
+FORWARD(s_forward); /* spheroid */
+	double rho;
+
+	switch (P->type) {
+	case MURD2:
+		rho = P->rho_c + tan(P->sig - lp.phi);
+		break;
+	case PCONIC:
+		rho = P->c2 * (P->c1 - tan(lp.phi));
+		break;
+	default:
+		rho = P->rho_c - lp.phi;
+		break;
+	}
+	xy.x = rho * sin( lp.lam *= P->n );
+	xy.y = P->rho_0 - rho * cos(lp.lam);
+	return (xy);
+}
+INVERSE(s_inverse); /* ellipsoid & spheroid */
+	double rho;
+
+	rho = hypot(xy.x, xy.y = P->rho_0 - xy.y);
+	if (P->n < 0.) {
+		rho = - rho;
+		xy.x = - xy.x;
+		xy.y = - xy.y;
+	}
+	lp.lam = atan2(xy.x, xy.y) / P->n;
+	switch (P->type) {
+	case PCONIC:
+		lp.phi = atan(P->c1 - rho / P->c2) + P->sig;
+		break;
+	case MURD2:
+		lp.phi = P->sig - atan(rho - P->rho_c);
+		break;
+	default:
+		lp.phi = P->rho_c - rho;
+	}
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	double del, cs;
+	int i;
+
+	if( (i = phi12(P, &del)) )
+		E_ERROR(i);
+	switch (P->type) {
+	case TISSOT:
+		P->n = sin(P->sig);
+		cs = cos(del);
+		P->rho_c = P->n / cs + cs / P->n;
+		P->rho_0 = sqrt((P->rho_c - 2 * sin(P->phi0))/P->n);
+		break;
+	case MURD1:
+		P->rho_c = sin(del)/(del * tan(P->sig)) + P->sig;
+		P->rho_0 = P->rho_c - P->phi0;
+		P->n = sin(P->sig);
+		break;
+	case MURD2:
+		P->rho_c = (cs = sqrt(cos(del))) / tan(P->sig);
+		P->rho_0 = P->rho_c + tan(P->sig - P->phi0);
+		P->n = sin(P->sig) * cs;
+		break;
+	case MURD3:
+		P->rho_c = del / (tan(P->sig) * tan(del)) + P->sig;
+		P->rho_0 = P->rho_c - P->phi0;
+		P->n = sin(P->sig) * sin(del) * tan(del) / (del * del);
+		break;
+	case EULER:
+		P->n = sin(P->sig) * sin(del) / del;
+		del *= 0.5;
+		P->rho_c = del / (tan(del) * tan(P->sig)) + P->sig;	
+		P->rho_0 = P->rho_c - P->phi0;
+		break;
+	case PCONIC:
+		P->n = sin(P->sig);
+		P->c2 = cos(del);
+		P->c1 = 1./tan(P->sig);
+		if (fabs(del = P->phi0 - P->sig) - EPS10 >= HALFPI)
+			E_ERROR(-43);
+		P->rho_0 = P->c2 * (P->c1 - tan(del));
+		break;
+	case VITK1:
+		P->n = (cs = tan(del)) * sin(P->sig) / del;
+		P->rho_c = del / (cs * tan(P->sig)) + P->sig;
+		P->rho_0 = P->rho_c - P->phi0;
+		break;
+	}
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0;
+	return (P);
+}
+ENTRY0(euler) P->type = EULER; ENDENTRY(setup(P))
+ENTRY0(tissot) P->type = TISSOT; ENDENTRY(setup(P))
+ENTRY0(murd1) P->type = MURD1; ENDENTRY(setup(P))
+ENTRY0(murd2) P->type = MURD2; ENDENTRY(setup(P))
+ENTRY0(murd3) P->type = MURD3; ENDENTRY(setup(P))
+ENTRY0(pconic) P->type = PCONIC; ENDENTRY(setup(P))
+ENTRY0(vitk1) P->type = VITK1; ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_units.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_units.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_units.c	(revision 256)
@@ -0,0 +1,40 @@
+/* definition of standard cartesian units */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_units.c	4.6	93/06/12	GIE	REL";
+#endif
+#define PJ_UNITS__
+#include <projects.h>
+/* Field 2 that contains the multiplier to convert named units to meters
+** may be expressed by either a simple floating point constant or a
+** numerator/denomenator values (e.g. 1/1000) */
+C_NAMESPACE struct PJ_UNITS
+pj_units[] = {
+	"km",	"1000.",	"Kilometer",
+	"m",	"1.",		"Meter",
+	"dm",	"1/10",		"Decimeter",
+	"cm",	"1/100",	"Centimeter",
+	"mm",	"1/1000",	"Millimeter",
+	"kmi",	"1852.0",	"International Nautical Mile",
+	"in",	"0.0254",	"International Inch",
+	"ft",	"0.3048",	"International Foot",
+	"yd",	"0.9144",	"International Yard",
+	"mi",	"1609.344",	"International Statute Mile",
+	"fath",	"1.8288",	"International Fathom",
+	"ch",	"20.1168",	"International Chain",
+	"link",	"0.201168",	"International Link",
+	"us-in",	"1./39.37",	"U.S. Surveyor's Inch",
+	"us-ft",	"0.304800609601219",	"U.S. Surveyor's Foot",
+	"us-yd",	"0.914401828803658",	"U.S. Surveyor's Yard",
+	"us-ch",	"20.11684023368047",	"U.S. Surveyor's Chain",
+	"us-mi",	"1609.347218694437",	"U.S. Surveyor's Statute Mile",
+	"ind-yd",	"0.91439523",	"Indian Yard",
+	"ind-ft",	"0.30479841",	"Indian Foot",
+	"ind-ch",	"20.11669506",	"Indian Chain",
+(char *)0, (char *)0, (char *)0
+};
+
+struct PJ_UNITS *pj_get_units_ref()
+
+{
+    return pj_units;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_phi2.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_phi2.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_phi2.c	(revision 256)
@@ -0,0 +1,28 @@
+/* determine latitude angle phi-2 */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_phi2.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <projects.h>
+
+#define HALFPI		1.5707963267948966
+#define TOL 1.0e-10
+#define N_ITER 15
+
+	double
+pj_phi2(double ts, double e) {
+	double eccnth, Phi, con, dphi;
+	int i;
+
+	eccnth = .5 * e;
+	Phi = HALFPI - 2. * atan (ts);
+	i = N_ITER;
+	do {
+		con = e * sin (Phi);
+		dphi = HALFPI - 2. * atan (ts * pow((1. - con) /
+		   (1. + con), eccnth)) - Phi;
+		Phi += dphi;
+	} while ( fabs(dphi) > TOL && --i);
+	if (i <= 0)
+		pj_errno = -18;
+	return Phi;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ocea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ocea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_ocea.c	(revision 256)
@@ -0,0 +1,71 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_ocea.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	rok; \
+	double	rtk; \
+	double	sinphi; \
+	double	cosphi; \
+	double	singam; \
+	double	cosgam;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area") "\n\tCyl, Sph"
+	"lonc= alpha= or\n\tlat_1= lat_2= lon_1= lon_2=";
+FORWARD(s_forward); /* spheroid */
+	double t;
+
+	xy.y = sin(lp.lam);
+/*
+	xy.x = atan2((tan(lp.phi) * P->cosphi + P->sinphi * xy.y) , cos(lp.lam));
+*/
+	t = cos(lp.lam);
+	xy.x = atan((tan(lp.phi) * P->cosphi + P->sinphi * xy.y) / t);
+	if (t < 0.)
+		xy.x += PI;
+	xy.x *= P->rtk;
+	xy.y = P->rok * (P->sinphi * sin(lp.phi) - P->cosphi * cos(lp.phi) * xy.y);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t, s;
+
+	xy.y /= P->rok;
+	xy.x /= P->rtk;
+	t = sqrt(1. - xy.y * xy.y);
+	lp.phi = asin(xy.y * P->sinphi + t * P->cosphi * (s = sin(xy.x)));
+	lp.lam = atan2(t * P->sinphi * s - xy.y * P->cosphi,
+		t * cos(xy.x));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(ocea)
+	double phi_0=0.0, phi_1, phi_2, lam_1, lam_2, lonz, alpha;
+
+	P->rok = P->a / P->k0;
+	P->rtk = P->a * P->k0;
+	if ( pj_param(P->params, "talpha").i) {
+		alpha	= pj_param(P->params, "ralpha").f;
+		lonz = pj_param(P->params, "rlonc").f;
+		P->singam = atan(-cos(alpha)/(-sin(phi_0) * sin(alpha))) + lonz;
+		P->sinphi = asin(cos(phi_0) * sin(alpha));
+	} else {
+		phi_1 = pj_param(P->params, "rlat_1").f;
+		phi_2 = pj_param(P->params, "rlat_2").f;
+		lam_1 = pj_param(P->params, "rlon_1").f;
+		lam_2 = pj_param(P->params, "rlon_2").f;
+		P->singam = atan2(cos(phi_1) * sin(phi_2) * cos(lam_1) -
+			sin(phi_1) * cos(phi_2) * cos(lam_2),
+			sin(phi_1) * cos(phi_2) * sin(lam_2) -
+			cos(phi_1) * sin(phi_2) * sin(lam_1) );
+		P->sinphi = atan(-cos(P->singam - lam_1) / tan(phi_1));
+	}
+	P->lam0 = P->singam + HALFPI;
+	P->cosphi = cos(P->sinphi);
+	P->sinphi = sin(P->sinphi);
+	P->cosgam = cos(P->singam);
+	P->singam = sin(P->singam);
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aitoff.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aitoff.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_aitoff.c	(revision 256)
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * $Id: PJ_aitoff.c,v 1.3 2002/12/14 19:32:27 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the aitoff (Aitoff) and wintri (Winkel Tripel)
+ *           projections.
+ * Author:   Gerald Evenden
+ *
+ ******************************************************************************
+ * Copyright (c) 1995, Gerald Evenden
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: PJ_aitoff.c,v $
+ * Revision 1.3  2002/12/14 19:32:27  warmerda
+ * updated header
+ *
+ */
+
+#define PROJ_PARMS__ \
+	double	cosphi1; \
+	int		mode;
+#define PJ_LIB__
+#include <projects.h>
+
+PJ_CVSID("$Id: PJ_aitoff.c,v 1.3 2002/12/14 19:32:27 warmerda Exp $");
+
+PROJ_HEAD(aitoff, "Aitoff") "\n\tMisc Sph";
+PROJ_HEAD(wintri, "Winkel Tripel") "\n\tMisc Sph\n\tlat_1";
+
+FORWARD(s_forward); /* spheroid */
+	double c, d;
+
+	if((d = acos(cos(lp.phi) * cos(c = 0.5 * lp.lam)))) {/* basic Aitoff */
+		xy.x = 2. * d * cos(lp.phi) * sin(c) * (xy.y = 1. / sin(d));
+		xy.y *= d * sin(lp.phi);
+	} else
+		xy.x = xy.y = 0.;
+	if (P->mode) { /* Winkel Tripel */
+		xy.x = (xy.x + lp.lam * P->cosphi1) * 0.5;
+		xy.y = (xy.y + lp.phi) * 0.5;
+	}
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->inv = 0;
+	P->fwd = s_forward;
+	P->es = 0.;
+	return P;
+}
+ENTRY0(aitoff)
+	P->mode = 0;
+ENDENTRY(setup(P))
+ENTRY0(wintri)
+	P->mode = 1;
+	if (pj_param(P->params, "tlat_1").i)
+        {
+		if ((P->cosphi1 = cos(pj_param(P->params, "rlat_1").f)) == 0.)
+			E_ERROR(-22)
+        }
+	else /* 50d28' or acos(2/pi) */
+		P->cosphi1 = 0.636619772367581343;
+ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/rtodms.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/rtodms.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/rtodms.c	(revision 256)
@@ -0,0 +1,73 @@
+/* Convert radian argument to DMS ascii format */
+#ifndef lint
+static const char SCCSID[]="@(#)rtodms.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <projects.h>
+#include <stdio.h>
+#include <string.h>
+/*
+** RES is fractional second figures
+** RES60 = 60 * RES
+** CONV = 180 * 3600 * RES / PI (radians to RES seconds)
+*/
+	static double
+RES = 1000.,
+RES60 = 60000.,
+CONV = 206264806.24709635515796003417;
+	static char
+format[50] = "%dd%d'%.3f\"%c";
+	static int
+dolong = 0;
+	void
+set_rtodms(int fract, int con_w) {
+	int i;
+
+	if (fract >= 0 && fract < 9 ) {
+		RES = 1.;
+		/* following not very elegant, but used infrequently */
+		for (i = 0; i < fract; ++i)
+			RES *= 10.;
+		RES60 = RES * 60.;
+		CONV = 180. * 3600. * RES / PI;
+		if (! con_w)
+			(void)sprintf(format,"%%dd%%d'%%.%df\"%%c", fract);
+		else
+			(void)sprintf(format,"%%dd%%02d'%%0%d.%df\"%%c",
+				fract+2+(fract?1:0), fract);
+		dolong = con_w;
+	}
+}
+	char *
+rtodms(char *s, double r, int pos, int neg) {
+	int deg, min, sign;
+	char *ss = s;
+	double sec;
+
+	if (r < 0) {
+		r = -r;
+		if  (!pos) { *ss++ = '-'; sign = 0; }
+		else sign = neg;
+	} else
+		sign = pos;
+	r = floor(r * CONV + .5);
+	sec = fmod(r / RES, 60.);
+	r = floor(r / RES60);
+	min = fmod(r, 60.);
+	deg = r / 60.;
+	if (dolong)
+		(void)sprintf(ss,format,deg,min,sec,sign);
+	else if (sec) {
+		char *p, *q;
+
+		(void)sprintf(ss,format,deg,min,sec,sign);
+		for (q = p = ss + strlen(ss) - (sign ? 3 : 2); *p == '0'; --p) ;
+		if (*p != '.')
+			++p;
+		if (++q != p)
+			(void)strcpy(p, q);
+	} else if (min)
+		(void)sprintf(ss,"%dd%d'%c",deg,min,sign);
+	else
+		(void)sprintf(ss,"%dd%c",deg, sign);
+	return s;
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/proj.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/proj.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/proj.c	(revision 256)
@@ -0,0 +1,500 @@
+/* <<<< Cartographic projection filter program >>>> */
+#ifndef lint
+static const char SCCSID[]="@(#)proj.c	4.12	95/09/23	GIE	REL";
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <math.h>
+#include "projects.h"
+#include "emess.h"
+
+/* TK 1999-02-13 */
+#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__WIN32__)
+#  include <fcntl.h>
+#  include <io.h>
+#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#else
+#  define SET_BINARY_MODE(file)
+#endif
+/* ! TK 1999-02-13 */
+
+#define MAX_LINE 200
+#define MAX_PARGS 100
+#define PJ_INVERS(P) (P->inv ? 1 : 0)
+	static PJ
+*Proj;
+	static projUV
+(*proj)(projUV, PJ *);
+	static int
+reversein = 0,	/* != 0 reverse input arguments */
+reverseout = 0,	/* != 0 reverse output arguments */
+bin_in = 0,	/* != 0 then binary input */
+bin_out = 0,	/* != 0 then binary output */
+echoin = 0,	/* echo input data to output line */
+tag = '#',	/* beginning of line tag character */
+inverse = 0,	/* != 0 then inverse projection */
+prescale = 0,	/* != 0 apply cartesian scale factor */
+dofactors = 0,	/* determine scale factors */
+facs_bad = 0,	/* return condition from pj_factors */
+very_verby = 0, /* very verbose mode */
+postscale = 0;
+	static char
+*cheby_str,		/* string controlling Chebychev evaluation */
+*oform = (char *)0,	/* output format for x-y or decimal degrees */
+*oterr = "*\t*",	/* output line for unprojectable input */
+*usage =
+"%s\nusage: %s [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n";
+	static struct FACTORS
+facs;
+	static double
+(*informat)(const char *, char **),	/* input data deformatter function */
+fscale = 0.;	/* cartesian scale factor */
+	static projUV
+int_proj(projUV data) {
+	if (prescale) { data.u *= fscale; data.v *= fscale; }
+	data = (*proj)(data, Proj);
+	if (postscale && data.u != HUGE_VAL)
+		{ data.u *= fscale; data.v *= fscale; }
+	return(data);
+}
+	static void	/* file processing function */
+process(FILE *fid) {
+	char line[MAX_LINE+3], *s, pline[40];
+	projUV data;
+
+	for (;;) {
+		++emess_dat.File_line;
+		if (bin_in) {	/* binary input */
+			if (fread(&data, sizeof(projUV), 1, fid) != 1)
+				break;
+		} else {	/* ascii input */
+			if (!(s = fgets(line, MAX_LINE, fid)))
+				break;
+			if (!strchr(s, '\n')) { /* overlong line */
+				int c;
+				(void)strcat(s, "\n");
+				/* gobble up to newline */
+				while ((c = fgetc(fid)) != EOF && c != '\n') ;
+			}
+			if (*s == tag) {
+				if (!bin_out)
+					(void)fputs(line, stdout);
+				continue;
+			}
+			if (reversein) {
+				data.v = (*informat)(s, &s);
+				data.u = (*informat)(s, &s);
+			} else {
+				data.u = (*informat)(s, &s);
+				data.v = (*informat)(s, &s);
+			}
+			if (data.v == HUGE_VAL)
+				data.u = HUGE_VAL;
+			if (!*s && (s > line)) --s; /* assumed we gobbled \n */
+			if (!bin_out && echoin) {
+				int t;
+				t = *s;
+				*s = '\0';
+				(void)fputs(line, stdout);
+				*s = t;
+				putchar('\t');
+			}
+		}
+		if (data.u != HUGE_VAL) {
+			if (prescale) { data.u *= fscale; data.v *= fscale; }
+			if (dofactors && !inverse)
+				facs_bad = pj_factors(data, Proj, 0., &facs);
+			data = (*proj)(data, Proj);
+			if (dofactors && inverse)
+				facs_bad = pj_factors(data, Proj, 0., &facs);
+			if (postscale && data.u != HUGE_VAL)
+				{ data.u *= fscale; data.v *= fscale; }
+		}
+		if (bin_out) { /* binary output */
+			(void)fwrite(&data, sizeof(projUV), 1, stdout);
+			continue;
+		} else if (data.u == HUGE_VAL) /* error output */
+			(void)fputs(oterr, stdout);
+		else if (inverse && !oform) {	/*ascii DMS output */
+			if (reverseout) {
+				(void)fputs(rtodms(pline, data.v, 'N', 'S'), stdout);
+				putchar('\t');
+				(void)fputs(rtodms(pline, data.u, 'E', 'W'), stdout);
+			} else {
+				(void)fputs(rtodms(pline, data.u, 'E', 'W'), stdout);
+				putchar('\t');
+				(void)fputs(rtodms(pline, data.v, 'N', 'S'), stdout);
+			}
+		} else {	/* x-y or decimal degree ascii output */
+			if (inverse) {
+				data.v *= RAD_TO_DEG;
+				data.u *= RAD_TO_DEG;
+			}
+			if (reverseout) {
+				(void)printf(oform,data.v); putchar('\t');
+				(void)printf(oform,data.u);
+			} else {
+				(void)printf(oform,data.u); putchar('\t');
+				(void)printf(oform,data.v);
+			}
+		}
+		if (dofactors) /* print scale factor data */
+			if (!facs_bad)
+				(void)printf("\t<%g %g %g %g %g %g>",
+					facs.h, facs.k, facs.s,
+					facs.omega * RAD_TO_DEG, facs.a, facs.b);
+			else
+				(void)fputs("\t<* * * * * *>", stdout);
+		(void)fputs(bin_in ? "\n" : s, stdout);
+	}
+}
+	static void	/* file processing function --- verbosely */
+vprocess(FILE *fid) {
+	char line[MAX_LINE+3], *s, pline[40];
+	projUV dat_ll, dat_xy;
+	int linvers;
+
+	if (!oform)
+		oform = "%.3f";
+	if (bin_in || bin_out)
+		emess(1,"binary I/O not available in -V option");	
+	for (;;) {
+		++emess_dat.File_line;
+		if (!(s = fgets(line, MAX_LINE, fid)))
+			break;
+		if (!strchr(s, '\n')) { /* overlong line */
+			int c;
+			(void)strcat(s, "\n");
+			/* gobble up to newline */
+			while ((c = fgetc(fid)) != EOF && c != '\n') ;
+		}
+		if (*s == tag) { /* pass on data */
+			(void)fputs(s, stdout);
+			continue;
+		}
+		/* check to override default input mode */
+		if (*s == 'I' || *s == 'i') {
+			linvers = 1;
+			++s;
+		} else if (*s == 'I' || *s == 'i') {
+			linvers = 0;
+			++s;
+		} else
+			linvers = inverse;
+		if (linvers) {
+			if (!PJ_INVERS(Proj)) {
+				emess(-1,"inverse for this projection not avail.\n");
+				continue;
+			}
+			dat_xy.u = strtod(s, &s);
+			dat_xy.v = strtod(s, &s);
+			if (dat_xy.u == HUGE_VAL || dat_xy.v == HUGE_VAL) {
+				emess(-1,"lon-lat input conversion failure\n");
+				continue;
+			}
+			if (prescale) { dat_xy.u *= fscale; dat_xy.v *= fscale; }
+			dat_ll = pj_inv(dat_xy, Proj);
+		} else {
+			dat_ll.u = dmstor(s, &s);
+			dat_ll.v = dmstor(s, &s);
+			if (dat_ll.u == HUGE_VAL || dat_ll.v == HUGE_VAL) {
+				emess(-1,"lon-lat input conversion failure\n");
+				continue;
+			}
+			dat_xy = pj_fwd(dat_ll, Proj);
+			if (postscale) { dat_xy.u *= fscale; dat_xy.v *= fscale; }
+		}
+		if (pj_errno) {
+			emess(-1, pj_strerrno(pj_errno));
+			continue;
+		}
+		if (!*s && (s > line)) --s; /* assumed we gobbled \n */
+		if (pj_factors(dat_ll, Proj, 0., &facs)) {
+			emess(-1,"failed to conpute factors\n\n");
+			continue;
+		}
+		if (*s != '\n')
+			(void)fputs(s, stdout);
+		(void)fputs("Longitude: ", stdout);
+		(void)fputs(rtodms(pline, dat_ll.u, 'E', 'W'), stdout);
+		(void)printf(" [ %.11g ]\n", dat_ll.u * RAD_TO_DEG);
+		(void)fputs("Latitude:  ", stdout);
+		(void)fputs(rtodms(pline, dat_ll.v, 'N', 'S'), stdout);
+		(void)printf(" [ %.11g ]\n", dat_ll.v * RAD_TO_DEG);
+		(void)fputs("Easting (x):   ", stdout);
+		(void)printf(oform, dat_xy.u); putchar('\n');
+		(void)fputs("Northing (y):  ", stdout);
+		(void)printf(oform, dat_xy.v); putchar('\n');
+		(void)printf("Meridian scale (h)%c: %.8f  ( %.4g %% error )\n",
+			facs.code & IS_ANAL_HK ? '*' : ' ', facs.h, (facs.h-1.)*100.);
+		(void)printf("Parallel scale (k)%c: %.8f  ( %.4g %% error )\n",
+			facs.code & IS_ANAL_HK ? '*' : ' ', facs.k, (facs.k-1.)*100.);
+		(void)printf("Areal scale (s):     %.8f  ( %.4g %% error )\n",
+			facs.s, (facs.s-1.)*100.);
+		(void)printf("Angular distortion (w): %.3f\n", facs.omega *
+			RAD_TO_DEG);
+		(void)printf("Meridian/Parallel angle: %.5f\n",
+			facs.thetap * RAD_TO_DEG);
+		(void)printf("Convergence%c: ",facs.code & IS_ANAL_CONV ? '*' : ' ');
+		(void)fputs(rtodms(pline, facs.conv, 0, 0), stdout);
+		(void)printf(" [ %.8f ]\n", facs.conv * RAD_TO_DEG);
+		(void)printf("Max-min (Tissot axis a-b) scale error: %.5f %.5f\n\n",
+			facs.a, facs.b);
+	}
+}
+
+int main(int argc, char **argv) {
+    char *arg, **eargv = argv, *pargv[MAX_PARGS], **iargv = argv;
+    FILE *fid;
+    int pargc = 0, iargc = argc, eargc = 0, c, mon = 0;
+
+    if (emess_dat.Prog_name = strrchr(*argv,DIR_CHAR))
+        ++emess_dat.Prog_name;
+    else emess_dat.Prog_name = *argv;
+    inverse = ! strncmp(emess_dat.Prog_name, "inv", 3);
+    if (argc <= 1 ) {
+        (void)fprintf(stderr, usage, pj_get_release(), emess_dat.Prog_name);
+        exit (0);
+    }
+    /* process run line arguments */
+    while (--argc > 0) { /* collect run line arguments */
+        if(**++argv == '-') for(arg = *argv;;) {
+            switch(*++arg) {
+              case '\0': /* position of "stdin" */
+                if (arg[-1] == '-') eargv[eargc++] = "-";
+                break;
+              case 'b': /* binary I/O */
+                bin_in = bin_out = 1;
+                continue;
+              case 'v': /* monitor dump of initialization */
+                mon = 1;
+                continue;
+              case 'i': /* input binary */
+                bin_in = 1;
+                continue;
+              case 'o': /* output binary */
+                bin_out = 1;
+                continue;
+              case 'I': /* alt. method to spec inverse */
+                inverse = 1;
+                continue;
+              case 'E': /* echo ascii input to ascii output */
+                echoin = 1;
+                continue;
+              case 'V': /* very verbose processing mode */
+                very_verby = 1;
+                mon = 1;
+              case 'S': /* compute scale factors */
+                dofactors = 1;
+                continue;
+              case 't': /* set col. one char */
+                if (arg[1]) tag = *++arg;
+                else emess(1,"missing -t col. 1 tag");
+                continue;
+              case 'l': /* list projections, ellipses or units */
+                if (!arg[1] || arg[1] == 'p' || arg[1] == 'P') {
+                    /* list projections */
+                    struct PJ_LIST *lp;
+                    int do_long = arg[1] == 'P', c;
+                    char *str;
+
+                    for (lp = pj_get_list_ref() ; lp->id ; ++lp) {
+                        if( strcmp(lp->id,"latlong") == 0 
+                            || strcmp(lp->id,"longlat") == 0 
+                            || strcmp(lp->id,"geocent") == 0 )
+                            continue;
+
+                        (void)printf("%s : ", lp->id);
+                        if (do_long)  /* possibly multiline description */
+                            (void)puts(*lp->descr);
+                        else { /* first line, only */
+                            str = *lp->descr;
+                            while ((c = *str++) && c != '\n')
+                                putchar(c);
+                            putchar('\n');
+                        }
+                    }
+                } else if (arg[1] == '=') { /* list projection 'descr' */
+                    struct PJ_LIST *lp;
+
+                    arg += 2;
+                    for (lp = pj_get_list_ref(); lp->id ; ++lp)
+                        if (!strcmp(lp->id, arg)) {
+                            (void)printf("%9s : %s\n", lp->id, *lp->descr);
+                            break;
+                        }
+                } else if (arg[1] == 'e') { /* list ellipses */
+                    struct PJ_ELLPS *le;
+
+                    for (le = pj_get_ellps_ref(); le->id ; ++le)
+                        (void)printf("%9s %-16s %-16s %s\n",
+                                     le->id, le->major, le->ell, le->name);
+                } else if (arg[1] == 'u') { /* list units */
+                    struct PJ_UNITS *lu;
+
+                    for (lu = pj_get_units_ref(); lu->id ; ++lu)
+                        (void)printf("%12s %-20s %s\n",
+                                     lu->id, lu->to_meter, lu->name);
+                } else if (arg[1] == 'd') { /* list datums */
+                    struct PJ_DATUMS *ld;
+
+                    printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" );
+                    for (ld = pj_get_datums_ref(); ld->id ; ++ld)
+                    {
+                        printf("%12s %-12s %-30s\n",
+                               ld->id, ld->ellipse_id, ld->defn);
+                        if( ld->comments != NULL && strlen(ld->comments) > 0 )
+                            printf( "%25s %s\n", " ", ld->comments );
+                    }
+                } else
+                    emess(1,"invalid list option: l%c",arg[1]);
+                exit(0);
+                continue; /* artificial */
+              case 'e': /* error line alternative */
+                if (--argc <= 0)
+                    noargument:			   
+                emess(1,"missing argument for -%c",*arg);
+                oterr = *++argv;
+                continue;
+              case 'T': /* generate Chebyshev coefficients */
+                if (--argc <= 0) goto noargument;
+                cheby_str = *++argv;
+                continue;
+              case 'm': /* cartesian multiplier */
+                if (--argc <= 0) goto noargument;
+                postscale = 1;
+                if (!strncmp("1/",*++argv,2) || 
+                    !strncmp("1:",*argv,2)) {
+                    if((fscale = atof((*argv)+2)) == 0.)
+                        goto badscale;
+                    fscale = 1. / fscale;
+                } else
+                    if ((fscale = atof(*argv)) == 0.) {
+                      badscale:
+                        emess(1,"invalid scale argument");
+                    }
+                continue;
+              case 'W': /* specify seconds precision */
+              case 'w': /* -W for constant field width */
+                if ((c = arg[1]) != 0 && isdigit(c)) {
+                    set_rtodms(c - '0', *arg == 'W');
+                    ++arg;
+                } else
+                    emess(1,"-W argument missing or non-digit");
+                continue;
+              case 'f': /* alternate output format degrees or xy */
+                if (--argc <= 0) goto noargument;
+                oform = *++argv;
+                continue;
+              case 'r': /* reverse input */
+                reversein = 1;
+                continue;
+              case 's': /* reverse output */
+                reverseout = 1;
+                continue;
+              default:
+                emess(1, "invalid option: -%c",*arg);
+                break;
+            }
+            break;
+        } else if (**argv == '+') { /* + argument */
+            if (pargc < MAX_PARGS)
+                pargv[pargc++] = *argv + 1;
+            else
+                emess(1,"overflowed + argument table");
+        } else /* assumed to be input file name(s) */
+            eargv[eargc++] = *argv;
+    }
+    if (eargc == 0 && !cheby_str) /* if no specific files force sysin */
+        eargv[eargc++] = "-";
+    else if (eargc > 0 && cheby_str) /* warning */
+        emess(4, "data files when generating Chebychev prohibited");
+    /* done with parameter and control input */
+    if (inverse && postscale) {
+        prescale = 1;
+        postscale = 0;
+        fscale = 1./fscale;
+    }
+    if (!(Proj = pj_init(pargc, pargv)))
+        emess(3,"projection initialization failure\ncause: %s",
+              pj_strerrno(pj_errno));
+
+    if( pj_is_latlong( Proj ) )
+    {
+        emess( 3, "+proj=latlong unsuitable for use with proj program." );
+        exit( 0 );
+    }
+
+    if (inverse) {
+        if (!Proj->inv)
+            emess(3,"inverse projection not available");
+        proj = pj_inv;
+    } else
+        proj = pj_fwd;
+    if (cheby_str) {
+        extern void gen_cheb(int, projUV(*)(projUV), char *, PJ *, int, char **);
+
+        gen_cheb(inverse, int_proj, cheby_str, Proj, iargc, iargv);
+        exit(0);
+    }
+    /* set input formating control */
+    if (mon) {
+        pj_pr_list(Proj);
+        if (very_verby) {
+            (void)printf("#Final Earth figure: ");
+            if (Proj->es) {
+                (void)printf("ellipsoid\n#  Major axis (a): ");
+                (void)printf(oform ? oform : "%.3f", Proj->a);
+                (void)printf("\n#  1/flattening: %.6f\n",
+                             1./(1. - sqrt(1. - Proj->es)));
+                (void)printf("#  squared eccentricity: %.12f\n", Proj->es);
+            } else {
+                (void)printf("sphere\n#  Radius: ");
+                (void)printf(oform ? oform : "%.3f", Proj->a);
+                (void)putchar('\n');
+            }
+        }
+    }
+    if (inverse)
+        informat = strtod;
+    else {
+        informat = dmstor;
+        if (!oform)
+            oform = "%.2f";
+    }
+
+    if (bin_out)
+    {
+        SET_BINARY_MODE(stdout);
+    }
+
+    /* process input file list */
+    for ( ; eargc-- ; ++eargv) {
+        if (**eargv == '-') {
+            fid = stdin;
+            emess_dat.File_name = "<stdin>";
+
+            if (bin_in)
+            {
+                SET_BINARY_MODE(stdin);
+            }
+
+        } else {
+            if ((fid = fopen(*eargv, "rb")) == NULL) {
+                emess(-2, *eargv, "input file");
+                continue;
+            }
+            emess_dat.File_name = *eargv;
+        }
+        emess_dat.File_line = 0;
+        if (very_verby)
+            vprocess(fid);
+        else
+            process(fid);
+        (void)fclose(fid);
+        emess_dat.File_name = 0;
+    }
+    exit(0); /* normal completion */
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bacon.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bacon.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_bacon.c	(revision 256)
@@ -0,0 +1,44 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_bacon.c	4.1	94/02/15	GIE	REL";
+#endif
+# define HLFPI2	2.46740110027233965467
+# define EPS	1e-10
+#define PROJ_PARMS__ \
+	int bacn; \
+	int ortl;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(apian, "Apian Globular I") "\n\tMisc Sph, no inv.";
+PROJ_HEAD(ortel, "Ortelius Oval") "\n\tMisc Sph, no inv.";
+PROJ_HEAD(bacon, "Bacon Globular") "\n\tMisc Sph, no inv.";
+FORWARD(s_forward); /* spheroid */
+	double ax, f;
+
+	xy.y = P->bacn ? HALFPI * sin(lp.phi) : lp.phi;
+	if ((ax = fabs(lp.lam)) >= EPS) {
+		if (P->ortl && ax >= HALFPI)
+			xy.x = sqrt(HLFPI2 - lp.phi * lp.phi + EPS) + ax - HALFPI;
+		else {
+			f = 0.5 * (HLFPI2 / ax + ax);
+			xy.x = ax - f + sqrt(f * f - xy.y * xy.y);
+		}
+		if (lp.lam < 0.) xy.x = - xy.x;
+	} else
+		xy.x = 0.;
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(bacon)
+	P->bacn = 1;
+	P->ortl = 0;
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
+ENTRY0(apian)
+	P->bacn = P->ortl = 0;
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
+ENTRY0(ortel)
+	P->bacn = 0;
+	P->ortl = 1;
+	P->es = 0.; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck2.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck2.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_eck2.c	(revision 256)
@@ -0,0 +1,31 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_eck2.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl. Sph.";
+#define FXC	0.46065886596178063902
+#define FYC	1.44720250911653531871
+#define C13	0.33333333333333333333
+#define ONEEPS	1.0000001
+FORWARD(s_forward); /* spheroid */
+	xy.x = FXC * lp.lam * (xy.y = sqrt(4. - 3. * sin(fabs(lp.phi))));
+	xy.y = FYC * (2. - xy.y);
+	if ( lp.phi < 0.) xy.y = -xy.y;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.lam = xy.x / (FXC * ( lp.phi = 2. - fabs(xy.y) / FYC) );
+	lp.phi = (4. - lp.phi * lp.phi) * C13;
+	if (fabs(lp.phi) >= 1.) {
+		if (fabs(lp.phi) > ONEEPS)	I_ERROR
+		else
+			lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
+	} else
+		lp.phi = asin(lp.phi);
+	if (xy.y < 0)
+		lp.phi = -lp.phi;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(eck2); P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbtfpp.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbtfpp.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_mbtfpp.c	(revision 256)
@@ -0,0 +1,35 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_mbtfpp.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl., Sph.";
+#define CS	.95257934441568037152
+#define FXC	.92582009977255146156
+#define FYC	3.40168025708304504493
+#define C23	.66666666666666666666
+#define C13	.33333333333333333333
+#define ONEEPS	1.0000001
+FORWARD(s_forward); /* spheroid */
+	lp.phi = asin(CS * sin(lp.phi));
+	xy.x = FXC * lp.lam * (2. * cos(C23 * lp.phi) - 1.);
+	xy.y = FYC * sin(C13 * lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / FYC;
+	if (fabs(lp.phi) >= 1.) {
+		if (fabs(lp.phi) > ONEEPS)	I_ERROR
+		else	lp.phi = (lp.phi < 0.) ? -HALFPI : HALFPI;
+	} else
+		lp.phi = asin(lp.phi);
+	lp.lam = xy.x / ( FXC * (2. * cos(C23 * (lp.phi *= 3.)) - 1.) );
+	if (fabs(lp.phi = sin(lp.phi) / CS) >= 1.) {
+		if (fabs(lp.phi) > ONEEPS)	I_ERROR
+		else	lp.phi = (lp.phi < 0.) ? -HALFPI : HALFPI;
+	} else
+		lp.phi = asin(lp.phi);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(mbtfpp) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_latlong.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_latlong.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_latlong.c	(revision 256)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * $Id: pj_latlong.c,v 1.2 2000/07/07 06:04:23 warmerda Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Stub projection implementation for lat/long coordinates. We 
+ *           don't actually change the coordinates, but we want proj=latlong
+ *           to act sort of like a projection.
+ * Author:   Frank Warmerdam, warmerda@home.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: pj_latlong.c,v $
+ * Revision 1.2  2000/07/07 06:04:23  warmerda
+ * added longlat alias
+ *
+ * Revision 1.1  2000/07/06 23:32:27  warmerda
+ * New
+ *
+ */
+
+/* very loosely based upon DMA code by Bradford W. Drew */
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(latlong, "Lat/long (Geodetic)")  "\n\t";
+PROJ_HEAD(longlat, "Lat/long (Geodetic)")  "\n\t";
+
+FORWARD(forward);
+
+        xy.x = lp.lam / P->a;
+        xy.y = lp.phi / P->a;
+        return xy;
+}
+INVERSE(inverse);
+
+        lp.phi = xy.y * P->a;
+        lp.lam = xy.x * P->a;
+        return lp;
+}
+FREEUP; if (P) pj_dalloc(P); }
+
+ENTRY0(latlong)
+        P->is_latlong = 1;
+        P->x0 = 0.0;
+        P->y0 = 0.0;
+	P->inv = inverse; P->fwd = forward;
+ENDENTRY(P)
+
+ENTRY0(longlat)
+        P->is_latlong = 1;
+        P->x0 = 0.0;
+        P->y0 = 0.0;
+	P->inv = inverse; P->fwd = forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_boggs.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_boggs.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_boggs.c	(revision 256)
@@ -0,0 +1,35 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_boggs.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph.";
+# define NITER	20
+# define EPS	1e-7
+# define ONETOL 1.000001
+# define FXC	2.00276
+# define FXC2	1.11072
+# define FYC	0.49931
+# define FYC2	1.41421356237309504880
+FORWARD(s_forward); /* spheroid */
+	double theta, th1, c;
+	int i;
+
+	theta = lp.phi;
+	if (fabs(fabs(lp.phi) - HALFPI) < EPS)
+		xy.x = 0.;
+	else {
+		c = sin(theta) * PI;
+		for (i = NITER; i; --i) {
+			theta -= th1 = (theta + sin(theta) - c) /
+				(1. + cos(theta));
+			if (fabs(th1) < EPS) break;
+		}
+		theta *= 0.5;
+		xy.x = FXC * lp.lam / (1. / cos(lp.phi) + FXC2 / cos(theta));
+	}
+	xy.y = FYC * (lp.phi + FYC2 * sin(theta));
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(boggs) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag3.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag3.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag3.c	(revision 256)
@@ -0,0 +1,27 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_wag3.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	C_x;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.";
+#define TWOTHIRD 0.6666666666666666666667
+FORWARD(s_forward); /* spheroid */
+	xy.x = P->C_x * lp.lam * cos(TWOTHIRD * lp.phi);
+	xy.y = lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y;
+	lp.lam = xy.x / (P->C_x * cos(TWOTHIRD * lp.phi));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(wag3)
+	double ts;
+
+	ts = pj_param(P->params, "rlat_ts").f;
+	P->C_x = cos(ts) / cos(2.*ts/3.);
+	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_inv.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_inv.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/geod_inv.c	(revision 256)
@@ -0,0 +1,59 @@
+#ifndef lint
+static const char SCCSID[]="@(#)geod_inv.c	4.5	95/09/23	GIE	REL";
+#endif
+# include "projects.h"
+# include "geodesic.h"
+# define DTOL	1e-12
+	void
+geod_inv(void) {
+	double	th1,th2,thm,dthm,dlamm,dlam,sindlamm,costhm,sinthm,cosdthm,
+		sindthm,L,E,cosd,d,X,Y,T,sind,tandlammp,u,v,D,A,B;
+
+	if (ellipse) {
+		th1 = atan(onef * tan(phi1));
+		th2 = atan(onef * tan(phi2));
+	} else {
+		th1 = phi1;
+		th2 = phi2;
+	}
+	thm = .5 * (th1 + th2);
+	dthm = .5 * (th2 - th1);
+	dlamm = .5 * ( dlam = adjlon(lam2 - lam1) );
+	if (fabs(dlam) < DTOL && fabs(dthm) < DTOL) {
+		al12 =  al21 = geod_S = 0.;
+		return;
+	}
+	sindlamm = sin(dlamm);
+	costhm = cos(thm);	sinthm = sin(thm);
+	cosdthm = cos(dthm);	sindthm = sin(dthm);
+	L = sindthm * sindthm + (cosdthm * cosdthm - sinthm * sinthm)
+		* sindlamm * sindlamm;
+	d = acos(cosd = 1 - L - L);
+	if (ellipse) {
+		E = cosd + cosd;
+		sind = sin( d );
+		Y = sinthm * cosdthm;
+		Y *= (Y + Y) / (1. - L);
+		T = sindthm * costhm;
+		T *= (T + T) / L;
+		X = Y + T;
+		Y -= T;
+		T = d / sind;
+		D = 4. * T * T;
+		A = D * E;
+		B = D + D;
+		geod_S = geod_a * sind * (T - f4 * (T * X - Y) +
+			f64 * (X * (A + (T - .5 * (A - E)) * X) -
+			Y * (B + E * Y) + D * X * Y));
+		tandlammp = tan(.5 * (dlam - .25 * (Y + Y - E * (4. - X)) *
+			(f2 * T + f64 * (32. * T - (20. * T - A)
+			* X - (B + 4.) * Y)) * tan(dlam)));
+	} else {
+		geod_S = geod_a * d;
+		tandlammp = tan(dlamm);
+	}
+	u = atan2(sindthm , (tandlammp * costhm));
+	v = atan2(cosdthm , (tandlammp * sinthm));
+	al12 = adjlon(TWOPI + v - u);
+	al21 = adjlon(TWOPI - v - u);
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_laea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_laea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_laea.c	(revision 256)
@@ -0,0 +1,230 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_laea.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	sinb1; \
+	double	cosb1; \
+	double	xmf; \
+	double	ymf; \
+	double	mmf; \
+	double	qp; \
+	double	dd; \
+	double	rq; \
+	double	*apa; \
+	int		mode;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") "\n\tAzi, Sph&Ell";
+#define sinph0	P->sinb1
+#define cosph0	P->cosb1
+#define EPS10	1.e-10
+#define NITER	20
+#define CONV	1.e-10
+#define N_POLE	0
+#define S_POLE	1
+#define EQUIT	2
+#define OBLIQ	3
+FORWARD(e_forward); /* ellipsoid */
+	double coslam, sinlam, sinphi, q, sinb=0.0, cosb=0.0, b=0.0;
+
+	coslam = cos(lp.lam);
+	sinlam = sin(lp.lam);
+	sinphi = sin(lp.phi);
+	q = pj_qsfn(sinphi, P->e, P->one_es);
+	if (P->mode == OBLIQ || P->mode == EQUIT) {
+		sinb = q / P->qp;
+		cosb = sqrt(1. - sinb * sinb);
+	}
+	switch (P->mode) {
+	case OBLIQ:
+		b = 1. + P->sinb1 * sinb + P->cosb1 * cosb * coslam;
+		break;
+	case EQUIT:
+		b = 1. + cosb * coslam;
+		break;
+	case N_POLE:
+		b = HALFPI + lp.phi;
+		q = P->qp - q;
+		break;
+	case S_POLE:
+		b = lp.phi - HALFPI;
+		q = P->qp + q;
+		break;
+	}
+	if (fabs(b) < EPS10) F_ERROR;
+	switch (P->mode) {
+	case OBLIQ:
+		xy.y = P->ymf * ( b = sqrt(2. / b) )
+		   * (P->cosb1 * sinb - P->sinb1 * cosb * coslam);
+		goto eqcon;
+		break;
+	case EQUIT:
+		xy.y = (b = sqrt(2. / (1. + cosb * coslam))) * sinb * P->ymf; 
+eqcon:
+		xy.x = P->xmf * b * cosb * sinlam;
+		break;
+	case N_POLE:
+	case S_POLE:
+		if (q >= 0.) {
+			xy.x = (b = sqrt(q)) * sinlam;
+			xy.y = coslam * (P->mode == S_POLE ? b : -b);
+		} else
+			xy.x = xy.y = 0.;
+		break;
+	}
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	double  coslam, cosphi, sinphi;
+
+	sinphi = sin(lp.phi);
+	cosphi = cos(lp.phi);
+	coslam = cos(lp.lam);
+	switch (P->mode) {
+	case EQUIT:
+		xy.y = 1. + cosphi * coslam;
+		goto oblcon;
+	case OBLIQ:
+		xy.y = 1. + sinph0 * sinphi + cosph0 * cosphi * coslam;
+oblcon:
+		if (xy.y <= EPS10) F_ERROR;
+		xy.x = (xy.y = sqrt(2. / xy.y)) * cosphi * sin(lp.lam);
+		xy.y *= P->mode == EQUIT ? sinphi :
+		   cosph0 * sinphi - sinph0 * cosphi * coslam;
+		break;
+	case N_POLE:
+		coslam = -coslam;
+	case S_POLE:
+		if (fabs(lp.phi + P->phi0) < EPS10) F_ERROR;
+		xy.y = FORTPI - lp.phi * .5;
+		xy.y = 2. * (P->mode == S_POLE ? cos(xy.y) : sin(xy.y));
+		xy.x = xy.y * sin(lp.lam);
+		xy.y *= coslam;
+		break;
+	}
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	double cCe, sCe, q, rho, ab=0.0;
+
+	switch (P->mode) {
+	case EQUIT:
+	case OBLIQ:
+		if ((rho = hypot(xy.x /= P->dd, xy.y *=  P->dd)) < EPS10) {
+			lp.lam = 0.;
+			lp.phi = P->phi0;
+			return (lp);
+		}
+		cCe = cos(sCe = 2. * asin(.5 * rho / P->rq));
+		xy.x *= (sCe = sin(sCe));
+		if (P->mode == OBLIQ) {
+			q = P->qp * (ab = cCe * P->sinb1 + xy.y * sCe * P->cosb1 / rho);
+			xy.y = rho * P->cosb1 * cCe - xy.y * P->sinb1 * sCe;
+		} else {
+			q = P->qp * (ab = xy.y * sCe / rho);
+			xy.y = rho * cCe;
+		}
+		break;
+	case N_POLE:
+		xy.y = -xy.y;
+	case S_POLE:
+		if (!(q = (xy.x * xy.x + xy.y * xy.y)) ) {
+			lp.lam = 0.;
+			lp.phi = P->phi0;
+			return (lp);
+		}
+		/*
+		q = P->qp - q;
+		*/
+		ab = 1. - q / P->qp;
+		if (P->mode == S_POLE)
+			ab = - ab;
+		break;
+	}
+	lp.lam = atan2(xy.x, xy.y);
+	lp.phi = pj_authlat(asin(ab), P->apa);
+	return (lp);
+}
+INVERSE(s_inverse); /* spheroid */
+	double  cosz=0.0, rh, sinz=0.0;
+
+	rh = hypot(xy.x, xy.y);
+	if ((lp.phi = rh * .5 ) > 1.) I_ERROR;
+	lp.phi = 2. * asin(lp.phi);
+	if (P->mode == OBLIQ || P->mode == EQUIT) {
+		sinz = sin(lp.phi);
+		cosz = cos(lp.phi);
+	}
+	switch (P->mode) {
+	case EQUIT:
+		lp.phi = fabs(rh) <= EPS10 ? 0. : asin(xy.y * sinz / rh);
+		xy.x *= sinz;
+		xy.y = cosz * rh;
+		break;
+	case OBLIQ:
+		lp.phi = fabs(rh) <= EPS10 ? P->phi0 :
+		   asin(cosz * sinph0 + xy.y * sinz * cosph0 / rh);
+		xy.x *= sinz * cosph0;
+		xy.y = (cosz - sin(lp.phi) * sinph0) * rh;
+		break;
+	case N_POLE:
+		xy.y = -xy.y;
+		lp.phi = HALFPI - lp.phi;
+		break;
+	case S_POLE:
+		lp.phi -= HALFPI;
+		break;
+	}
+	lp.lam = (xy.y == 0. && (P->mode == EQUIT || P->mode == OBLIQ)) ?
+		0. : atan2(xy.x, xy.y);
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(laea)
+	double t;
+
+	if (fabs((t = fabs(P->phi0)) - HALFPI) < EPS10)
+		P->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+	else if (fabs(t) < EPS10)
+		P->mode = EQUIT;
+	else
+		P->mode = OBLIQ;
+	if (P->es) {
+		double sinphi;
+
+		P->e = sqrt(P->es);
+		P->qp = pj_qsfn(1., P->e, P->one_es);
+		P->mmf = .5 / (1. - P->es);
+		P->apa = pj_authset(P->es);
+		switch (P->mode) {
+		case N_POLE:
+		case S_POLE:
+			P->dd = 1.;
+			break;
+		case EQUIT:
+			P->dd = 1. / (P->rq = sqrt(.5 * P->qp));
+			P->xmf = 1.;
+			P->ymf = .5 * P->qp;
+			break;
+		case OBLIQ:
+			P->rq = sqrt(.5 * P->qp);
+			sinphi = sin(P->phi0);
+			P->sinb1 = pj_qsfn(sinphi, P->e, P->one_es) / P->qp;
+			P->cosb1 = sqrt(1. - P->sinb1 * P->sinb1);
+			P->dd = cos(P->phi0) / (sqrt(1. - P->es * sinphi * sinphi) *
+			   P->rq * P->cosb1);
+			P->ymf = (P->xmf = P->rq) / P->dd;
+			P->xmf *= P->dd;
+			break;
+		}
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else {
+		if (P->mode == OBLIQ) {
+			sinph0 = sin(P->phi0);
+			cosph0 = cos(P->phi0);
+		}
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag7.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag7.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_wag7.c	(revision 256)
@@ -0,0 +1,17 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_wag7.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(wag7, "Wagner VII") "\n\tMisc Sph, no inv.";
+FORWARD(s_forward); /* sphere */
+	double theta, ct, D;
+
+	theta = asin(xy.y = 0.90630778703664996 * sin(lp.phi));
+	xy.x = 2.66723 * (ct = cos(theta)) * sin(lp.lam /= 3.);
+	xy.y *= 1.24104 * (D = 1/(sqrt(0.5 * (1 + ct * cos(lp.lam)))));
+	xy.x *= D;
+	return (xy);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(wag7) P->fwd = s_forward; P->inv = 0; P->es = 0.; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_robin.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_robin.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_robin.c	(revision 256)
@@ -0,0 +1,108 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_robin.c	4.1 94/02/15     GIE     REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph.";
+#define V(C,z) (C.c0 + z * (C.c1 + z * (C.c2 + z * C.c3)))
+#define DV(C,z) (C.c1 + z * (C.c2 + C.c2 + z * 3. * C.c3))
+/* note: following terms based upon 5 deg. intervals in degrees. */
+static struct COEFS {
+	float c0, c1, c2, c3;
+} X[] = {
+1,	-5.67239e-12,	-7.15511e-05,	3.11028e-06,
+0.9986,	-0.000482241,	-2.4897e-05,	-1.33094e-06,
+0.9954,	-0.000831031,	-4.4861e-05,	-9.86588e-07,
+0.99,	-0.00135363,	-5.96598e-05,	3.67749e-06,
+0.9822,	-0.00167442,	-4.4975e-06,	-5.72394e-06,
+0.973,	-0.00214869,	-9.03565e-05,	1.88767e-08,
+0.96,	-0.00305084,	-9.00732e-05,	1.64869e-06,
+0.9427,	-0.00382792,	-6.53428e-05,	-2.61493e-06,
+0.9216,	-0.00467747,	-0.000104566,	4.8122e-06,
+0.8962,	-0.00536222,	-3.23834e-05,	-5.43445e-06,
+0.8679,	-0.00609364,	-0.0001139,	3.32521e-06,
+0.835,	-0.00698325,	-6.40219e-05,	9.34582e-07,
+0.7986,	-0.00755337,	-5.00038e-05,	9.35532e-07,
+0.7597,	-0.00798325,	-3.59716e-05,	-2.27604e-06,
+0.7186,	-0.00851366,	-7.0112e-05,	-8.63072e-06,
+0.6732,	-0.00986209,	-0.000199572,	1.91978e-05,
+0.6213,	-0.010418,	8.83948e-05,	6.24031e-06,
+0.5722,	-0.00906601,	0.000181999,	6.24033e-06,
+0.5322, 0.,0.,0.  },
+Y[] = {
+0,	0.0124,	3.72529e-10,	1.15484e-09,
+0.062,	0.0124001,	1.76951e-08,	-5.92321e-09,
+0.124,	0.0123998,	-7.09668e-08,	2.25753e-08,
+0.186,	0.0124008,	2.66917e-07,	-8.44523e-08,
+0.248,	0.0123971,	-9.99682e-07,	3.15569e-07,
+0.31,	0.0124108,	3.73349e-06,	-1.1779e-06,
+0.372,	0.0123598,	-1.3935e-05,	4.39588e-06,
+0.434,	0.0125501,	5.20034e-05,	-1.00051e-05,
+0.4968,	0.0123198,	-9.80735e-05,	9.22397e-06,
+0.5571,	0.0120308,	4.02857e-05,	-5.2901e-06,
+0.6176,	0.0120369,	-3.90662e-05,	7.36117e-07,
+0.6769,	0.0117015,	-2.80246e-05,	-8.54283e-07,
+0.7346,	0.0113572,	-4.08389e-05,	-5.18524e-07,
+0.7903,	0.0109099,	-4.86169e-05,	-1.0718e-06,
+0.8435,	0.0103433,	-6.46934e-05,	5.36384e-09,
+0.8936,	0.00969679,	-6.46129e-05,	-8.54894e-06,
+0.9394,	0.00840949,	-0.000192847,	-4.21023e-06,
+0.9761,	0.00616525,	-0.000256001,	-4.21021e-06,
+1., 0.,0.,0 };
+#define FXC	0.8487
+#define FYC	1.3523
+#define C1	11.45915590261646417544
+#define RC1	0.08726646259971647884
+#define NODES	18
+#define ONEEPS	1.000001
+#define EPS	1e-8
+FORWARD(s_forward); /* spheroid */
+	int i;
+	double dphi;
+
+	i = floor((dphi = fabs(lp.phi)) * C1);
+	if (i >= NODES) i = NODES - 1;
+	dphi = RAD_TO_DEG * (dphi - RC1 * i);
+	xy.x = V(X[i], dphi) * FXC * lp.lam;
+	xy.y = V(Y[i], dphi) * FYC;
+	if (lp.phi < 0.) xy.y = -xy.y;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	int i;
+	double t, t1;
+	struct COEFS T;
+
+	lp.lam = xy.x / FXC;
+	lp.phi = fabs(xy.y / FYC);
+	if (lp.phi >= 1.) { /* simple pathologic cases */
+		if (lp.phi > ONEEPS) I_ERROR
+		else {
+			lp.phi = xy.y < 0. ? -HALFPI : HALFPI;
+			lp.lam /= X[NODES].c0;
+		}
+	} else { /* general problem */
+		/* in Y space, reduce to table interval */
+		for (i = floor(lp.phi * NODES);;) {
+			if (Y[i].c0 > lp.phi) --i;
+			else if (Y[i+1].c0 <= lp.phi) ++i;
+			else break;
+		}
+		T = Y[i];
+		/* first guess, linear interp */
+		t = 5. * (lp.phi - T.c0)/(Y[i+1].c0 - T.c0);
+		/* make into root */
+		T.c0 -= lp.phi;
+		for (;;) { /* Newton-Raphson reduction */
+			t -= t1 = V(T,t) / DV(T,t);
+			if (fabs(t1) < EPS)
+				break;
+		}
+		lp.phi = (5 * i + t) * DEG_TO_RAD;
+		if (xy.y < 0.) lp.phi = -lp.phi;
+		lp.lam /= V(X[i], t);
+	}
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(robin) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_tsfn.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_tsfn.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/pj_tsfn.c	(revision 256)
@@ -0,0 +1,13 @@
+/* determine small t */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_tsfn.c	4.3	93/06/12	GIE	REL";
+#endif
+#include <math.h>
+#include <projects.h>
+#define HALFPI		1.5707963267948966
+	double
+pj_tsfn(double phi, double sinphi, double e) {
+	sinphi *= e;
+	return (tan (.5 * (HALFPI - phi)) /
+	   pow((1. - sinphi) / (1. + sinphi), .5 * e));
+}
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp3.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp3.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_putp3.c	(revision 256)
@@ -0,0 +1,29 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_putp3.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double	A;
+#define PJ_LIB__
+# include	<projects.h>
+PROJ_HEAD(putp3, "Putnins P3") "\n\tPCyl., Sph.";
+PROJ_HEAD(putp3p, "Putnins P3'") "\n\tPCyl., no inv., Sph.";
+#define C	0.79788456
+#define RPISQ	0.1013211836
+FORWARD(s_forward); /* spheroid */
+	xy.x = C * lp.lam * (1. - P->A * lp.phi * lp.phi);
+	xy.y = C * lp.phi;
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = xy.y / C;
+	lp.lam = xy.x / (C * (1. - P->A * lp.phi * lp.phi));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+	static PJ *
+setup(PJ *P) {
+	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
+	return P;
+}
+ENTRY0(putp3)  P->A = 4. * RPISQ; ENDENTRY(setup(P))
+ENTRY0(putp3p) P->A = 2. * RPISQ; ENDENTRY(setup(P))
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tcea.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tcea.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_tcea.c	(revision 256)
@@ -0,0 +1,30 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_tcea.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double rk0;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(tcea, "Transverse Cylindrical Equal Area") "\n\tCyl, Sph";
+FORWARD(s_forward); /* spheroid */
+	xy.x = P->rk0 * cos(lp.phi) * sin(lp.lam);
+	xy.y = P->k0 * (atan2(tan(lp.phi), cos(lp.lam)) - P->phi0);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double t;
+
+	xy.y = xy.y * P->rk0 + P->phi0;
+	xy.x *= P->k0;
+	t = sqrt(1. - xy.x * xy.x);
+	lp.phi = asin(t * sin(xy.y));
+	lp.lam = atan2(xy.x, t * cos(xy.y));
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(tcea)
+	P->rk0 = 1 / P->k0;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+	P->es = 0.;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_fouc_s.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_fouc_s.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_fouc_s.c	(revision 256)
@@ -0,0 +1,48 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_fouc_s.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PROJ_PARMS__ \
+	double n, n1;
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl., Sph.";
+#define MAX_ITER    10
+#define LOOP_TOL    1e-7
+FORWARD(s_forward); /* spheroid */
+	double t;
+
+	t = cos(lp.phi);
+	xy.x = lp.lam * t / (P->n + P->n1 * t);
+	xy.y = P->n * lp.phi + P->n1 * sin(lp.phi);
+	return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+	double V;
+	int i;
+
+	if (P->n) {
+		lp.phi = xy.y;
+		for (i = MAX_ITER; i ; --i) {
+			lp.phi -= V = (P->n * lp.phi + P->n1 * sin(lp.phi) - xy.y ) /
+				(P->n + P->n1 * cos(lp.phi));
+			if (fabs(V) < LOOP_TOL)
+				break;
+		}
+		if (!i)
+			lp.phi = xy.y < 0. ? -HALFPI : HALFPI;
+	} else
+		lp.phi = aasin(xy.y);
+	V = cos(lp.phi);
+	lp.lam = xy.x * (P->n + P->n1 * V) / V;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(fouc_s)
+	P->n = pj_param(P->params, "dn").f;
+	if (P->n < 0. || P->n > 1.)
+		E_ERROR(-99)
+	P->n1 = 1. - P->n;
+	P->es = 0;
+	P->inv = s_inverse;
+	P->fwd = s_forward;
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_merc.c
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_merc.c	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/src/PJ_merc.c	(revision 256)
@@ -0,0 +1,50 @@
+#ifndef lint
+static const char SCCSID[]="@(#)PJ_merc.c	4.1	94/02/15	GIE	REL";
+#endif
+#define PJ_LIB__
+#include	<projects.h>
+PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts=";
+#define EPS10 1.e-10
+FORWARD(e_forward); /* ellipsoid */
+	if (fabs(fabs(lp.phi) - HALFPI) <= EPS10) F_ERROR;
+	xy.x = P->k0 * lp.lam;
+	xy.y = - P->k0 * log(pj_tsfn(lp.phi, sin(lp.phi), P->e));
+	return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+	if (fabs(fabs(lp.phi) - HALFPI) <= EPS10) F_ERROR;
+	xy.x = P->k0 * lp.lam;
+	xy.y = P->k0 * log(tan(FORTPI + .5 * lp.phi));
+	return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+	if ((lp.phi = pj_phi2(exp(- xy.y / P->k0), P->e)) == HUGE_VAL) I_ERROR;
+	lp.lam = xy.x / P->k0;
+	return (lp);
+}
+INVERSE(s_inverse); /* spheroid */
+	lp.phi = HALFPI - 2. * atan(exp(-xy.y / P->k0));
+	lp.lam = xy.x / P->k0;
+	return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(merc)
+	double phits=0.0;
+	int is_phits;
+
+	if( (is_phits = pj_param(P->params, "tlat_ts").i) ) {
+		phits = fabs(pj_param(P->params, "rlat_ts").f);
+		if (phits >= HALFPI) E_ERROR(-24);
+	}
+	if (P->es) { /* ellipsoid */
+		if (is_phits)
+			P->k0 = pj_msfn(sin(phits), cos(phits), P->es);
+		P->inv = e_inverse;
+		P->fwd = e_forward;
+	} else { /* sphere */
+		if (is_phits)
+			P->k0 = cos(phits);
+		P->inv = s_inverse;
+		P->fwd = s_forward;
+	}
+ENDENTRY(P)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefilemac
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefilemac	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefilemac	(revision 256)
@@ -0,0 +1,105 @@
+###############################################################################
+# Makefile automatically generated by Code::Blocks IDE                        #
+###############################################################################
+
+# Project:          CrsJniProj
+# Project filename: /home/dguerrero/Desarrollo-gvSIG/crs/workspace/libjni-proj4/CrsJniProj.cbp
+# Compiler used:    GNU GCC Compiler
+
+### Variables used in this Makefile
+default_CC=gcc
+default_CPP=g++
+default_LD=g++
+default_LIB=ar
+default_RESCOMP=
+default_ARCH=ppc
+
+### Compiler/linker options
+default_GLOBAL_CFLAGS=
+default_PROJECT_CFLAGS= -DBUILDING_DLL=1 -arch $(default_ARCH) 
+default_GLOBAL_LDFLAGS= -Wl,-headerpad_max_install_names -arch $(default_ARCH) 
+default_PROJECT_LDFLAGS=
+default_GLOBAL_INCS= -I/usr/include -framework JavaVM -I/System/Library/Frameworks/JavaVM.framework/Headers -fno-common
+default_PROJECT_INCS= -Iinclude
+default_GLOBAL_LIBDIRS= -L/usr/lib -framework JavaVM 
+default_PROJECT_LIBDIRS= -L../binaries/mac/crs/
+default_GLOBAL_LIBS=
+default_PROJECT_LIBS= -lproj
+
+### Targets compiler flags
+default_CFLAGS= $(default_PROJECT_CFLAGS) $(default_GLOBAL_CFLAGS)
+
+### Targets linker flags
+default_LDFLAGS= $(default_PROJECT_LDFLAGS) $(default_GLOBAL_LDFLAGS) 
+
+### Targets include directories
+default_INCS= $(default_PROJECT_INCS) $(default_GLOBAL_INCS)
+
+### Targets library directories
+default_LIBDIRS= $(default_PROJECT_LIBDIRS) $(default_GLOBAL_LIBDIRS)
+
+### Targets libraries
+default_LIBS= $(default_PROJECT_LIBS) $(default_GLOBAL_LIBS)
+
+###############################################################################
+#         You shouldn't need to modify anything beyond this point             #
+###############################################################################
+
+### Objects used in this Makefile
+default_OBJS=dist/src/crsJniProj.o 
+default_LINKOBJS=$(default_OBJS)
+default_DEPS=.deps/src/crsJniProj.d 
+
+### The targets of this project
+default_BIN=dist/libcrsjniproj.jnilib
+default_STATIC_LIB=dist/libcrsjniproj.a
+default_LIB_DEF=dist/libcrsjniproj.def
+
+.PHONY: all all-before all-custom all-after clean clean-custom distclean distclean-custom depend_default default-before default-after 
+
+all: all-before default all-after
+
+
+dist:
+	@zip CrsJniProj.cbp.zip CrsJniProj.cbp Makefile src/crsJniProj.c 
+
+clean_default:
+	@echo Cleaning target "default"...
+	@$(RM) $(default_BIN) $(default_OBJS) $(default_RESOURCE) $(default_STATIC_LIB) $(default_LIB_DEF) 
+
+distclean_default:
+	@echo Dist-cleaning target "default"...
+	@$(RM) $(default_BIN) $(default_OBJS) $(default_DEPS) $(default_RESOURCE) $(default_STATIC_LIB) $(default_LIB_DEF) 
+
+clean: clean_default 
+
+distclean: distclean_default 
+
+depend_default_DIRS:
+	-@if ! test -d .deps; then mkdir .deps; fi
+	-@if ! test -d .deps/src; then mkdir .deps/src; fi
+
+depend_default: depend_default_DIRS $(default_DEPS)
+
+depend: depend_default
+
+default_DIRS:
+	-@if ! test -d dist; then mkdir dist; fi
+	-@if ! test -d dist/src; then mkdir dist/src; fi
+	-@if ! test -d dist; then mkdir dist; fi
+
+default: depend_default default_DIRS default-before $(default_BIN) default-after
+
+$(default_BIN): $(default_LINKOBJS) $(default_RESOURCE)
+	@echo Linking shared library "dist/libcrsjniproj.jnilib"...
+	@$(default_LD) -dynamiclib $(default_LIBDIRS) $(default_LINKOBJS) $(default_RESOURCE) -o $(default_BIN) $(default_LDFLAGS) $(default_LIBS)
+
+.deps/src/crsJniProj.d: src/crsJniProj.c
+	@echo Calculating dependencies for "src/crsJniProj.c"...
+	@$(default_CC) -MM $(default_CFLAGS) -MF .deps/src/crsJniProj.d -MT dist/src/crsJniProj.o $(default_INCS) src/crsJniProj.c
+
+dist/src/crsJniProj.o: .deps/src/crsJniProj.d
+	@echo Compiling "src/crsJniProj.c"...
+	@$(default_CC) $(default_CFLAGS) $(default_INCS) -c src/crsJniProj.c -o dist/src/crsJniProj.o
+
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.layout
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.layout	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.layout	(revision 256)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_layout_file>
+<CodeBlocks_layout_file>
+	<File name="src\crsJniProj.c" open="1" top="1">
+		<Cursor position="8341" topLine="21"/>
+	</File>
+</CodeBlocks_layout_file>
+[Editors]
+Focused=-1
+Order=-1
+[Editor_0]
+Open=1
+Top=1
+CursorCol=68
+CursorRow=26
+TopLine=75
+LeftChar=1
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.classpath
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.classpath	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.classpath	(revision 256)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path=""/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path=""/>
+</classpath>
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.dev
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.dev	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.dev	(revision 256)
@@ -0,0 +1,59 @@
+[Project]
+FileName=CrsJniProj.dev
+Name=CrsJniProj
+UnitCount=1
+Type=3
+Ver=1
+ObjFiles=
+Includes=C:\j2sdk1.4.2_11\include;C:\j2sdk1.4.2_11\include\win32;C:\desarrollo\crs\workspace\libjni-proj4\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=-DBUILDING_DLL=1_@@_
+CppCompiler=-DBUILDING_DLL=1_@@_
+Linker=--no-export-all-symbols --add-stdcall-alias_@@_proj.dll_@@_
+IsCpp=0
+Icon=
+ExeOutput=dist
+ObjectOutput=dist
+OverrideOutput=0
+OverrideOutputName=CrsJniProj.dll
+HostApplication=
+Folders=
+CommandLine=
+UseCustomMakefile=0
+CustomMakefile=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Developed using the Dev-C++ IDE
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
+[Unit1]
+FileName=src\crsJniProj.c
+CompileCpp=0
+Folder=CrsJniProj
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/dist/libCrsJniProj.def
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/dist/libCrsJniProj.def	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/dist/libCrsJniProj.def	(revision 256)
@@ -0,0 +1,18 @@
+; dlltool --base-file C:\DOCUME~1\Diego\CONFIG~1\Temp/cca03300.base --output-exp CrsJniProj.exp --dllname CrsJniProj.dll --output-def dist/libCrsJniProj.def --no-export-all-symbols --add-stdcall-alias --exclude-symbol=DllMainCRTStartup@12 --def C:\DOCUME~1\Diego\CONFIG~1\Temp/cca03300.def --output-lib dist/libCrsJniProj.a
+EXPORTS
+	Java_org_gvsig_crs_proj_JNIBaseCrs_freeCrs = Java_org_gvsig_crs_proj_JNIBaseCrs_freeCrs@16 @ 1
+	Java_org_gvsig_crs_proj_JNIBaseCrs_freeCrs@16 @ 2
+	Java_org_gvsig_crs_proj_JNIBaseCrs_getErrno = Java_org_gvsig_crs_proj_JNIBaseCrs_getErrno@8 @ 3
+	Java_org_gvsig_crs_proj_JNIBaseCrs_getErrno@8 @ 4
+	Java_org_gvsig_crs_proj_JNIBaseCrs_isLatlong = Java_org_gvsig_crs_proj_JNIBaseCrs_isLatlong@16 @ 5
+	Java_org_gvsig_crs_proj_JNIBaseCrs_isLatlong@16 @ 6
+	Java_org_gvsig_crs_proj_JNIBaseCrs_loadCrs = Java_org_gvsig_crs_proj_JNIBaseCrs_loadCrs@12 @ 7
+	Java_org_gvsig_crs_proj_JNIBaseCrs_loadCrs@12 @ 8
+	Java_org_gvsig_crs_proj_JNIBaseCrs_operation = Java_org_gvsig_crs_proj_JNIBaseCrs_operation@36 @ 9
+	Java_org_gvsig_crs_proj_JNIBaseCrs_operation@36 @ 10
+	Java_org_gvsig_crs_proj_JNIBaseCrs_operationArraySimple = Java_org_gvsig_crs_proj_JNIBaseCrs_operationArraySimple@28 @ 11
+	Java_org_gvsig_crs_proj_JNIBaseCrs_operationArraySimple@28 @ 12
+	Java_org_gvsig_crs_proj_JNIBaseCrs_operationSimple = Java_org_gvsig_crs_proj_JNIBaseCrs_operationSimple@48 @ 13
+	Java_org_gvsig_crs_proj_JNIBaseCrs_operationSimple@48 @ 14
+	Java_org_gvsig_crs_proj_JNIBaseCrs_strErrno = Java_org_gvsig_crs_proj_JNIBaseCrs_strErrno@12 @ 15
+	Java_org_gvsig_crs_proj_JNIBaseCrs_strErrno@12 @ 16
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/dist/CrsJniProj.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/dist/CrsJniProj.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.deps/src/crsJniProj.d
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.deps/src/crsJniProj.d	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.deps/src/crsJniProj.d	(revision 256)
@@ -0,0 +1,2 @@
+dist/src/crsJniProj.o: src/crsJniProj.c include/projects.h \
+  include/proj_api.h include/proj_api.h
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CMakeModules/FindPROJ.cmake
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CMakeModules/FindPROJ.cmake	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CMakeModules/FindPROJ.cmake	(revision 256)
@@ -0,0 +1,99 @@
+# Locate proj
+# This module defines
+# PROJ_LIBRARY
+# PROJ_FOUND, if false, do not try to link to proj 
+# PROJ_INCLUDE_DIR, where to find the headers
+#
+# $PROJDIR is an environment variable that would
+# correspond to the ./configure --prefix=$PROJ_DIR
+# used in building proj.
+#
+# Created by Eric Wing. I'm not a proj user, but OpenSceneGraph uses it 
+# for osgTerrain so I whipped this module together for completeness.
+# I actually don't know the conventions or where files are typically
+# placed in distros.
+# Any real proj users are encouraged to correct this (but please don't
+# break the OS X framework stuff when doing so which is what usually seems 
+# to happen).
+
+# This makes the presumption that you are include proj.h like
+# #include "proj.h"
+
+FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
+  PATHS
+  $ENV{PROJ_DIR}
+  NO_DEFAULT_PATH
+    PATH_SUFFIXES include
+)
+
+FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
+    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
+    NO_DEFAULT_PATH
+    PATH_SUFFIXES include
+)
+
+FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
+  PATHS
+  ~/Library/Frameworks/proj.framework/Headers
+  /Library/Frameworks/proj.framework/Headers
+  /usr/local/include/proj
+  /usr/local/include/PROJ
+  /usr/local/include
+  /usr/include/proj
+  /usr/include/PROJ
+  /usr/include
+  /sw/include/proj 
+  /sw/include/PROJ 
+  /sw/include # Fink
+  /opt/local/include/proj
+  /opt/local/include/PROJ
+  /opt/local/include # DarwinPorts
+  /opt/csw/include/proj
+  /opt/csw/include/PROJ
+  /opt/csw/include # Blastwave
+  /opt/include/proj
+  /opt/include/PROJ
+  /opt/include
+)
+
+MARK_AS_ADVANCED(PROJ_INCLUDE_DIR)
+
+FIND_LIBRARY(PROJ_LIBRARY 
+  NAMES proj PROJ
+  PATHS
+  $ENV{PROJ_DIR}
+  NO_DEFAULT_PATH
+  PATH_SUFFIXES lib64 lib
+)
+FIND_LIBRARY(PROJ_LIBRARY 
+  NAMES proj PROJ
+  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
+    NO_DEFAULT_PATH
+    PATH_SUFFIXES lib64 lib
+)
+FIND_LIBRARY(PROJ_LIBRARY 
+  NAMES proj PROJ
+  PATHS
+    ~/Library/Frameworks
+    /Library/Frameworks
+    /usr/local
+    /usr
+    /sw
+    /opt/local
+    /opt/csw
+    /opt
+    /usr/freeware
+    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;PROJ_ROOT]/lib
+  PATH_SUFFIXES lib64 lib
+)
+
+MARK_AS_ADVANCED(PROJ_LIBRARY)
+
+SET(PROJ_FOUND "NO")
+IF(PROJ_LIBRARY AND PROJ_INCLUDE_DIR)
+  SET(PROJ_FOUND "YES")
+  SET(PROJ_LIBRARY_DEBUG ${PROJ_LIBRARY})
+ENDIF(PROJ_LIBRARY AND PROJ_INCLUDE_DIR)
+
+
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefile.win
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefile.win	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefile.win	(revision 256)
@@ -0,0 +1,34 @@
+# Project: CrsJniProj
+# Makefile created by Dev-C++ 4.9.9.2
+
+CPP  = g++.exe
+CC   = gcc.exe
+WINDRES = windres.exe
+RES  = 
+OBJ  = dist/crsJniProj.o $(RES)
+LINKOBJ  = dist/crsJniProj.o $(RES)
+LIBS =  -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias proj.dll  
+INCS =  -I"C:/Dev-Cpp/include"  -I"C:/j2sdk1.4.2_13/include"  -I"C:/j2sdk1.4.2_13/include/win32"  -I"E:/desarrollo/crs/workspace/libjni-proj4/include" 
+CXXINCS =  -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/j2sdk1.4.2_13/include"  -I"C:/j2sdk1.4.2_13/include/win32"  -I"E:/desarrollo/crs/workspace/libjni-proj4/include" 
+BIN  = dist/CrsJniProj.dll
+CXXFLAGS = $(CXXINCS) -DBUILDING_DLL=1  
+CFLAGS = $(INCS) -DBUILDING_DLL=1  
+RM = rm -f
+
+.PHONY: all all-before all-after clean clean-custom
+
+all: all-before dist/CrsJniProj.dll all-after
+
+
+clean: clean-custom
+	${RM} $(OBJ) $(BIN)
+
+DLLWRAP=dllwrap.exe
+DEFFILE=dist/libCrsJniProj.def
+STATICLIB=dist/libCrsJniProj.a
+
+$(BIN): $(LINKOBJ)
+	$(DLLWRAP) --output-def $(DEFFILE) --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN)
+
+dist/crsJniProj.o: src/crsJniProj.c
+	$(CC) -c src/crsJniProj.c -o dist/crsJniProj.o $(CFLAGS)
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Readme.txt
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Readme.txt	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Readme.txt	(revision 256)
@@ -0,0 +1,2 @@
+
+La libreria esta compilada dentro del proyecto CrsJniProj.dev con el programa Dev-cpp. 
\ No newline at end of file
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CMakeLists.txt
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CMakeLists.txt	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CMakeLists.txt	(revision 256)
@@ -0,0 +1,56 @@
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
+
+IF(WIN32)
+    CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
+ELSE(WIN32)
+    IF(APPLE)
+        CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
+    ELSE(APPLE)
+        CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
+    ENDIF(APPLE)
+ENDIF(WIN32)
+
+if(COMMAND cmake_policy)
+    # Works around warnings libraries linked against that don't
+    # have absolute paths (e.g. -lpthreads)
+    cmake_policy(SET CMP0003 NEW)
+
+    # Works around warnings about escaped quotes in ADD_DEFINITIONS
+    # statements.
+    cmake_policy(SET CMP0005 NEW)
+
+    # cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names
+    # quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below."
+    if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0)
+        cmake_policy(SET CMP0008 OLD)
+    endif()
+endif()
+
+PROJECT(jproj)
+
+SET(JGDAL_VERSION_MAJOR "1")
+SET(JGDAL_VERSION_MINOR "9")
+SET(JGDAL_VERSION_PATCH "0")
+SET(VERSION "") # ${JGDAL_VERSION_MAJOR}.${JGDAL_VERSION_MINOR}.${JGDAL_VERSION_PATCH}")
+
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../build/CMakeModules;${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
+
+FIND_PACKAGE(DepMan REQUIRED) 
+INCLUDE(GeneralMacros) 
+
+CONFIGURE_DEFAULTS()
+
+IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  SET(CMAKE_INSTALL_PREFIX
+    ${DEPMAN_PATH} CACHE PATH "depman path install prefix" FORCE
+    )
+ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+
+FIND_PACKAGE(JNI REQUIRED) 
+#FIND_PACKAGE(PROJ REQUIRED) 
+
+ADD_SUBDIRECTORY(src)
+
+CONFIGURE_END()
+
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefile
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefile	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/Makefile	(revision 256)
@@ -0,0 +1,105 @@
+###############################################################################
+# Makefile automatically generated by Code::Blocks IDE                        #
+###############################################################################
+
+# Project:          CrsJniProj
+# Project filename: /home/dguerrero/Desarrollo-gvSIG/crs/workspace/libjni-proj4/CrsJniProj.cbp
+# Compiler used:    GNU GCC Compiler
+
+### Variables used in this Makefile
+default_CC=gcc
+default_CPP=g++
+default_LD=g++
+default_LIB=ar
+default_RESCOMP=
+
+### Compiler/linker options
+default_GLOBAL_CFLAGS=
+default_PROJECT_CFLAGS= -DBUILDING_DLL=1
+default_GLOBAL_LDFLAGS=
+default_PROJECT_LDFLAGS=
+default_GLOBAL_INCS= -I/usr/include
+default_PROJECT_INCS= -Iinclude -I/usr/local/j2sdk1.4.2_13/include -I/usr/local/j2sdk1.4.2_13/include/linux
+default_GLOBAL_LIBDIRS= -L/usr/lib
+default_PROJECT_LIBDIRS=
+default_GLOBAL_LIBS=
+default_PROJECT_LIBS= -lproj
+
+### Targets compiler flags
+default_CFLAGS= $(default_PROJECT_CFLAGS) $(default_GLOBAL_CFLAGS)
+
+### Targets linker flags
+default_LDFLAGS= $(default_PROJECT_LDFLAGS) $(default_GLOBAL_LDFLAGS)
+
+### Targets include directories
+default_INCS= $(default_PROJECT_INCS) $(default_GLOBAL_INCS)
+
+### Targets library directories
+default_LIBDIRS= $(default_PROJECT_LIBDIRS) $(default_GLOBAL_LIBDIRS)
+
+### Targets libraries
+default_LIBS= $(default_PROJECT_LIBS) $(default_GLOBAL_LIBS)
+
+###############################################################################
+#         You shouldn't need to modify anything beyond this point             #
+###############################################################################
+
+### Objects used in this Makefile
+default_OBJS=dist/src/crsJniProj.o 
+default_LINKOBJS=$(default_OBJS)
+default_DEPS=.deps/src/crsJniProj.d 
+
+### The targets of this project
+default_BIN=dist/libcrsjniproj.so.0.1.1
+default_STATIC_LIB=dist/libcrsjniproj.a
+default_LIB_DEF=dist/libcrsjniproj.def
+
+.PHONY: all all-before all-custom all-after clean clean-custom distclean distclean-custom depend_default default-before default-after 
+
+all: all-before default all-after
+
+
+dist:
+	@zip CrsJniProj.cbp.zip CrsJniProj.cbp Makefile src/crsJniProj.c 
+
+clean_default:
+	@echo Cleaning target "default"...
+	@$(RM) $(default_BIN) $(default_OBJS) $(default_RESOURCE) $(default_STATIC_LIB) $(default_LIB_DEF) 
+
+distclean_default:
+	@echo Dist-cleaning target "default"...
+	@$(RM) $(default_BIN) $(default_OBJS) $(default_DEPS) $(default_RESOURCE) $(default_STATIC_LIB) $(default_LIB_DEF) 
+
+clean: clean_default 
+
+distclean: distclean_default 
+
+depend_default_DIRS:
+	-@if ! test -d .deps; then mkdir .deps; fi
+	-@if ! test -d .deps/src; then mkdir .deps/src; fi
+
+depend_default: depend_default_DIRS $(default_DEPS)
+
+depend: depend_default
+
+default_DIRS:
+	-@if ! test -d dist; then mkdir dist; fi
+	-@if ! test -d dist/src; then mkdir dist/src; fi
+	-@if ! test -d dist; then mkdir dist; fi
+
+default: depend_default default_DIRS default-before $(default_BIN) default-after
+
+$(default_BIN): $(default_LINKOBJS) $(default_RESOURCE)
+	@echo Linking shared library "dist/libcrsjniproj.so.0.1.1"...
+	@$(default_LD) -shared $(default_LIBDIRS) $(default_LINKOBJS) $(default_RESOURCE) -o $(default_BIN) $(default_LDFLAGS) $(default_LIBS)
+
+
+.deps/src/crsJniProj.d: src/crsJniProj.c
+	@echo Calculating dependencies for "src/crsJniProj.c"...
+	@$(default_CC) -MM $(default_CFLAGS) -MF .deps/src/crsJniProj.d -MT dist/src/crsJniProj.o $(default_INCS) src/crsJniProj.c
+
+dist/src/crsJniProj.o: .deps/src/crsJniProj.d
+	@echo Compiling "src/crsJniProj.c"...
+	@$(default_CC) $(default_CFLAGS) $(default_INCS) -c src/crsJniProj.c -o dist/src/crsJniProj.o
+
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.depend
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.depend	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.depend	(revision 256)
@@ -0,0 +1,38 @@
+# depslib dependency file v1.0
+1159456430 /home/dguerrero/Desarrollo-gvSIG/crs/workspace/libjni-proj4/src/crsJniProj.c
+	"projects.h"
+	<jni.h>
+	<proj_api.h>
+
+1157631091 /home/dguerrero/Desarrollo-gvSIG/crs/workspace/libjni-proj4/include/projects.h
+	<math.h>
+	<stdio.h>
+	<stdlib.h>
+	"proj_api.h"
+
+1157631091 /home/dguerrero/Desarrollo-gvSIG/crs/workspace/libjni-proj4/include/proj_api.h
+	<math.h>
+	<stdlib.h>
+
+1159466398 c:\desarrollo\crs\workspace\libjni-proj4\src\crsjniproj.c
+	"projects.h"
+	<jni.h>
+	<proj_api.h>
+
+1157631091 c:\desarrollo\crs\workspace\libjni-proj4\include\projects.h
+	<math.h>
+	<stdio.h>
+	<stdlib.h>
+	"proj_api.h"
+
+1157631091 c:\desarrollo\crs\workspace\libjni-proj4\include\proj_api.h
+	<math.h>
+	<stdlib.h>
+
+1153214430 c:\j2sdk1.4.2_11\include\jni.h
+	<stdio.h>
+	<stdarg.h>
+	"jni_md.h"
+
+1153214430 c:\j2sdk1.4.2_11\include\win32\jni_md.h
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/emess.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/emess.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/emess.h	(revision 256)
@@ -0,0 +1,32 @@
+/* Error message processing header file */
+#ifndef EMESS_H
+#define EMESS_H
+
+#ifndef lint
+static char EMESS_H_ID[] = "@(#)emess.h	4.1	93/03/08	GIE	REL";
+#endif
+
+struct EMESS {
+	char	*File_name,	/* input file name */
+			*Prog_name;	/* name of program */
+	int		File_line;	/* approximate line read
+							where error occured */
+};
+
+#ifdef EMESS_ROUTINE	/* use type */
+/* for emess procedure */
+struct EMESS emess_dat = { (char *)0, (char *)0, 0 };
+
+#ifdef sun /* Archaic SunOs 4.1.1, etc. */
+extern char *sys_errlist[];
+#define strerror(n) (sys_errlist[n])
+#endif
+
+#else	/* for for calling procedures */
+
+extern struct EMESS emess_dat;
+void emess(int, char *, ...);
+
+#endif /* use type */
+
+#endif /* end EMESS_H */
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/nad_list.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/nad_list.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/nad_list.h	(revision 256)
@@ -0,0 +1,6 @@
+/* projection list for program nad2nad */
+PROJ_HEAD(lcc, "Lambert Conformal Conic")
+PROJ_HEAD(omerc, "Oblique Mercator")
+PROJ_HEAD(poly, "Polyconic (American)")
+PROJ_HEAD(tmerc, "Transverse Mercator")
+PROJ_HEAD(utm, "Universal Transverse Mercator (UTM)")
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/proj_config.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/proj_config.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/proj_config.h	(revision 256)
@@ -0,0 +1,61 @@
+/* src/proj_config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Enabled for Java/JNI Support */
+#undef JNI_ENABLED
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/geodesic.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/geodesic.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/geodesic.h	(revision 256)
@@ -0,0 +1,51 @@
+#ifndef lint
+static char GEODESIC_H_ID[] = "@(#)geodesic.h	4.3	95/08/19	GIE	REL";
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _IN_GEOD_SET
+#  define GEOD_EXTERN extern
+#else
+#  define GEOD_EXTERN
+#endif
+
+GEOD_EXTERN struct geodesic {
+	double	A;
+	double	LAM1, PHI1, ALPHA12;
+	double	LAM2, PHI2, ALPHA21;
+	double	DIST;
+	double	ONEF, FLAT, FLAT2, FLAT4, FLAT64;
+	int	ELLIPSE;
+} GEODESIC;
+
+# define geod_a	GEODESIC.A
+# define lam1	GEODESIC.LAM1
+# define phi1	GEODESIC.PHI1
+# define al12	GEODESIC.ALPHA12
+# define lam2	GEODESIC.LAM2
+# define phi2	GEODESIC.PHI2
+# define al21	GEODESIC.ALPHA21
+# define geod_S	GEODESIC.DIST
+# define geod_f	GEODESIC.FLAT
+# define onef	GEODESIC.ONEF
+# define f2	GEODESIC.FLAT2
+# define f4	GEODESIC.FLAT4
+# define ff2	GEODESIC.FLAT4
+# define f64	GEODESIC.FLAT64
+# define ellipse GEODESIC.ELLIPSE
+
+    
+GEOD_EXTERN int n_alpha, n_S;
+GEOD_EXTERN double to_meter, fr_meter, del_alpha;
+	
+void geod_set(int, char **);
+void geod_for(void);
+void geod_pre(void);
+void geod_inv(void);
+
+#ifdef __cplusplus
+}
+#endif
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/proj_api.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/proj_api.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/proj_api.h	(revision 256)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * $Id: proj_api.h,v 1.13 2004/10/30 02:33:47 fwarmerdam Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Public (application) include file for PROJ.4 API, and constants.
+ * Author:   Frank Warmerdam, <warmerdam@pobox.com>
+ *
+ ******************************************************************************
+ * Copyright (c) 2001, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: proj_api.h,v $
+ * Revision 1.13  2004/10/30 02:33:47  fwarmerdam
+ * Updated release version.
+ *
+ * Revision 1.12  2004/09/16 15:14:01  fwarmerdam
+ * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller.
+ *
+ * Revision 1.11  2004/07/28 23:23:49  warmerda
+ * Changed ra to es in declarations for pj_geocentric_to_geodetic()
+ * and pj_geodetic_to_geocentric() as suggested by Britton Kerin.
+ *
+ * Revision 1.10  2004/05/04 03:28:01  warmerda
+ * Updated version.
+ *
+ * Revision 1.9  2004/04/15 13:56:24  warmerda
+ * added pj_get_release
+ *
+ * Revision 1.8  2003/03/31 14:52:38  warmerda
+ * updated to 4.4.7
+ *
+ * Revision 1.7  2002/12/14 20:14:35  warmerda
+ * added geocentric support
+ *
+ * Revision 1.6  2002/06/11 18:08:25  warmerda
+ * Added the pj_get_def() function
+ *
+ * Revision 1.5  2002/01/09 14:36:22  warmerda
+ * updated to 4.4.5
+ *
+ * Revision 1.4  2001/09/15 22:55:28  warmerda
+ * final prep for 4.4.4 release
+ *
+ * Revision 1.3  2001/08/23 20:25:55  warmerda
+ * added pj_set_finder function
+ *
+ * Revision 1.2  2001/06/02 03:35:36  warmerda
+ * added pj_get_errno_ref()
+ *
+ * Revision 1.1  2001/04/06 01:24:22  warmerda
+ * New
+ *
+ */
+
+/* General projections header file */
+#ifndef PROJ_API_H
+#define PROJ_API_H
+
+/* standard inclusions */
+#include <math.h>
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Try to update this every version! */
+#define PJ_VERSION 449
+
+extern char const pj_release[]; /* global release id string */
+
+#define RAD_TO_DEG	57.29577951308232
+#define DEG_TO_RAD	.0174532925199432958
+
+
+extern int pj_errno;	/* global error return code */
+
+#if !defined(PROJECTS_H)
+    typedef struct { double u, v; } projUV;
+    typedef void *projPJ;
+    #define projXY projUV
+    #define projLP projUV
+#else
+    typedef PJ *projPJ;
+#   define projXY	XY
+#   define projLP       LP
+#endif
+
+/* procedure prototypes */
+
+projXY pj_fwd(projLP, projPJ);
+projLP pj_inv(projXY, projPJ);
+
+int pj_transform( projPJ src, projPJ dst, long point_count, int point_offset,
+                  double *x, double *y, double *z );
+int pj_datum_transform( projPJ src, projPJ dst, long point_count, int point_offset,
+                        double *x, double *y, double *z );
+int pj_geocentric_to_geodetic( double a, double es,
+                               long point_count, int point_offset,
+                               double *x, double *y, double *z );
+int pj_geodetic_to_geocentric( double a, double es,
+                               long point_count, int point_offset,
+                               double *x, double *y, double *z );
+int pj_compare_datums( projPJ srcdefn, projPJ dstdefn );
+int pj_apply_gridshift( const char *, int, 
+                        long point_count, int point_offset,
+                        double *x, double *y, double *z );
+void pj_deallocate_grids();
+int pj_is_latlong(projPJ);
+int pj_is_geocent(projPJ);
+void pj_pr_list(projPJ);
+void pj_free(projPJ);
+void pj_set_finder( const char *(*)(const char *) );
+void pj_set_searchpath ( int count, const char **path );
+projPJ pj_init(int, char **);
+projPJ pj_init_plus(const char *);
+char *pj_get_def(projPJ, int);
+projPJ pj_latlong_from_proj( projPJ );
+void *pj_malloc(size_t);
+void pj_dalloc(void *);
+char *pj_strerrno(int);
+int *pj_get_errno_ref();
+const char *pj_get_release();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ndef PROJ_API_H */
+
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/CrsJniProj_head.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/CrsJniProj_head.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/CrsJniProj_head.h	(revision 256)
@@ -0,0 +1,29 @@
+#include "projects.h"
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+JNIEXPORT int JNICALL Java_org_gvsig_crs_epsg_JNIBaseOperation_operationSimple
+  (JNIEnv *, jobject, jdouble, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT int JNICALL Java_org_gvsig_crs_epsg_JNIBaseOperation_operation
+  (JNIEnv *, jobject, jdoubleArray, jdoubleArray, jdoubleArray, jlong, jlong);
+  
+JNIEXPORT int JNICALL Java_org_gvsig_crs_epsg_JNIBaseOperation_operationArraySimple
+  (JNIEnv *, jobject, jdoubleArray, jlong, jlong);
+  
+JNIEXPORT projPJ JNICALL Java_org_gvsig_crs_epsg_JNIBaseCrs_loadCrs
+  (JNIEnv * env, jobject parent, jstring);
+  
+JNIEXPORT void JNICALL Java_org_gvsig_crs_epsg_JNIBaseCrs_freeCrs
+  (JNIEnv * env, jobject parent, jlong);
+  
+JNIEXPORT int JNICALL Java_org_gvsig_crs_epsg_JNIBaseCrs_isLatlong
+  (JNIEnv * env, jobject parent, jlong);
+
+
+#ifdef __cplusplus
+}
+#endif
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/geocent.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/geocent.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/geocent.h	(revision 256)
@@ -0,0 +1,163 @@
+#ifndef GEOCENT_H
+#define GEOCENT_H
+
+/***************************************************************************/
+/* RSC IDENTIFIER:  GEOCENTRIC
+ *
+ * ABSTRACT
+ *
+ *    This component provides conversions between Geodetic coordinates (latitude,
+ *    longitude in radians and height in meters) and Geocentric coordinates
+ *    (X, Y, Z) in meters.
+ *
+ * ERROR HANDLING
+ *
+ *    This component checks parameters for valid values.  If an invalid value
+ *    is found, the error code is combined with the current error code using 
+ *    the bitwise or.  This combining allows multiple error codes to be
+ *    returned. The possible error codes are:
+ *
+ *      GEOCENT_NO_ERROR        : No errors occurred in function
+ *      GEOCENT_LAT_ERROR       : Latitude out of valid range
+ *                                 (-90 to 90 degrees)
+ *      GEOCENT_LON_ERROR       : Longitude out of valid range
+ *                                 (-180 to 360 degrees)
+ *      GEOCENT_A_ERROR         : Semi-major axis less than or equal to zero
+ *      GEOCENT_B_ERROR         : Semi-minor axis less than or equal to zero
+ *      GEOCENT_A_LESS_B_ERROR  : Semi-major axis less than semi-minor axis
+ *
+ *
+ * REUSE NOTES
+ *
+ *    GEOCENTRIC is intended for reuse by any application that performs
+ *    coordinate conversions between geodetic coordinates and geocentric
+ *    coordinates.
+ *    
+ *
+ * REFERENCES
+ *    
+ *    An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion,
+ *    Ralph Toms, February 1996  UCRL-JC-123138.
+ *    
+ *    Further information on GEOCENTRIC can be found in the Reuse Manual.
+ *
+ *    GEOCENTRIC originated from : U.S. Army Topographic Engineering Center
+ *                                 Geospatial Information Division
+ *                                 7701 Telegraph Road
+ *                                 Alexandria, VA  22310-3864
+ *
+ * LICENSES
+ *
+ *    None apply to this component.
+ *
+ * RESTRICTIONS
+ *
+ *    GEOCENTRIC has no restrictions.
+ *
+ * ENVIRONMENT
+ *
+ *    GEOCENTRIC was tested and certified in the following environments:
+ *
+ *    1. Solaris 2.5 with GCC version 2.8.1
+ *    2. Windows 95 with MS Visual C++ version 6
+ *
+ * MODIFICATIONS
+ *
+ *    Date              Description
+ *    ----              -----------
+ *
+ *
+ */
+
+
+/***************************************************************************/
+/*
+ *                              DEFINES
+ */
+#define GEOCENT_NO_ERROR        0x0000
+#define GEOCENT_LAT_ERROR       0x0001
+#define GEOCENT_LON_ERROR       0x0002
+#define GEOCENT_A_ERROR         0x0004
+#define GEOCENT_B_ERROR         0x0008
+#define GEOCENT_A_LESS_B_ERROR  0x0010
+
+
+/***************************************************************************/
+/*
+ *                              FUNCTION PROTOTYPES
+ */
+
+/* ensure proper linkage to c++ programs */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+  long pj_Set_Geocentric_Parameters (double a, 
+                                  double b);
+/*
+ * The function Set_Geocentric_Parameters receives the ellipsoid parameters
+ * as inputs and sets the corresponding state variables.
+ *
+ *    a  : Semi-major axis, in meters.          (input)
+ *    b  : Semi-minor axis, in meters.          (input)
+ */
+
+
+  void pj_Get_Geocentric_Parameters (double *a, 
+                                  double *b);
+/*
+ * The function Get_Geocentric_Parameters returns the ellipsoid parameters
+ * to be used in geocentric coordinate conversions.
+ *
+ *    a  : Semi-major axis, in meters.          (output)
+ *    b  : Semi-minor axis, in meters.          (output)
+ */
+
+
+  long pj_Convert_Geodetic_To_Geocentric (double Latitude,
+                                       double Longitude,
+                                       double Height,
+                                       double *X,
+                                       double *Y,
+                                       double *Z);
+/*
+ * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
+ * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
+ * according to the current ellipsoid parameters.
+ *
+ *    Latitude  : Geodetic latitude in radians                     (input)
+ *    Longitude : Geodetic longitude in radians                    (input)
+ *    Height    : Geodetic height, in meters                       (input)
+ *    X         : Calculated Geocentric X coordinate, in meters.   (output)
+ *    Y         : Calculated Geocentric Y coordinate, in meters.   (output)
+ *    Z         : Calculated Geocentric Z coordinate, in meters.   (output)
+ *
+ */
+
+
+  void pj_Convert_Geocentric_To_Geodetic (double X,
+                                       double Y, 
+                                       double Z,
+                                       double *Latitude,
+                                       double *Longitude,
+                                       double *Height);
+/*
+ * The function Convert_Geocentric_To_Geodetic converts geocentric
+ * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, 
+ * and height), according to the current ellipsoid parameters.
+ *
+ *    X         : Geocentric X coordinate, in meters.         (input)
+ *    Y         : Geocentric Y coordinate, in meters.         (input)
+ *    Z         : Geocentric Z coordinate, in meters.         (input)
+ *    Latitude  : Calculated latitude value in radians.       (output)
+ *    Longitude : Calculated longitude value in radians.      (output)
+ *    Height    : Calculated height value, in meters.         (output)
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GEOCENT_H */
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/libcs2cs.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/libcs2cs.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/libcs2cs.h	(revision 256)
@@ -0,0 +1 @@
+int libcs2cs(int narg,char** arg,double* input1,double* input2,double* input3);
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/org_proj4_Projections.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/org_proj4_Projections.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/org_proj4_Projections.h	(revision 256)
@@ -0,0 +1,37 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_proj4_Projections */
+
+#ifndef _Included_org_proj4_Projections
+#define _Included_org_proj4_Projections
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_proj4_Projections
+ * Method:    getProjInfo
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getProjInfo
+  (JNIEnv *, jobject, jstring);
+
+/*
+ * Class:     org_proj4_Projections
+ * Method:    getEllipsInfo
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getEllipsInfo
+  (JNIEnv *, jobject, jstring);
+
+/*
+ * Class:     org_proj4_Projections
+ * Method:    transform
+ * Signature: ([D[D[DLjava/lang/String;Ljava/lang/String;JI)V
+ */
+JNIEXPORT void JNICALL Java_org_proj4_Projections_transform
+  (JNIEnv *, jobject, jdoubleArray, jdoubleArray, jdoubleArray, jstring, jstring, jlong, jint);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/pj_list.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/pj_list.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/pj_list.h	(revision 256)
@@ -0,0 +1,133 @@
+#ifdef DO_PJ_LIST_ID
+static const char PJ_LIST_H_ID[] = "@(#)pj_list.h	4.5	95/08/09	GIE	REL";
+#endif
+/* Full list of current projections for Tue Jan 11 12:27:04 EST 1994
+**
+** Copy this file and retain only appropriate lines for subset list
+*/
+PROJ_HEAD(aea, "Albers Equal Area")
+PROJ_HEAD(aeqd, "Azimuthal Equidistant")
+PROJ_HEAD(airy, "Airy")
+PROJ_HEAD(aitoff, "Aitoff")
+PROJ_HEAD(alsk, "Mod. Stererographics of Alaska")
+PROJ_HEAD(apian, "Apian Globular I")
+PROJ_HEAD(august, "August Epicycloidal")
+PROJ_HEAD(bacon, "Bacon Globular")
+PROJ_HEAD(bipc, "Bipolar conic of western hemisphere")
+PROJ_HEAD(boggs, "Boggs Eumorphic")
+PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
+PROJ_HEAD(cass, "Cassini")
+PROJ_HEAD(cc, "Central Cylindrical")
+PROJ_HEAD(cea, "Equal Area Cylindrical")
+PROJ_HEAD(chamb, "Chamberlin Trimetric")
+PROJ_HEAD(collg, "Collignon")
+PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)")
+PROJ_HEAD(denoy, "Denoyer Semi-Elliptical")
+PROJ_HEAD(eck1, "Eckert I")
+PROJ_HEAD(eck2, "Eckert II")
+PROJ_HEAD(eck3, "Eckert III")
+PROJ_HEAD(eck4, "Eckert IV")
+PROJ_HEAD(eck5, "Eckert V")
+PROJ_HEAD(eck6, "Eckert VI")
+PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Caree)")
+PROJ_HEAD(eqdc, "Equidistant Conic")
+PROJ_HEAD(euler, "Euler")
+PROJ_HEAD(fahey, "Fahey")
+PROJ_HEAD(fouc, "Foucaut")
+PROJ_HEAD(fouc_s, "Foucaut Sinusoidal")
+PROJ_HEAD(gall, "Gall (Gall Stereographic)")
+PROJ_HEAD(geocent, "Geocentric")
+PROJ_HEAD(geos, "Geostationary Satellite View")
+PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)")
+PROJ_HEAD(gn_sinu, "General Sinusoidal Series")
+PROJ_HEAD(gnom, "Gnomonic")
+PROJ_HEAD(goode, "Goode Homolosine")
+PROJ_HEAD(gs48, "Mod. Stererographics of 48 U.S.")
+PROJ_HEAD(gs50, "Mod. Stererographics of 50 U.S.")
+PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
+PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area")
+PROJ_HEAD(imw_p, "Internation Map of the World Polyconic")
+PROJ_HEAD(kav5, "Kavraisky V")
+PROJ_HEAD(kav7, "Kavraisky VII")
+PROJ_HEAD(krovak, "Krovak")
+PROJ_HEAD(labrd, "Laborde")
+PROJ_HEAD(laea, "Lambert Azimuthal Equal Area")
+PROJ_HEAD(lagrng, "Lagrange")
+PROJ_HEAD(larr, "Larrivee")
+PROJ_HEAD(lask, "Laskowski")
+PROJ_HEAD(latlong, "Lat/long (Geodetic)")
+PROJ_HEAD(longlat, "Lat/long (Geodetic)")
+PROJ_HEAD(lcc, "Lambert Conformal Conic")
+PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative")
+PROJ_HEAD(leac, "Lambert Equal Area Conic")
+PROJ_HEAD(lee_os, "Lee Oblated Stereographic")
+PROJ_HEAD(loxim, "Loximuthal")
+PROJ_HEAD(lsat, "Space oblique for LANDSAT")
+PROJ_HEAD(mbt_s, "McBryde-Thomas Flat-Polar Sine")
+PROJ_HEAD(mbt_fps, "McBryde-Thomas Flat-Pole Sine (No. 2)")
+PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic")
+PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic")
+PROJ_HEAD(mbtfps, "McBryde-Thomas Flat-Polar Sinusoidal")
+PROJ_HEAD(merc, "Mercator")
+PROJ_HEAD(mil_os, "Miller Oblated Stereographic")
+PROJ_HEAD(mill, "Miller Cylindrical")
+PROJ_HEAD(mpoly, "Modified Polyconic")
+PROJ_HEAD(moll, "Mollweide")
+PROJ_HEAD(murd1, "Murdoch I")
+PROJ_HEAD(murd2, "Murdoch II")
+PROJ_HEAD(murd3, "Murdoch III")
+PROJ_HEAD(nell, "Nell")
+PROJ_HEAD(nell_h, "Nell-Hammer")
+PROJ_HEAD(nicol, "Nicolosi Globular")
+PROJ_HEAD(nsper, "Near-sided perspective")
+PROJ_HEAD(nzmg, "New Zealand Map Grid")
+PROJ_HEAD(ob_tran, "General Oblique Transformation")
+PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area")
+PROJ_HEAD(oea, "Oblated Equal Area")
+PROJ_HEAD(omerc, "Oblique Mercator")
+PROJ_HEAD(ortel, "Ortelius Oval")
+PROJ_HEAD(ortho, "Orthographic")
+PROJ_HEAD(pconic, "Perspective Conic")
+PROJ_HEAD(poly, "Polyconic (American)")
+PROJ_HEAD(putp1, "Putnins P1")
+PROJ_HEAD(putp2, "Putnins P2")
+PROJ_HEAD(putp3, "Putnins P3")
+PROJ_HEAD(putp3p, "Putnins P3'")
+PROJ_HEAD(putp4p, "Putnins P4'")
+PROJ_HEAD(putp5, "Putnins P5")
+PROJ_HEAD(putp5p, "Putnins P5'")
+PROJ_HEAD(putp6, "Putnins P6")
+PROJ_HEAD(putp6p, "Putnins P6'")
+PROJ_HEAD(qua_aut, "Quartic Authalic")
+PROJ_HEAD(robin, "Robinson")
+PROJ_HEAD(rpoly, "Rectangular Polyconic")
+PROJ_HEAD(sinu, "Sinusoidal (Sanson-Flamsteed)")
+PROJ_HEAD(somerc, "Swiss. Obl. Mercator")
+PROJ_HEAD(stere, "Stereographic")
+PROJ_HEAD(sterea, "Oblique Stereographic Alternative")
+PROJ_HEAD(tcc, "Transverse Central Cylindrical")
+PROJ_HEAD(tcea, "Transverse Cylindrical Equal Area")
+PROJ_HEAD(tissot, "Tissot Conic")
+PROJ_HEAD(tmerc, "Transverse Mercator")
+PROJ_HEAD(tpeqd, "Two Point Equidistant")
+PROJ_HEAD(tpers, "Tilted perspective")
+PROJ_HEAD(ups, "Universal Polar Stereographic")
+PROJ_HEAD(urm5, "Urmaev V")
+PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal")
+PROJ_HEAD(utm, "Universal Transverse Mercator (UTM)")
+PROJ_HEAD(vandg, "van der Grinten (I)")
+PROJ_HEAD(vandg2, "van der Grinten II")
+PROJ_HEAD(vandg3, "van der Grinten III")
+PROJ_HEAD(vandg4, "van der Grinten IV")
+PROJ_HEAD(vitk1, "Vitkovsky I")
+PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)")
+PROJ_HEAD(wag2, "Wagner II")
+PROJ_HEAD(wag3, "Wagner III")
+PROJ_HEAD(wag4, "Wagner IV")
+PROJ_HEAD(wag5, "Wagner V")
+PROJ_HEAD(wag6, "Wagner VI")
+PROJ_HEAD(wag7, "Wagner VII")
+PROJ_HEAD(weren, "Werenskiold I")
+PROJ_HEAD(wink1, "Winkel I")
+PROJ_HEAD(wink2, "Winkel II")
+PROJ_HEAD(wintri, "Winkel Tripel")
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/projects.h
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/projects.h	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/include/projects.h	(revision 256)
@@ -0,0 +1,449 @@
+/******************************************************************************
+ * $Id: projects.h,v 1.21 2004/10/28 16:08:13 fwarmerdam Exp $
+ *
+ * Project:  PROJ.4
+ * Purpose:  Primary (private) include file for PROJ.4 library.
+ * Author:   Gerald Evenden
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ *
+ * $Log: projects.h,v $
+ * Revision 1.21  2004/10/28 16:08:13  fwarmerdam
+ * added pj_get_*_ref() accessors
+ *
+ * Revision 1.20  2004/10/20 17:04:29  fwarmerdam
+ * added geos, sterea and supporting gauss code from libproj4
+ *
+ * Revision 1.19  2004/08/31 22:57:11  warmerda
+ * Don't re-declare hypot() on win32 as it will conflict with math.h as per
+ * http://bugzilla.remotesensing.org/show_bug.cgi?id=495
+ *
+ * Revision 1.18  2004/04/15 13:56:45  warmerda
+ * changed PJD_ERR_GEOCENTRIC to -45
+ *
+ * Revision 1.17  2003/03/17 18:56:34  warmerda
+ * implement heirarchical NTv2 gridinfos
+ *
+ * Revision 1.16  2003/03/15 06:02:02  warmerda
+ * preliminary NTv2 support, major restructure of datum shifting
+ *
+ * Revision 1.15  2002/12/14 20:35:15  warmerda
+ * fix C_NAMESPACE warning issue with C_NAMESPACE_VAR for variables
+ *
+ * Revision 1.14  2002/12/14 20:16:21  warmerda
+ * added geocentric support, and PJ_CVSID
+ *
+ * Revision 1.13  2002/12/09 16:01:02  warmerda
+ * added prime meridian support
+ *
+ * Revision 1.12  2002/07/08 02:32:05  warmerda
+ * ensure clean C++ builds
+ *
+ * Revision 1.11  2002/06/20 16:09:31  warmerda
+ * removed strtod, reimplement non-GPL strtod cover within dmstor.c
+ *
+ * Revision 1.10  2002/06/13 14:06:49  warmerda
+ * Removed incorrect labelling of 3PARAM and 7PARAM as Molodensky.
+ *
+ * Revision 1.9  2001/04/06 01:24:13  warmerda
+ * Introduced proj_api.h as a public interface for PROJ.4
+ *
+ * Revision 1.8  2001/04/05 04:24:10  warmerda
+ * added prototypes for new functions, and PJ_VERSION
+ *
+ * Revision 1.7  2001/02/07 17:55:05  warmerda
+ * Cleaned up various warnings when compiled with -Wall.
+ *
+ * Revision 1.6  2000/11/30 03:37:22  warmerda
+ * use proj_strtod() in dmstor()
+ *
+ * Revision 1.5  2000/07/06 23:36:47  warmerda
+ * added lots of datum related stuff
+ *
+ */
+
+/* General projections header file */
+#ifndef PROJECTS_H
+#define PROJECTS_H
+
+/* standard inclusions */
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef __cplusplus
+#define C_NAMESPACE extern "C"
+#define C_NAMESPACE_VAR extern "C"
+extern "C" {
+#else    
+#define C_NAMESPACE extern
+#define C_NAMESPACE_VAR
+#endif
+
+#ifndef NULL
+#  define NULL	0
+#endif
+
+#ifndef FALSE
+#  define FALSE	0
+#endif
+
+#ifndef TRUE
+#  define TRUE	1
+#endif
+
+#ifndef MAX
+#  define MIN(a,b)      ((a<b) ? a : b)
+#  define MAX(a,b)      ((a>b) ? a : b)
+#endif
+
+#ifndef ABS
+#  define ABS(x)        ((x<0) ? (-1*(x)) : x)
+#endif
+
+    /* maximum path/filename */
+#ifndef MAX_PATH_FILENAME
+#define MAX_PATH_FILENAME 1024
+#endif
+	/* prototype hypot for systems where absent */
+#ifndef _WIN32
+extern double hypot(double, double);
+#endif
+
+	/* some useful constants */
+#define HALFPI		1.5707963267948966
+#define FORTPI		0.78539816339744833
+#define PI		3.14159265358979323846
+#define TWOPI		6.2831853071795864769
+
+/* environment parameter name */
+#ifndef PROJ_LIB
+#define PROJ_LIB "PROJ_LIB"
+#endif
+/* maximum tag id length for +init and default files */
+#ifndef ID_TAG_MAX
+#define ID_TAG_MAX 50
+#endif
+
+/* directory delimiter for DOS support */
+#ifdef DOS
+#define DIR_CHAR '\\'
+#else
+#define DIR_CHAR '/'
+#endif
+
+/* datum_type values */
+#define PJD_UNKNOWN   0
+#define PJD_3PARAM    1   
+#define PJD_7PARAM    2   
+#define PJD_GRIDSHIFT 3
+#define PJD_WGS84     4   /* WGS84 (or anything considered equivelent) */
+
+/* datum system errors */
+#define PJD_ERR_GEOCENTRIC -45
+
+#define USE_PROJUV 
+
+typedef struct { double u, v; } projUV;
+typedef struct { double r, i; }	COMPLEX;
+
+#ifndef PJ_LIB__
+#define XY projUV
+#define LP projUV
+#else
+typedef struct { double x, y; }     XY;
+typedef struct { double lam, phi; } LP;
+#endif
+
+typedef union { double  f; int  i; char *s; } PVALUE;
+struct PJconsts;
+    
+struct PJ_LIST {
+	char	*id;		/* projection keyword */
+	struct PJconsts	*(*proj)(struct PJconsts*);/* projection entry point */
+	char 	* const *descr;	/* description text */
+};
+struct PJ_ELLPS {
+	char	*id;	/* ellipse keyword name */
+	char	*major;	/* a= value */
+	char	*ell;	/* elliptical parameter */
+	char	*name;	/* comments */
+};
+struct PJ_UNITS {
+	char	*id;	/* units keyword */
+	char	*to_meter;	/* multiply by value to get meters */
+	char	*name;	/* comments */
+};
+
+struct PJ_DATUMS {
+    char    *id;     /* datum keyword */
+    char    *defn;   /* ie. "to_wgs84=..." */
+    char    *ellipse_id; /* ie from ellipse table */
+    char    *comments; /* EPSG code, etc */
+};
+
+struct PJ_PRIME_MERIDIANS {
+    char    *id;     /* prime meridian keyword */
+    char    *defn;   /* offset from greenwich in DMS format. */
+};
+
+struct DERIVS {
+    double x_l, x_p; /* derivatives of x for lambda-phi */
+    double y_l, y_p; /* derivatives of y for lambda-phi */
+};
+    
+struct FACTORS {
+	struct DERIVS der;
+	double h, k;	/* meridinal, parallel scales */
+	double omega, thetap;	/* angular distortion, theta prime */
+	double conv;	/* convergence */
+	double s;		/* areal scale factor */
+	double a, b;	/* max-min scale error */
+	int code;		/* info as to analytics, see following */
+};
+#define IS_ANAL_XL_YL 01	/* derivatives of lon analytic */
+#define IS_ANAL_XP_YP 02	/* derivatives of lat analytic */
+#define IS_ANAL_HK	04		/* h and k analytic */
+#define IS_ANAL_CONV 010	/* convergence analytic */
+    /* parameter list struct */
+typedef struct ARG_list {
+	struct ARG_list *next;
+	char used;
+	char param[1]; } paralist;
+	/* base projection data structure */
+
+
+typedef struct PJconsts {
+	XY  (*fwd)(LP, struct PJconsts *);
+	LP  (*inv)(XY, struct PJconsts *);
+	void (*spc)(LP, struct PJconsts *, struct FACTORS *);
+	void (*pfree)(struct PJconsts *);
+	const char *descr;
+	paralist *params;   /* parameter list */
+	int over;   /* over-range flag */
+	int geoc;   /* geocentric latitude flag */
+        int is_latlong; /* proj=latlong ... not really a projection at all */
+        int is_geocent; /* proj=geocent ... not really a projection at all */
+	double
+		a,  /* major axis or radius if es==0 */
+		e,  /* eccentricity */
+		es, /* e ^ 2 */
+		ra, /* 1/A */
+		one_es, /* 1 - e^2 */
+		rone_es, /* 1/one_es */
+		lam0, phi0, /* central longitude, latitude */
+		x0, y0, /* easting and northing */
+		k0,	/* general scaling factor */
+		to_meter, fr_meter; /* cartesian scaling */
+
+        int     datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
+        double  datum_params[7];
+        double  from_greenwich; /* prime meridian offset (in radians) */
+        
+#ifdef PROJ_PARMS__
+PROJ_PARMS__
+#endif /* end of optional extensions */
+} PJ;
+
+/* public API */
+#include "proj_api.h"
+
+/* Generate pj_list external or make list from include file */
+#ifndef PJ_LIST_H
+extern struct PJ_LIST pj_list[];
+#else
+#define PROJ_HEAD(id, name) \
+    struct PJconsts *pj_##id(struct PJconsts*); extern char * const pj_s_##id;
+    
+#ifndef lint
+#define DO_PJ_LIST_ID
+#endif
+#include PJ_LIST_H
+#ifndef lint
+#undef DO_PJ_LIST_ID
+#endif
+#undef PROJ_HEAD
+#define PROJ_HEAD(id, name) {#id, pj_##id, &pj_s_##id},
+	struct PJ_LIST
+pj_list[] = {
+#include PJ_LIST_H
+		{0,     0,  0},
+	};
+#undef PROJ_HEAD
+#endif
+
+#ifndef PJ_ELLPS__
+extern struct PJ_ELLPS pj_ellps[];
+#endif
+
+#ifndef PJ_UNITS__
+extern struct PJ_UNITS pj_units[];
+#endif
+
+#ifndef PJ_DATUMS__
+extern struct PJ_DATUMS pj_datums[];
+extern struct PJ_PRIME_MERIDIANS pj_prime_meridians[];
+#endif
+
+#ifdef PJ_LIB__
+    /* repeatative projection code */
+#define PROJ_HEAD(id, name) static const char des_##id [] = name
+#define ENTRYA(name) \
+        C_NAMESPACE_VAR const char * const pj_s_##name = des_##name; \
+	C_NAMESPACE PJ *pj_##name(PJ *P) { if (!P) { \
+	if( (P = (PJ*) pj_malloc(sizeof(PJ))) != NULL) { \
+	P->pfree = freeup; P->fwd = 0; P->inv = 0; \
+	P->spc = 0; P->descr = des_##name;
+#define ENTRYX } return P; } else {
+#define ENTRY0(name) ENTRYA(name) ENTRYX
+#define ENTRY1(name, a) ENTRYA(name) P->a = 0; ENTRYX
+#define ENTRY2(name, a, b) ENTRYA(name) P->a = 0; P->b = 0; ENTRYX
+#define ENDENTRY(p) } return (p); }
+#define E_ERROR(err) { pj_errno = err; freeup(P); return(0); }
+#define E_ERROR_0 { freeup(P); return(0); }
+#define F_ERROR { pj_errno = -20; return(xy); }
+#define I_ERROR { pj_errno = -20; return(lp); }
+#define FORWARD(name) static XY name(LP lp, PJ *P) { XY xy = {0.0,0.0}
+#define INVERSE(name) static LP name(XY xy, PJ *P) { LP lp = {0.0,0.0}
+#define FREEUP static void freeup(PJ *P) {
+#define SPECIAL(name) static void name(LP lp, PJ *P, struct FACTORS *fac)
+#endif
+#define MAX_TAB_ID 80
+typedef struct { float lam, phi; } FLP;
+typedef struct { int lam, phi; } ILP;
+
+struct CTABLE {
+	char id[MAX_TAB_ID]; /* ascii info */
+	LP ll;      /* lower left corner coordinates */
+	LP del;     /* size of cells */
+	ILP lim;    /* limits of conversion matrix */
+	FLP *cvs;   /* conversion matrix */
+};
+
+typedef struct _pj_gi {
+    char *gridname;   /* identifying name of grid, eg "conus" or ntv2_0.gsb */
+    char *filename;   /* full path to filename */
+    
+    const char *format; /* format of this grid, ie "ctable", "ntv1", 
+                           "ntv2" or "missing". */
+
+    int   grid_offset; /* offset in file, for delayed loading */
+
+    struct CTABLE *ct;
+
+    struct _pj_gi *next;
+    struct _pj_gi *child;
+} PJ_GRIDINFO;
+
+/* procedure prototypes */
+double dmstor(const char *, char **);
+void set_rtodms(int, int);
+char *rtodms(char *, double, int, int);
+double adjlon(double);
+double aacos(double), aasin(double), asqrt(double), aatan2(double, double);
+PVALUE pj_param(paralist *, char *);
+paralist *pj_mkparam(char *);
+int pj_ell_set(paralist *, double *, double *);
+int pj_datum_set(paralist *, PJ *);
+int pj_prime_meridian_set(paralist *, PJ *);
+int pj_angular_units_set(paralist *, PJ *);
+double *pj_enfn(double);
+double pj_mlfn(double, double, double, double *);
+double pj_inv_mlfn(double, double, double *);
+double pj_qsfn(double, double, double);
+double pj_tsfn(double, double, double);
+double pj_msfn(double, double, double);
+double pj_phi2(double, double);
+double pj_qsfn_(double, PJ *);
+double *pj_authset(double);
+double pj_authlat(double, double *);
+COMPLEX pj_zpoly1(COMPLEX, COMPLEX *, int);
+COMPLEX pj_zpolyd1(COMPLEX, COMPLEX *, int, COMPLEX *);
+FILE *pj_open_lib(char *, char *);
+
+int pj_deriv(LP, double, PJ *, struct DERIVS *);
+int pj_factors(LP, PJ *, double, struct FACTORS *);
+
+struct PW_COEF {/* row coefficient structure */
+    int m;		/* number of c coefficients (=0 for none) */
+    double *c;	/* power coefficients */
+};
+ 
+/* Approximation structures and procedures */
+typedef struct {	/* Chebyshev or Power series structure */
+	projUV a, b;		/* power series range for evaluation */
+					/* or Chebyshev argument shift/scaling */
+	struct PW_COEF *cu, *cv;
+	int mu, mv;		/* maximum cu and cv index (+1 for count) */
+	int power;		/* != 0 if power series, else Chebyshev */
+} Tseries;
+Tseries *mk_cheby(projUV, projUV, double, projUV *, projUV (*)(projUV), int, int, int);
+projUV bpseval(projUV, Tseries *);
+projUV bcheval(projUV, Tseries *);
+projUV biveval(projUV, Tseries *);
+void *vector1(int, int);
+void **vector2(int, int, int);
+void freev2(void **v, int nrows);
+int bchgen(projUV, projUV, int, int, projUV **, projUV(*)(projUV));
+int bch2bps(projUV, projUV, projUV **, int, int);
+/* nadcon related protos */
+LP nad_intr(LP, struct CTABLE *);
+LP nad_cvt(LP, int, struct CTABLE *);
+struct CTABLE *nad_init(char *);
+struct CTABLE *nad_ctable_init( FILE * fid );
+int nad_ctable_load( struct CTABLE *, FILE * fid );
+void nad_free(struct CTABLE *);
+
+/* higher level handling of datum grid shift files */
+
+PJ_GRIDINFO **pj_gridlist_from_nadgrids( const char *, int * );
+void pj_deallocate_grids();
+
+PJ_GRIDINFO *pj_gridinfo_init( const char * );
+int pj_gridinfo_load( PJ_GRIDINFO * );
+void pj_gridinfo_free( PJ_GRIDINFO * );
+
+void *pj_gauss_ini(double, double, double *,double *);
+LP pj_gauss(LP, const void *);
+LP pj_inv_gauss(LP, const void *);
+
+extern char const pj_release[];
+
+struct PJ_ELLPS *pj_get_ellps_ref( void );
+struct PJ_DATUMS *pj_get_datums_ref( void );
+struct PJ_UNITS *pj_get_units_ref( void );
+struct PJ_LIST  *pj_get_list_ref( void );
+struct PJ_PRIME_MERIDIANS  *pj_get_prime_meridians_ref( void );
+ 
+#ifndef DISABLE_CVSID
+#  define PJ_CVSID(string)     static char pj_cvsid[] = string; \
+static char *cvsid_aw() { return( cvsid_aw() ? ((char *) NULL) : pj_cvsid ); }
+#else
+#  define PJ_CVSID(string)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* end of basic projections header */
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.project
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.project	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/.project	(revision 256)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>libjni-proj4</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.cbp
===================================================================
--- 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.cbp	(revision 0)
+++ 1.10/tags/gvSIG_3D_Animation_1_10_build_21_FINAL/libraries/libjni-proj4/CrsJniProj.cbp	(revision 256)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_project_file>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="1"/>
+	<Project>
+		<Option title="crsjniproj"/>
+		<Option makefile="Makefile"/>
+		<Option makefile_is_custom="0"/>
+		<Option default_target="-1"/>
+		<Option compiler="0"/>
+		<Build>
+			<Target title="default">
+				<Option output="dist\crsjniproj.dll"/>
+				<Option working_dir="."/>
+				<Option object_output="dist"/>
+				<Option deps_output=".deps"/>
+				<Option type="3"/>
+				<Option compiler="0"/>
+				<Option createDefFile="1"/>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-DBUILDING_DLL=1"/>
+			<Add directory="include"/>
+			<Add directory="C:\j2sdk1.4.2_11\include\win32"/>
+			<Add directory="C:\j2sdk1.4.2_11\include"/>
+		</Compiler>
+		<Unit filename="src\crsJniProj.c">
+			<Option compilerVar="CC"/>
+			<Option target="default"/>
+		</Unit>
+	</Project>
+</CodeBlocks_project_file>
