Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: 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

share|improve this question
(1) What software are you using? (2) Are you concerned about the moon "Europa" or the earth continent "Europe"? – whuber Jan 2 '14 at 15:36
n, rho0 and F are all constants for a particular projected CRS. Are you calculating them outside the main loop and reusing the results? – mkennedy Jan 2 '14 at 16:47
@whuber I am not using any SW, I am writing code myself in C++. I am concerner about the continent "Europe". – Martin Perry Jan 2 '14 at 16:51
@mkennedy Yes.. all of those are calculated in Init function. Then those values are reused – Martin Perry Jan 2 '14 at 16:52
Thanks. How many points are you projecting? During three minutes with one core you should be able to project at least 10^9 points with the Mercator projection, but no map really needs that many points. (If you are transforming an image you shouldn't be computing the projection of every pixel and if you are transforming vector data you would be processing invisible details.) Perhaps the issue to address concerns how to simplify the map features rather than how to speed up the calculation of the Lambert conformal conic projection. – whuber Jan 2 '14 at 20:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.