Skip to content
Search

Geographic Coordinate Systems

lastmod 2025-01-20created 2014-07-1011 edits

A geographic coordinate system is a coordinate system that enables every location on the Earth to be specified by a set of numbers.

A geographic coordinate system (地理座標系) allows every location on the Earth to be specified by three coordinate values of a spherical coordinate system aligned with the Earth's axis of rotation. Coordinates on a sphere are given using latitude and longitude. One great circle passing through the North Pole is taken as the reference, and the Royal Observatory in Greenwich, England is taken as 0 degrees longitude. How far it has rotated about the Earth's axis from that great circle is called the longitude. Angular units are used.

Spatial references, EPSG codes, and PROJ.4 parameters

Spatial reference

EPSG

PROJ.4 parameters

WGS84 longitude/latitude

4326

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

Bessel 1841 longitude/latitude

4004

+proj=longlat +ellps=bessel +no_defs

Coordinate system resources

Guide to coordinate systems in Great Britain (PDF) 1
This guide can be considered essential reading for anyone trying to work with coordinates in Great Britain. It is a gentle introduction and an excellent source of information on the often confusing subjects of GPS and Ordnance Survey coordinate systems.

Measuring the distance between two coordinates

The distance we talk about comes in several kinds: slope distance, distance on the geoid surface, spherical distance on the ellipsoid surface, and so on.
If the heights of the two points are unknown, the distance can first be calculated as a spherical distance.

Calculating the distance between two WGS84 points: PHP Example

function _deg2rad($deg)
{
    $radians = 0.0;
    $radians = $deg * M_PI/180.0;
    return($radians);
}

function geoDistance($lat1, $lon1, $lat2, $lon2, $unit="k")
{
    $theta = $lon1 - $lon2;
    $dist = sin(_deg2rad($lat1)) * sin(_deg2rad($lat2)) + cos(_deg2rad($lat1)) * cos(_deg2rad($lat2)) * cos(_deg2rad($theta));
    $dist = acos($dist);
    $dist = rad2deg($dist);
    $miles = $dist * 60 * 1.1515;
    $unit = strtolower($unit);

    if ($unit == "k") {
        return ($miles * 1.609344);
    } else {
        return $miles;
    }
}

See also

Favorite site

References


  1. A_Guide_to_Coordinate_Systems_in_Great_Britain.pdf ↩

author Zer0 sitemap