Re: Worldmap mercator projection - Latitude to Y calculation.

"R.Wieser" <[email protected]> Fri, 16 Jan 2026 07:48:22 +0100
Newsgroups alt.comp.os.windows-xp,alt.windows7.general,alt.comp.os.windows-10
Organization A noiseless patient Spider
Message-ID <[email protected]>
J.P. ,

> [John by the way :-) ]

John,

> I replied to the posting I did, thinking I was the only respondent -
> probably in the W7 'group; I saw the other responses when I moved
> to one of the other 'groups, but too late then to amend my post.

There was nothing wrong with your post or suggestion, I just thought that 
you being able to see what others wrote would be beneficial to us both.

>>> If it _is_ light-source-at-centre, then the Y co-ordinate would just be
>>> the tangent of the latitude
>>
>> But why than do all the formules I now have (four at the moment)
>> all do a tan() and than wrap that up in a log() ?    There must be
>> something to it.
...
> Indeed! But I can't think what.

Same here. But I'm no math wizz.

> Did you _try_ using just the tangent on a couple of places? Or perhaps
> just a couple of latitudes, to see if the lines come out where they are
> on the plot?

:-)  I did so before posting to you and got a rather promising result - on 
the image I provided a link to.  But I have no idea if it will also work 
well on an image multiple times as big (where differences will be more 
prominent).

iow, I'm only eyeballing the results, and have nothing to numerically 
compare them with. :-|

> You'd probably have to do that in the first place anyway,
> to see what the vertical scale _is_; if doing that for say the ten and
> forty degree lines (assuming that's what the ones on the plot are) gives
> different scales, then you'd know it isn't just that.

Yep, thats what I've been doing.

By the way, the lines on the image are 15 degrees apart horizontally, and 
from it I assume vertically as well.  This means that the highest visible 
line is at 75 degrees latitude.

Ah, I just went back to the wikipedia page* and noticed that the "web 
Mercator" projection mentions "and clips latitudes to ~85.05° for square 
presentation".  I'm now assuming thats about the image itself.   Another 
assumption is that its also true for the "Mercator = Wright" projection.

* https://en.wikipedia.org/wiki/List_of_map_projections

I have to do some more experiments.    Though I'm a bit afraid that a 
tan()-only solution will only be good enough for smaller images, where the 
differences (compared to the actual formule) are barely noticable.  Not 
really what I'm after, but will probably use it as long as I can't get the 
official formule(s) to work.

.... But it *does* bother me that I can't get those official ones to work. 
:-(

Regards,
Rudy Wieser