打开街道地图标签以获取所有出现的土地
我正在寻找使用 OSMNX 在 Python 中下载所有出现的土地(海岸线内的所有东西)的几何形状,但似乎找不到可以做到这一点的通用标签。
现在,我正在使用:
t = {'landuse':['commercial', 'industrial', 'residential', 'farmland', 'construction', 'education', 'retail', 'cemetery', 'grass', 'garages', 'depot', 'port', 'railway', 'recreation_ground', 'religious', 'yes', '*'], 'leisure':['park']}
land = ox.geometries_from_polygon(bbox, tags=t)
但我还有很多漏洞...... 那么,简而言之,是否有一个 OSM 标签可以抢占所有出现的土地呢?
I'm looking to download the geometries of all emerged land (everything within the coastal line) in Python using OSMNX, but can't seem to find a general tag that would do it.
Right now, I'm using:
t = {'landuse':['commercial', 'industrial', 'residential', 'farmland', 'construction', 'education', 'retail', 'cemetery', 'grass', 'garages', 'depot', 'port', 'railway', 'recreation_ground', 'religious', 'yes', '*'], 'leisure':['park']}
land = ox.geometries_from_polygon(bbox, tags=t)
But I still have many holes...
So, in short, is there an OSM tag to grab all emerged land?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
加法方法,即结合各种土地利用,不会让你一直得到你想要的结果。正如您所注意到的,您最终会出现白点。您可以通过考虑更多标签来更接近,例如
natural=* 的某些值
关键,但最终只是有一块土地没有被 OSM 中的任何此类多边形覆盖。相反,您应该查看 OSM 海岸线数据。由于这可能很难处理,您可能希望从 osmdata.openstreetmap.de 获取预处理数据,例如他们的 陆地多边形。
The additive approach, i.e. combining all sorts of landuses, won't get you all the way to the result you want. As you've noticed, you'll end up with white spots. You could get closer by considering even more tags, such as some values of the
natural=*
key, but ultimately there simply is land that is not covered by any such polygon in OSM.Instead, you should look at OSM coastline data. As this can be tricky to process, you might want to get pre-processed data from osmdata.openstreetmap.de, such as their land polygons.