在立交桥turbo中如何下载Way编号209583332,我是从OpenStreetMap网站获得的
def ammendchatfile(item2, item3):
trueref = None
randomnum = False
while not randomnum:
idnumber = str(str(randomnumber(0, 9)) + str(randomnumber(0, 9)) + str(randomnumber(0, 9)) +
str(randomnumber(0, 9)) + str(randomnumber(0, 9)) + str(randomnumber(0, 9)) +
str(randomnumber(0, 9)) + str(randomnumber(0, 9)))
opendocument = open("Chats.txt", "r")
data = opendocument.read()
if idnumber not in data:
trueref = idnumber
randomnum = True
else:
randomnum = False
opendocument = open("Chats.txt", 'a')
opendocument.write("%s\n" % trueref)
opendocument.write("%s\n" % item2)
opendocument.write("%s\n" % item3)
return trueref
如果在向导中使用highway=path
,它会从地图窗口中选择所有路径,而我只想要数字209583332。
答案 0 :(得分:1)
您可以直接从OSM API:https://www.openstreetmap.org/api/0.6/way/209583332下载。但是,请勿将此API用于批量下载,有关详细信息,请参阅API usage policy。
要通过Overpass API下载特定元素,只需查询此ID:
way(209583332);
out;
示例:http://overpass.osm.rambler.ru/cgi/interpreter?data=way(209583332);out;