通过OSMNX从OpenStreetMap openstreetMap的城市中心坐标?
是否可以通过Python库OSMNX查询OpenStreetMap来检索城市的(LAT,长)坐标?该文档似乎建议可以访问属性数据,但我尚未看到检索城市中心坐标的途径。使用OSMNX地理编码器进行感兴趣的城市,导致了较差的结果。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想尝试与质心一起工作 - 显然不是口语定义中的市中心,但它为您带来了城市边界的中心:
伦敦市中心将在...可以尝试“伦敦城市”,
这为您提供了银行和圣保罗的位置... erm ...“特朗普街”,
而不是您在寻找的东西,我猜是出于各种原因,而是“中心”。
You may want to try to work with centroids - It's clearly not the city center in a colloquial definition, but it gives you the the center of the city boundaries:
London's city center would be in ... erm ... Woolwich, but you can try "City of London"
which gives you a location between Bank and St Paul's in... erm... "Trump Street"
Not what you are looking for I guess for various reasons, but it is the "center".
https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoSeries.centroid.html