A Python library for tiling based on Chinese mapping standards.
Project description
cnmaptiling
国家基本比例尺地形图分幅和编号的Python实现,支持新旧规范坐标到图号以及图号到图廓范围计算。
安装
pip install cnmaptiling
使用
from cnmaptiling import Angle, Scale, NewStandard, OldStandard
# 经纬度
lat = Angle(d=39, m=54, s=30)
lon = Angle(d=116, m=28, s=15)
# 新图号
print(NewStandard(Scale.LEVEL_1M).latlon_to_newstandard(lon, lat))
print(NewStandard(Scale.LEVEL_50K).latlon_to_newstandard(lon, lat))
# J50
# J50E001010
# 新图号图廓范围
print(NewStandard().newstandard_to_latlon("J50E001010"))
# ((Angle(116° 15' 0.000"), Angle(39° 50' 0.000")), (Angle(116° 30' 0.000"), Angle(40° 0' 0.000")))
# 旧图号
print(OldStandard(Scale.LEVEL_1M).latlon_to_oldstandard(lon, lat))
print(OldStandard(Scale.LEVEL_50K).latlon_to_oldstandard(lon, lat))
# J-50
# J-50-5-B
# 旧图号图廓范围
print(OldStandard(Scale.LEVEL_50K).oldstandard_to_latlon("J-50-5-B"))
# ((Angle(116° 15' 0.000"), Angle(39° 50' 0.000")), (Angle(116° 30' 0.000"), Angle(40° 0' 0.000")))
参考
GB/T 13989-2012 国家基本比例尺地形图分幅和编号
王家耀.地图学原理与方法
高井祥.数字地形测量学
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnmaptiling-0.1.0.tar.gz
(5.8 kB
view details)
File details
Details for the file cnmaptiling-0.1.0.tar.gz.
File metadata
- Download URL: cnmaptiling-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b926e57bed44e35563f42f7d65f9a7b3a7b258e5fcfc2a6c01f1f3721de8c96
|
|
| MD5 |
a6f6643dba2896bb2762309d037a3740
|
|
| BLAKE2b-256 |
5421e15e496c3751313648f5746a5136f8b5038cf128967b550ee39012e76067
|