美文网首页
OpenStreetMap

OpenStreetMap

作者: Dotartisan | 来源:发表于2020-05-06 22:53 被阅读0次

OpenStreetMap地图爬虫全球国家地区边界:
代码地址:
https://github.com/Mywayking/openstreetmap
安装
pip install openstreetmap

# -*- coding: UTF-8 -*-
from openstreemap import Crawler

c = Crawler()
boundary = c.name_parse('合肥市蜀山区', level='county',coo_order=True)
# level: country state city county town
# coo_order  :False ->lng,lat ; True -> lat,lng  coo_order;
print(boundary.info)
boundary = c.id_parse("2458199", csys='wgs84', coo_order=True)
# csys(Coordinate System): wgs84 gcj02 bd09
print(boundary.info)
{'name': '', 'relation_id': '', 'boundary': {'outer': '', 'inner'}

相关文章

网友评论

      本文标题:OpenStreetMap

      本文链接:https://www.haomeiwen.com/subject/mfhnghtx.html