[Proj] How to Reengineering the cs2cs tool

Gerald I. Evenden geraldi.evenden at gmail.com
Thu Jun 4 08:05:49 PDT 2009


On Thursday 04 June 2009 4:29:44 am BalaVignesh Kasinathan wrote:
> Dear Friends,
>           I am very newbie to projection concepts. I am in need to write
> the cs2cs tool in php/perl language to convert the coordinates from source
> epsg-2393 to target epsg-4326. Initially i tried to understand the cs2cs
> tool code. I can't understand the whole structure of the code , as it
> contains more mathematical functions. So i have started to trace the code
> linebyline using anjuta debugger. But i dont think this one is the correct
> way. As the code contains more 'if' checks i may miss some flow of the
> code.
>
>    Please give some guide lines to understand the concept of cs2cs tool.
> Where can i get the direct mathematic formulas? So i can directly code it
> on php or perl without looking the C code.
>
> Thanks in Advance,
> Bala

Given this initial request and subsequent interchange I cannot help but feel 
that you are very deeply in over you head.

First of all, all of the mathematics of the material in cs2cs is out there but 
it is widely diseminated and would require a good deal of work to merely 
assemble the sources.  I have done a portion of this in the libproj4 manual 
but it is not complete nor would I consider it a prime source.

Secondly, one does need to be reasonably competent in mathematics and at a 
collegiate softmore level. I get the feeling that you are not.

Secondly, you mention in one of the emails that you were looking for 
performance and needed to compute quantities of points.  I do *not* consider 
php nor perl suited for this type of work.  From my understanding, php is 
primarily for html/web site purposes and perl is an interpreter language and 
this certainly does not make it suitable for high volume applications.

I believe the previous advice to link to the existing DLLs is your best 
option.

I sincerely hope you reevaluate your problem.

-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist



More information about the Proj mailing list