Download the PHP package jundayw/location-based-services without Composer
On this page you can find all versions of the php package jundayw/location-based-services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jundayw/location-based-services
More information about jundayw/location-based-services
Files in jundayw/location-based-services
Download jundayw/location-based-services
More information about jundayw/location-based-services
Files in jundayw/location-based-services
Vendor jundayw
Package location-based-services
Short Description The PHP library for LBS transform coordinates
License MIT
Package location-based-services
Short Description The PHP library for LBS transform coordinates
License MIT
Please rate this library. Is it a good library?
Informations about the package location-based-services
基于椭球体坐标及坐标系转换和计算服务(Location Based Services,LBS)
- 可扩展任意椭球体计算:需实现 Circle 接口;
- 可扩展任意椭球体坐标系转换:需继承 Geography 抽象类;
- 可扩展任意椭球体计算方法:默认只支持两坐标距离计算,可扩展实现三角形、正方形、长方形、梯形面积计算;
- 可扩展计算单位:默认支持长度单位,可扩展面积单位,需实现 Units 接口;
- 可扩展任意地理坐标系:北京 54、西安 80、 WGS84、GCJ-02、BD-09、GCS2000
- 可扩展任意语言:默认支持中文英文,可自定义其他语言;
地心坐标系及椭球常识
安装方法
命令行下, 执行 composer 命令安装:
方法集合
- AbstractPoint
- format(string $format = "d°m′s″L", bool $flip = false, int $decimals = 2): array
- parse(int $decimals = 2, bool $flip = false): array
- getLng(): float
- setLng(float $lng)
- getLat(): float
- setLat(float $lat)
- Point extends AbstractPoint
- Converter extends Point
- setLng($lng)
- setLat($lat)
- Position
- getDistance(AbstractPoint $start, AbstractPoint $end): float
- getDistanceUnit(AbstractPoint $start, AbstractPoint $end): string
- getCircle(): Circle
- setCircle(Circle $circle): Position
- getUnits(): Units
- setUnits(Units $units): Position
- getDecimals(): int
- setDecimals(int $decimals): Position
- Translate
- translate(AbstractPoint $point): AbstractPoint
- getInput(): string
- setInput(string $input): Translate
- getOutput(): string
- setOutput(string $output): Translate
- getRoutes(): array
- setRoutes(array $routes): Translate
坐标计算
支持坐标格式
计算两坐标间距离
计算两坐标间距离(附加单位)
坐标解析
英文标签
输出结果:
中文标签
输出结果:
坐标格式转换
可根据具体需求转换需要的格式,支持标签:DDD、ddd、D、d、m、s、L。L中文情况下支持:东经、西经、北纬、南纬;英文情况下支持:E、W、N、S。
中文标签
输出结果:
英文标签
输出结果:
坐标系转换
坐标系转换:标准坐标格式
坐标系转换:其他坐标格式
不同坐标系间距离计算
GPS 坐标系转百度坐标系计算距离
中国区域距离结果:
GPS 坐标系转百度坐标系计算距离
非中国区域距离结果:
All versions of location-based-services with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2
The package jundayw/location-based-services contains the following files
Loading the files please wait ....