# how can i convert this?

 0 latitude : 42.358372000000003 longitude : -8.8580850000000009 how can I convert to Latitude: 42° 21' N Longitude: 8° 51' W ?? Any tools (js scripts, libraries..) ?? thanks! asked 17 Jan '12, 18:32 afterbit 11●2●2●3 accept rate: 0%

 2 How hard could it be? ``````sLat = (lat -lat%1) + "° " + (lat%1)*60 + "' " + (lat>0?"N":"S") sLon = (lon -lon%1) + "° " + (lon%1)*60 + "' " + (lon>0?"E":"W") `````` It is not like you need proj4js or anything when you are just converting the display style. answered 17 Jan '12, 21:01 Gnonthgol ♦ 13.7k●16●101●198 accept rate: 16% wonderfull! (18 Jan '12, 09:19) afterbit 1 On the other hand, proj4js will let you convert between quite a few weird local grids, so it's good to keep in mind. (18 Jan '12, 10:33) Vincent de P... ♦
 3 A pocket calculator (computer, mobile phone, etc.) should do it. A minute is a sixtieth of a degree, so take the decimal part of the position in degrees and multiply it by 60 to convert it to minutes. Thus in the example that you gave, latitude 42.358372° becomes 42° (0.358372 x 60)', or 42°21.502'. Next, you need to know that negative latitude means South of the equator, and negative longitude means West of the Greenwich meridian. That is simply a convention adopted by all geographers. So your position becomes N42°21.502' W8°51.485'. That is the format most commonly used for navigation at sea, where it is useful because a minute of latitude is a nautical mile. The same format is used for geocaching. You can, if you wish, convert the minutes to minutes and seconds in the same way, as a second is simply a sixtieth of a minute. Expressed in that way, the position that you used as an example is N42°21'30" W8°51'29". It's in the coastal waters off North West Spain. answered 17 Jan '12, 22:30 Madryn 2.2k●36●51●80 accept rate: 13% Gnonthgol ♦ 13.7k●16●101●198 thank you very very much!! (18 Jan '12, 09:18) afterbit
 toggle preview community wiki:

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Question tags:

×1

question asked: 17 Jan '12, 18:32

question was seen: 3,387 times

last updated: 02 Feb '12, 10:31