[OSRS-PROJ] On Proj4...

Paul Selormey paul at toolscenter.org
Thu May 30 07:16:33 EDT 2002


Hello All,
As I have stated earlier, I am working to remove all the macros style codes
to a more readable version of the projection library.

With the exception of the PROJ_HEAD in the pj_list.h file, I have completed
the removal from all other files. I am not removing the constants.

I have found two problems and need some help...

1. One file strtod.c is a GPL code. Is the Proj4 therefore not under GPL?
and other libraries using it?

2. One file biveval.c still contains one pre-ANSI C function.

/* basic bivariate Chebyshev evaluation */
static double ceval(C, n) struct PW_COEF *C;
{
....
}

what is the right ANSI version of this function. I could not get this right
(it seems the "n" is an integer!) :(

I will post the final codes for all to evaluate and then start work on
porting to C++.
I know many will still prefer this

----------------------------------------------------------------------------
-----------
ENTRY0(leac)
 P->phi2 = pj_param(P->params, "rlat_1").f;
 P->phi1 = pj_param(P->params, "bsouth").i ? - HALFPI: HALFPI;
ENDENTRY(setup(P))
----------------------------------------------------------------------------
----------

to this:

----------------------------------------------------------------------------
---------
const char * const pj_s_leac = des_leac;

PJ *pj_leac(PJ *P)
{
 if (!P)
 {
  if( (P = pj_malloc(sizeof(PJ))) != ((void *)0))
  {
   P->pfree = freeup;
   P->fwd = 0;
   P->inv = 0;
   P->spc = 0;
   P->descr = des_leac;
  }
  return P;
 }
 else
 {
  P->phi2 = pj_param(P->params, "rlat_1").f;
  P->phi1 = pj_param(P->params, "bsouth").i ? - HALFPI: HALFPI;
 }
 return (setup(P));
}
----------------------------------------------------------------------------
--------

However, the macro-free version will make it earsier to port the library to
C++/Java/C# etc
and that is my goal.

Best regards,
Paul.


----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list