[Proj] pj_transform performance issue

Herve Baille hb at meteorage.com
Mon Nov 12 11:32:01 EST 2007


Hi Frank and Grek

Thanks for your answers.
> I'm quite surprised, and I don't know why you would see such a 
> performance
> problem.
Me too and I have also the feeling that it does not make sense.
But it is like this, as if pj_transform remember the address of the 
coordinates array, to compute (or not) some projection coefficients to 
speed up the calculation?
We can easily update our program to pass coordinates by address.

> But I will say that if trans() takes the x,y values by value
> (as shown), then the calling variables will not be changed.  If you want
> the values actually altered outside trans() they need to be passed by
> reference.
The example is a reduction of a real case and does not make sens as is.
It is just for testing.
> I will note that it is highly desirable to pass many points to
> pj_transform() at once.  Transforming points with one per call
> is relatively expensive.
Effectively, a single call with a 100000 coordiantes array is computed 
in 2 seconds!
Unfortunately, we cannot do this in our context, but this is our problem.

Thanks again
Hervé


-- 
***************************

Hervé BAILLE <herve.baille at meteorage.com>
Software development manager

Sté Météorage
2 av Angot
64053 PAU
France

CATS support <support at meteorage.com>
***************************



More information about the Proj mailing list