ricklab / location
A library of PHP objects for spatial calculations
Installs: 22 604
Dependents: 0
Suggesters: 0
Security: 0
Stars: 14
Watchers: 4
Forks: 5
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- ext-json: *
Requires (Dev)
- ext-simplexml: *
- friendsofphp/php-cs-fixer: ^3.13
- phpbench/phpbench: ^1.2
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^5.16
- dev-main
- v6.0.2
- v6.0.1
- v6.0.0
- v6.0.0-rc.2
- v6.0.0-rc.1
- v5.0.1
- v5.0.0
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.0
- 3.0.x-dev
- v3.0.0
- v3.0.0-rc1
- v2.2.1
- v2.2
- v2.1
- 2.0.x-dev
- 2.0
- 1.2.x-dev
- dev-feature/v7-transformers
- dev-upgrade/php-8.3
- dev-upgrade/php8.2
- dev-refactor/remove-json-wkt-from-classes
- dev-update/tools
- dev-feature/additional-distance-formulae
- dev-refactor/calculators
- dev-feature/geohash
- dev-feature/comparison-methods
- dev-fix/get-geometries-call
- dev-refactor/php7-upgrade
- dev-vincenty
This package is auto-updated.
Last update: 2024-12-15 15:52:41 UTC
README
A library for geospatial calculations in PHP.
Installation
Using composer, run composer require ricklab/location
Usage
A brief example of how this library can be used:
$point = new Ricklab\Location\Geometry\Point($longitude, $latitude);
$point2 = new Ricklab\Location\Geometry\Point($lon2, $lat2);
$distance = $point->distanceTo($point2, 'miles');
$line = new Ricklab\Location\Geometry\LineString([$point, $point2]);