L-EST97至WGS84坐标转换器,带图形用户界面
coordinates-converter的Python项目详细描述
L-EST97至WGS84坐标转换器
将L-EST97转换为WGS84坐标的简单应用程序。 这个应用程序有gui,但也可以通过编程方式使用。
在Python2.7和Python3上运行
安装
应用程序可以通过pip安装:
pip install coordinates-converter
用法
要启动gui应用程序,请将以下命令写入终端。
coordinates-app
如果用户希望转换代码中的坐标,则提供简单的api:
fromcoordinates.converterimportCoordinateConverter,WGS84,L_Est97converter=CoordinateConverter# converting to L-Est97wgs_point=WGS84(lat=59.39528,long=24.664104611385)print(converter.wgs84_to_l_est97(wgs_point))# converting to WGS84est97_point=L_Est97(x=6543210.14,y=543210.86)print(converter.l_est97_to_wgs84(est97_point))# module can also convert decimal degrees to degree-minute-second systemfromcoordinates.converterimportconvert_decimal_to_degrees,convert_degrees_to_decimalprint(convert_decimal_to_degrees(10.51))print(convert_degrees_to_decimal(10,30,36.0))# L-Est97 system has coordinate boundaries where it can be used.# These boundaries can be checked with validatorfromcoordinates.converterimportLEst97CoordinatesValidatorvalidator=LEst97CoordinatesValidator()print(validator.validate_projected_x(6543210.14))print(validator.validate_projected_y(543210.86))print(validator.validate_wgs84_latitude(59.39528))print(validator.validate_wgs84_longitude(21.09))
文档
Documentation can be found here
开发人员指南。
安装
源代码可以在GitLab
要从源代码构建应用程序,请运行
pip install -editable .
测试
测试是用pytest编写的 运行测试需要pytest。
要安装pytest run:
pip install pytest
要执行测试套件:
python -m pytest tests/
代码质量
持续集成环境检查代码是否符合pep8 checcks。 为了测试代码质量,使用flake8。
要安装Flake8测试,必须安装它:
pip install flake8
flake8测试可以使用以下命令运行:
flake8 coordinates/