Geographic coordinate conversion: Difference between revisions
JeremyCole (talk | contribs) No edit summary |
JeremyCole (talk | contribs) No edit summary |
||
Line 31: | Line 31: | ||
40:26:46N 40 |
40:26:46N 40 |
||
W87°43' |
W87°43'41 87 |
||
A sphere is divided into 360 degrees. The number space is divided into two halves, East and West in the case of longitude and North and South in the case of latitude. The maximum ranges are as follows: |
A sphere is divided into 360 degrees. The number space is divided into two halves, East and West in the case of longitude and North and South in the case of latitude. The maximum ranges are as follows: |
||
Line 59: | Line 59: | ||
40:26:46N <math>\frac{26}{60}</math> |
40:26:46N <math>\frac{26}{60}</math> |
||
W87°43' |
W87°43'41 <math>\frac{43}{60}</math> |
||
===Seconds=== |
===Seconds=== |
||
40:26:46N 46 |
40:26:46N <math>\frac{46}{60}</math> |
||
W87°43' |
W87°43'41 <math>\frac{41}{60}</math> |
Revision as of 08:36, 26 November 2003
Geographic coordinates consist of latitude and longitude. There are many ways of writing coordinates, and converting between the different ways is non-obvious but also quite trivial.
Ways of Writing Coordinates
All of the following are valid and acceptable ways to write geographic coordinates:
- 40:26:46N,79:56:55W
- 40:26:46.302N 79:56:55.903W
- 40°26'21"N 79°58'36"W
- 40d 26' 21" N 79d 58' 36" W
- 40.446195N 79.948862W
- 40.446195, -79.948862
Basic Forms
There are three basic forms of a coordinate.
- Coordinate containing degrees (integer), minutes (integer), and seconds (integer, or real number).
- Coordinate containing degrees (integer) and minutes (real number).
- Coordinate containing only degrees (real number).
All forms of coordinates are capable of representing the same amount of data and the same precision. Depending on which type of coordinate you are provided with, and which type you would like to work with, you may have to do some conversion.
Components of a Typical Coordinate
In it's most simple form a coordinate is just a number of degrees. The tricky part comes in when you need to differentiate North/South latitude or West/East longitude, or make the number more digestable by writing it with minutes and seconds instead of as a decimal number.
Degrees
The degrees portion of the coordinate is always going to be the easiest to figure out. The degrees is always the left-most whole number. For example:
40:26:46N 40 W87°43'41 87
A sphere is divided into 360 degrees. The number space is divided into two halves, East and West in the case of longitude and North and South in the case of latitude. The maximum ranges are as follows:
Longitude 180 W = -180 180 E = 180
Latitude 90 N = 90 90 S = -90
Technically you could have latitudes greater than 90 or less than -90, but this is an ambiguous case, since there would be an equivalent coordinate with an inverse longitude.
The minimal case is that you have only degrees:
40.446111 or 40.446111N
Minutes
Minutes are an optional component, as is implied by the minimal case of degrees. Minutes are actually the numerator component of a fraction of 60.
With the same examples as above:
40:26:46N W87°43'41
Seconds
40:26:46N W87°43'41