2017 © Pedro Peláez
 

library geotools

A lightweight set of tools for working with geodata in PHP.

image

weejames/geotools

A lightweight set of tools for working with geodata in PHP.

  • Monday, August 11, 2014
  • by weejames
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Geotools

Build Status, (*1)

A library that provides some simple tools for working with location data., (*2)

Distance Calculations

$startPoint = new \WeeJames\Geotools\Geopoint(
    55.8580,
    4.2590
);

$targetPoint = new \WeeJames\Geotools\Geopoint(
    40.7127,
    74.0059
);

$distanceToTarget = $startPoint
                        ->distance()
                        ->to($targetPoint)
                        ->using(\WeeJames\Geotools\Tools::ALGORITHM_HAVERSINE)
                        ->is();

Available algorithms

Haversine \WeeJames\Geotools\Tools::ALGORITHM_HAVERSINE (Most accurate), (*3)

Flat (default) \WeeJames\Geotools\Tools::ALGORITHM_FLAT (Faster, but loses accuracy over long distances), (*4)

Available units

Kilometers \WeeJames\Geotools\Tools::GEO_UNIT_KM, (*5)

Miles \WeeJames\Geotools\Tools::GEO_UNIT_MILES, (*6)

The Versions

11/08 2014

dev-master

9999999-dev

A lightweight set of tools for working with geodata in PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php geo geotools