平铺系统的墨卡托坐标操作
webmercator的Python项目详细描述
WebMercator是一个Python(2.7、3.4、3.5、3.6、3.7)包,用于帮助将地理点转换为平铺系统的Mercator投影。
开始
先决条件
要利用或贡献WebMercator,您只需要Python!
安装
用于出血边缘
# keeping the repo local $ git clone git@github.com:republicwireless-open/webmercator $ cd webmercator $ python setup.py install # only install; no need to clone $ pip install git+https://github.com/republicwireless-open/webmercator@master
或者对于pypi版本
$ pip install webmercator>=0.1.2
运行测试
测试可以以多种方式运行:
# runs all tests, in all environments $ path/to/tox # runs all tests, only in Python 2.7 $ path/to/tox -e py27 # runs specific test class, only in Python 3.6 $ path/to/tox -e py36 tests/point.py # runs specific test class, only in Python 3.6 $ path/to/tox -e py36 tests/point.py:TestPoint # runs specific test class, only in Python 3.6 $ path/to/tox -e py36 tests/point.py:TestPoint.test_init_empty # only runs style guide tests $ path/to/tox -e flake8
贡献
请阅读CONTRIBUTING.md了解有关我们的行为准则以及向我们提交请求的过程的详细信息。
版本控制
我们使用SemVer进行版本控制。有关可用的版本,请参见tags on this repository。
许可证
这个项目是根据MIT License
致谢
- Bing Maps Tile System-使用的墨卡托计算
- Decimal Degrees-精确平移
- Zoom Levels-缩放级别像素/平铺大小
- Haversine Formula
- Geocoordinate Translation (distance)