gpupo/coordinate

This package is abandoned and no longer maintained. No replacement package was suggested.

Geographic coordinate conversion

dev-master / 1.0.x-dev 2018-04-10 13:04 UTC

This package is auto-updated.

Last update: 2020-02-11 18:15:26 UTC


README

See Geographic coordinate conversion

Build Status

Features

  • Convert a DMS (Degrees, Minutes, Seconds) coordinate such as W87°43′41″, into decimal format longitude / latitude

Usage


<?php

use Gpupo\Coordinate\Conversion;

$conversion = new Conversion;
$dec = $conversion->dmsToDec('42°19\'58"N 87°50\'01"W');

echo $dec['lat']; // output 42,332778

echo $dec['lng'];// output: -87,833611

Install

The recommended way to install is through composer.

{
    "require": {
        "gpupo/coordinate": "dev-master"
    }
}

Todo

  • Convert a Decimal format into DMS