项目作者: pe-perry

项目描述 :
A Hong Kong Geodetic Datum Transformation Package.
高级语言: Python
项目地址: git://github.com/pe-perry/hkgeo.git
创建时间: 2017-03-21T03:51:14Z
项目社区:https://github.com/pe-perry/hkgeo

开源协议:MIT License

下载


hkgeo

version 0.1.1

  • Coordinates coversion (HK80, HK80G, WGS84).
  • OSM data download through Overpass API.

Prerequisites

System requirement:

Required packages:

Installation

Method 1:

  1. Run the follow command.
  1. pip install git+https://github.com/kitman0804/hkgeo.git

Method 2:

  1. Download the repository.

  2. Run the following command in the downloaded directory.

  1. python setup.py install

Examples

  1. from hkgeo import LatLon
  2. from hkgeo import distance, transform
  3. # Transformation
  4. transform.hk80g_to_hk80(836055, 832699)
  5. # 22.43521015261264, 114.17234807490858
  6. transform.hk80_to_hk80g(22+26/60+6.76/3600, 114+10/60+20.46/3600)
  7. # 836055.20143992256, 832699.10613402259
  8. transform.wgs84_to_hk80g(22.322172084, 114.141187917)
  9. # 832592.1959246879, 820351.17784365441
  10. # Distance
  11. distance.vincenty(LatLon(-37, 144), LatLon(-37, 143))
  12. # 89011.262537100483
  13. distance.vincenty((50, 5), (58, 3))
  14. # 899937.70573241916