2017 © Pedro Peláez
 

library normalize-coordinate

Normalize Longitude and Latitude coordinate.

image

zackad/normalize-coordinate

Normalize Longitude and Latitude coordinate.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

PHP Normalize Coordinate

travis-ci GitHub license, (*1)

Library to normalize Geographic Coordinate System (GCS) so the coordinate will be in the range of, (*2)

-180 < longitude < 180
-90  < latitude  < 90

Installation

Install with composer, (*3)

composer require zackad/normalize-coordinate

Usage

use Zackad\GIS\Coordinate\Normalize as Coordinate;

$coord = new Coordinate;

echo $coord->normalizeLongitude(200);
// will output '-160'

echo $coord->normalizeLatitude(-200);
// will output '20'

echo $coord->normalize(541.45, -90.55);
// will output '[-178.55, -89.45]'

API

normalize($longitude, $latitude) : return an array of coordinate point [x, y] or [longitude, latitude], (*4)

normalizeLatitude($latitude) : return normalized latitude coordinate whitin -90 < latitude < 90, (*5)

normalizeLongitude($longitude) : return normalized longitude coordinate whitin -180 < longitude < 180, (*6)

The Versions

04/06 2018

dev-master

9999999-dev

Normalize Longitude and Latitude coordinate.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

30/05 2018

dev-remove-composer-lock

dev-remove-composer-lock

Normalize Longitude and Latitude coordinate.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

29/12 2017

v0.1.1

0.1.1.0

Normalize Longitude and Latitude coordinate.

  Sources   Download

MIT

The Development Requires

18/12 2017

v0.1.0

0.1.0.0

Normalize Longitude and Latitude coordinate.

  Sources   Download

MIT

The Development Requires