Skip to main content


Edit: I'm an idiot who confused diameter with circumference for some reason. Embarrassing original post follows.

Was playing around a bit with the OpenWeatherMap API. I wanted to know how precise I needed to be with the latitude & longitude values, so I decided to do some quick calculations.

To get a rough idea, I wanted to determine how much a change of one degree of latitude would move in kilometers. I knew the diameter of the earth was something fairly close to 40,000 km but wanted to verify that factoid. I did a quick duckduckgo search, and the top three results (on seemingly separate web sites) all said 12,756 km. In fact one of them hilariously said 12.756 km.

I assume this is the result of LLMs filling the internet with crap, but it's alarming that if I didn't know any better, I'd have just blindly accepted this as fact.

Unknown parent

Jonathan Lamothe
@𝚛𝚊𝚝 Yeah, I just realized my mistake...
in reply to Jonathan Lamothe

Jon .. I use the weather desklet on Linux Mint with OpenWeatherMap and the API. You have to apply to get the API key. There were 2 ways to get a location, by zip code or by giving them your City/State. My town is but 24K residents and they gave me a city code that was perfect. No lat/long necessary!
in reply to PerryM ✅

@PerryM ✅ Yeah, but the real problem here was my stupidity. 😛

I don't think post editing works on Diaspora, so you probably can't see the correction, but I confused diameter and circumference.

Edit: why did I think you were on Diaspora? I'm clearly on a roll today.

in reply to Jonathan Lamothe

Jon, oh OK. If you would like to check yourself, go to Google Maps. Find your city and zoom into your house. Place the location pin on your front porch or chimney or tree in your yard and there is the EXACT long/lat for you. No calc necessary.
in reply to PerryM ✅

@PerryM ✅ Yeah, I have the latitude and longitude. I just wanted to know how precise I needed to be with the value. It turns out that rounding to the nearest 0.1° is probably good enough to get the local weather, but not for a precise geolocation fix.
in reply to Jonathan Lamothe

Also:

Please note that built-in geocoder has been deprecated. Although it is still available for use, bug fixing and updates are no longer available for this functionality.


Source: openweathermap.org/current

in reply to Jonathan Lamothe

12.756 km may be a locale difference; if the site wasn't US or UK-based the decimal might be the thousands separator.

the diameter of the earth was something fairly close to 40,000 km


s/diameter/circumference/?

in reply to Ryan Frame

@Ryan Frame Yeah, that was my mistake. I edited the post to reflect that, but Diaspora doesn't support edits.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.