|MapGazer – Coordinate formats|
Latitude and longitude coordinates can be written in many different formats, including pure degrees, degrees and minutes, and degres with minutes and seconds. All of these may be signed (+ or −) or may have their direction indicated by North or South of the equator (for latitude) or East or West of the Greenwich meridian (for longitude). MapGazer uses the 1984 World Geodetic System (WGS84) coordinate system.
Displayed formatsYou may select the format that MapGazer uses for displaying coordinates using the Settings → Coordinate formats menu items, which lets you choose between:
MapGazer accepts all the above formats when parsing entered coordinates, as in the Map → Go to coordinates dialog (available from menus, or press the ‘g’ key):
It also accepts a number of variations, including:
A more formal description of what is accepted is below. Here are some examples:
Input formats definition
A position is described by a text string that contains two coordinates: a latitude and a longitude (in that order) in a variety of formats.
The overall format is (square brackets indicate optional parts):
[whitespace] latitude separation longitude [whitespace]
where whitespace is zero or more tabs and spaces in any combination and separation is whitespace then an optional comma followed by more whitespace, and must have at least one tab, space, or comma.
latitude and longitude are of the form:
[sign] amount [sign]
where sign for latitude is one of ‘Nn+’ for a latitude north of or including the equator and is one of ‘Ss−’ for a latitude south of or including the equator; similarly, the sign for longitude is one of ‘Ee+’ for a longitude east of or including the Greenwich meridian and is one of ‘Ww−’ for a a longitude west of or including the Greenwich meridian. In both cases, only one sign (before or after the amount) is allowed, and the default sign is ‘+’.
amount is of the form:
number [degchar [number [minchar [number [secchar]]]]]
where each number is an unsigned decimal number which must start with a digit. Only the final number included in the coordinate may include an embedded decimal point and following decimal digits (fractional part). The three numbers are valued as degrees, minutes, and seconds respectively.
The first number must be in the range 0 through 90 (for latitude) or 0 through 180 (for longitude). The other two numbers may be 0 up to (but not including) 60. Extra leading zeros are permitted for all numbers.
The accepted separator characters are:
degchar: ':', 'o', or degree symbols ('\xb0', '\xba', '\xf8')
For example, the following strings are accepted:
Note that latitude and longitude are not required to use the same notations.
|MapGazer and these web pages were written by Mike Cowlishaw; Please send me any corrections, suggestions, etc.|
All content © Mike Cowlishaw, 2014–2018,
except where marked otherwise. All rights reserved. The pages here,
and the MapGazer program, are for non-commercial use only.
records no personal information and sets no ‘cookies’.
However, statistics, etc. might be recorded by the web hosting
This page was last updated on 2017-12-03 by mfc.