承接 labrodev/haversine 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

labrodev/haversine

Composer 安装命令:

composer require labrodev/haversine

包简介

Utility library that provides a lightweight method to calculate the great-circle distance between two geographic coordinates using the Haversine formula.

README 文档

README

Labrodev\Haversine is a strict PHP 8.1+ utility library that provides a lightweight method to calculate the great-circle distance between two geographic coordinates using the Haversine formula.

Features

  • Calculates accurate distance between two latitude/longitude points
  • Returns result in kilometers
  • Based on the Haversine formula (spherical Earth model)
  • Fully static and type-safe class
  • Lightweight, dependency-free implementation
  • Includes PHPUnit and PHPStan support for testing and analysis

Installation

composer require labrodev/haversine

Usage

use Labrodev\Haversine\Calculator;

// Distance in kilometers between Paris and Frankfurt
$distance = Calculator::haversineDistance(48.8566, 2.3522, 50.1109, 8.6821);

echo $distance; // e.g., 478.5 

Testing

To run tests:

composer install
composer test

Static Analysis

To run static analysis using PHPStan:

composer install
composer analyse

Configuration is located in phpstan.neon.dist

Security

If you discover a security vulnerability within this package, please contact us immediately at contact@labrodev.com. All security-related issues will be handled privately and promptly.

Credits

This package is maintained by Labrodev — Laravel & PHP development studio.
https://github.com/labrodev

Feedback

If you have any questions, suggestions, or have found an error — feel free to open an issue or contact us:
contact@labrodev.com

License: MIT

统计信息

  • 总下载量: 344
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固