markbaker/phpgeodetic 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

markbaker/phpgeodetic

Composer 安装命令:

composer require markbaker/phpgeodetic

包简介

Geodetic library

README 文档

README

PHPGeodetic is a library written in PHP, providing a set of classes for the handling Geodetic of Latitude/Longitude and ECEF coordinates, and conversions between datums

This library provides methods for:

  • Conversion of angles (bearings, latitudes and longitudes) between degrees, radians, minutes, seconds and gradians.
  • Conversion of distance between metres and kilometres, miles, nautical miles, yards, feet, inches and astronomical units.
  • Conversion of areas between square metres, kilometres, hectares, square miles, square yards, acres, etc.
  • Calculation of Reference Ellipsoid derived properties such as eccentricity; mean, authalic and volumetric radii; and radius of curvature in the prime vertical and the meridian
  • Conversion of positions between Latitude/Longitude and ECEF (Earth-Centred, Earth Fixed); and vice versa.
  • Conversion of positions between Latitude/Longitude and UTM (Universal Transverse Mercator); and vice versa.
  • Helmert Translations for conversion between datums.
  • Great Circle distance calculations using either the Haversine or Vincenty formulae.
  • Calculation of Initial and final bearings, and midpoint value for great circle routes.
  • Calculation of destinations from a start point, initial bearing and distance.
  • Calculation of perimeter, area and centrepoint for regions on an ellipsoid

Requirements

  • PHP version 5.3.0 or higher

Installation

We recommend installing this package with Composer.

Via composer

In your project root folder, execute

composer require markbaker/phpgeodetic:dev-master

You should now have the files composer.json and composer.lock as well as the directory vendor in your project directory.

You can then require the Composer autoloader from your code

require 'vendor/autoload.php';

Or, if you already have a composer.json file, then require this package in that file

"require": {
    "markbaker/phpgeodetic": "dev-master"
}

and update composer.

composer update

From Phar

Although we strongly recommend using Composer, we also provide a Phar archive builder that will create a Phar file containing all of the library code.

The phar builder script is in the repository root folder, and can be run using

php buildPhar.php

To use the archive, just require it from your script:

require 'Geodetic.phar';

Standard Autoloader

If you want to run the code without using composer's autoloader, and don't want to build the phar, then required the bootstrap.php file from the repository in your code, and this will enable the autoloader for the library.

require 'bootstrap.php';

Want to contribute?

Fork this library!

License

PHPGeodetic is licensed under LGPL (GNU LESSER GENERAL PUBLIC LICENSE)

markbaker/phpgeodetic 适用场景与选型建议

markbaker/phpgeodetic 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.02k 次下载、GitHub Stars 达 20, 最近一次更新时间为 2014 年 12 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「geo」 「geodetic」 「ellipsoid」 「latitude」 「longitude」 「mercator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 markbaker/phpgeodetic 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 markbaker/phpgeodetic 我们能提供哪些服务?
定制开发 / 二次开发

基于 markbaker/phpgeodetic 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 13.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 19
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL
  • 更新时间: 2014-12-30