2017 © Pedro Peláez
 

library spherical-geometry

This library provides classes and functions for the computation of geometric data on the surface of the Earth. Code ported from the Google Maps API.

image

javidalpe/spherical-geometry

This library provides classes and functions for the computation of geometric data on the surface of the Earth. Code ported from the Google Maps API.

  • Sunday, June 17, 2018
  • by javidalpe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Spherical Geometry

This library provides classes and functions for the computation of geometric data on the surface of the Earth. Code ported from the Google Maps API., (*1)

Install

Require this package with composer using the following command:, (*2)

composer require javidalpe/spherical-geometry

API

SphericalUtil::computeHeading, (*3)

Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range [-180,180)., (*4)

SphericalUtil::computeOffset, (*5)

Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north)., (*6)

SphericalUtil::computeOffsetOrigin, (*7)

Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available., (*8)

SphericalUtil::interpolate, (*9)

Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng., (*10)

SphericalUtil::computeAngleBetween, (*11)

Returns the angle between two LatLngs, in radians. This is the same as the distance on the unit sphere., (*12)

SphericalUtil::computeDistanceBetween, (*13)

Returns the distance between two LatLngs, in meters., (*14)

SphericalUtil::computeLength, (*15)

Returns the length of the given $path, in meters, on Earth., (*16)

SphericalUtil::computeArea, (*17)

Returns the area of a closed $path on Earth., (*18)

SphericalUtil::computeSignedArea, (*19)

Returns the signed area of a closed path on Earth. The sign of the area may be used to determine the orientation of the path. "inside" is the surface that does not contain the South Pole., (*20)

License

The Spherical Geometry is open-sourced software licensed under the MIT license, (*21)

The Versions

17/06 2018

dev-master

9999999-dev

This library provides classes and functions for the computation of geometric data on the surface of the Earth. Code ported from the Google Maps API.

  Sources   Download

MIT

The Development Requires

by Javier Vidal