Log in

No account? Create an account
Trevor Stone's Journal
Those who can, do. The rest hyperlink.
29th-Jan-2004 02:21 pm
asia face of the earth relief
I know the difference between longitude and latitude. Longitude lines go "up and down" (when north is at the top) and they bend. Latitude lines are straight and horizontal. All latitude lines are the same length, spanning from the north pole to the south pole. The distance between longitude lines varies depending how far you are from the equator. Latitude lines are all parallel, but the further they are from the equator, the smaller their circle. Latitude increases as you move north and decreases as you move south. Longitude increases as you move east and decreases when you move west.

I know all of that. So why, when I'm writing code, am I just as likely to incorrectly use $latitude when I mean $longitude than I am to get it right? I suspect two things play a factor. First, both start with "l" and end with "itude." If one was "verticality" and the other was "horizontism" I'm sure I wouldn't get it wrong. But there's a sneakier reason. As you move along a line of latitude, your longitude changes. If I drive along Baseline Rd, I'm going east on 40° north. And if you want to go due north or south, you stay on your longitude line.

Update: I also would have saved myself some greif if I'd writted $right->{longitude} instead of $right->{longitue}. use strict is great, but using hash refs all over the place partly defeats the purpose. I may enjoy moving back to strong typing and class-based objects next week. I may, however, dearly miss closures.

[ Simulated Persona = "Barbie" ] Analytic spherical geometry is HARD.
30th-Jan-2004 05:09 am (UTC)
Nitpick: Longitude lines are actually "straight" and latitude lines aren't, with respect to the surface of the earth. Since it's a sphere you really gotta use elliptic geometry.
This page was loaded Jan 16th 2019, 3:01 am GMT.