2017 © Pedro Peláez
 

library gps

GPS coordinates manipulation

image

juliangut/gps

GPS coordinates manipulation

  • Wednesday, April 8, 2015
  • by juliangut
  • Repository
  • 1 Watchers
  • 1 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status Code Climate Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads, (*1)

Juliangut GPS coordinates manipulation

GPS coordination handler and manipulation library., (*2)

Installation

Best way to install is using Composer:, (*3)

php composer.phar require juliangut/gps

Then require_once the autoload file:, (*4)

require_once './vendor/autoload.php';

Usage

// Create a point with or without coordinates
$gpsPoint = new Point();
$gpsPoint = new Point('48° 0.858277778N, 2°0.2945 E'); // Eiffel tower

// Set coordinates together
$gpsPoint->set('41.9, 12.5'); // Rome

// Set separated coordinates for Empire State Building
$this->point->setLatitude('40°44′ 54.3″N');
$this->point->setLongitude('73° 59′9″ W');

echo $gpsPoint->get(Point::FORMAT_DD); // Default if none especified
echo $gpsPoint->get(Point::FORMAT_DM);
echo $gpsPoint->get(Point::FORMAT_DMS);

Available formats

Any of the following formats can be used to set and retrieve GPS coordinates:, (*5)

  • Decimal Degrees (DD) Point::FORMAT_DD, eg: '41.9,12.5'
  • Decimal Minutes (DM) Point::FORMAT_DM, eg: '48°0.858277778N 2°0.2945E'
  • Degrees Minutes Seconds (DMS) Point::FORMAT_DMS, eg: '40°44′54.3″N,73°59′9″W'

Considerations

When setting coordinates spaces and comma are completely optional, there is no difference between , 40° 44′ 54.3″ N, 73° 59′ 9″ W and 40°44′54.3″N73°59′9″W, (*6)

When setting coordinates you can use or ' for minutes and or " for seconds (review raw document to see the difference between them), (*7)

When retrieving coordinates won't have any spaces, (*8)

When retrieving coordinates ' and " will be used for minutes and seconds. Coordinates will be comma separated, (*9)

Contributing

Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before, (*10)

See file CONTRIBUTING.md, (*11)

License

Release under BSD-3-Clause License.

See file LICENSE included with the source code for a copy of the license terms, (*12)

The Versions

08/04 2015

dev-master

9999999-dev http://github.com/juliangut/gps

GPS coordinates manipulation

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

gps coordinates

28/03 2015

0.1

0.1.0.0 http://github.com/juliangut/gps

GPS coordinates manipulation

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

gps coordinates