I am trying to calculate map of Europa in Lambert projection. I am using formula from wikipedia (Lambert wiki), but calculation is verřy slow with comparison to Mercator. I know, there are sin, cos, cotg and pow to calculate (mercator has only one tan and ln), but the difference is almost 30 minutes (Mercator is done in about 3 minutes).
Is there some kind of speed up, or similar projection, that can be used ? I also need to put result into image with width and hight. For Mercator, I am using this: http://stackoverflow.com/questions/5983099/converting-longitude-latitude-to-x-y-coordinate. Can it be altered to Lambert (or Lambert similar) projection ? Because if I use same approach only witch changed formulas for projection, Lambert is moved to upper part of image and I can see only part of Europe)
EDIT: Added code
double longitude = lon * (MPI / 180.0); double latitude = lat * (MPI / 180.0); double lambertPhi = this->lambertF * pow(cot(0.25 * MPI + 0.5 * latitude), this->lambertN); lonOut = lambertPhi * sinf(this->lambertN * longitude); latOut = this->lambertPhi0 - lambertPhi * cosf(this->lambertN * longitude);
All this-> variables are precomputed only once