{"id":338022,"date":"2022-09-06T21:00:16","date_gmt":"2022-09-06T21:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=338022"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=338022","title":{"rendered":"<span>\u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0445\u043e\u0434 \u0441 NetworkX \u0438 OpenStreetMap<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><font color=\"#35b950\"><\/p>\n<h2>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0448\u0438\u0445 \u043f\u043e\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430?<\/h2>\n<p><\/font><br \/>  <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/686688\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/9p\/u5\/cn\/9pu5cn-wtxgltqm0shsgraopy5w.jpeg\" width=\"780\" alt=\"\u041a\u0414\u041f\u0412\" data-src=\"https:\/\/habrastorage.org\/webt\/9p\/u5\/cn\/9pu5cn-wtxgltqm0shsgraopy5w.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u041b\u044e\u0431\u043e\u0439 \u0437\u0430\u044f\u0434\u043b\u044b\u0439 \u0442\u0443\u0440\u0438\u0441\u0442 \u0437\u043d\u0430\u0435\u0442: \u0432\u0441\u0451, \u0447\u0442\u043e \u0436\u0434\u0451\u0442 \u0435\u0433\u043e \u0432 \u043f\u043e\u0445\u043e\u0434\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \u0411\u0440\u0430\u0442\u044c \u043b\u0438 \u0434\u043e\u0436\u0434\u0435\u0432\u0438\u043a\u0438? \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0434\u0442\u0438 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0432\u043e\u0434\u044b \u0434\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e? \u0413\u0434\u0435 \u043b\u0443\u0447\u0448\u0435 \u043d\u043e\u0447\u0435\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430? \u041d\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0437\u0432\u0443\u0447\u0438\u0442 \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e: \u00ab\u0427\u0442\u043e \u044f \u0442\u0430\u043c \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c?\u00bb \u041e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0442\u0430\u0440\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e <u><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_060922&amp;utm_term=lead\">\u043a\u0443\u0440\u0441\u0430 \u043f\u043e Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Python<\/a><\/u>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u043f\u0443\u0442\u0435\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u043e\u0431 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u043e\u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u043a\u0430 \u0438\u043b\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430, \u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0442\u044c \u0438 \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f\u043c\u0438. \u0422\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u043a <a href=\"https:\/\/www.alltrails.com\/\">AllTrails<\/a>, \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044e \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0445\u043e\u0434\u043e\u0432. \u0412 \u043d\u0438\u0445 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u0445, \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0438 \u043e\u0442\u0437\u044b\u0432\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0438\u0445 \u00ab\u043f\u0440\u0435\u043c\u0438\u0443\u043c-\u0444\u0443\u043d\u043a\u0446\u0438\u0439\u00bb, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442, \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0438\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u043e\u043d\u0438 \u0432\u044b\u0436\u0438\u043c\u0430\u044e\u0442 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418\u043d\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e AllTrails \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0435\u043d\u044f \u0432 \u0432\u044b\u0431\u043e\u0440\u0435.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0445\u043e\u0434\u043e\u0432 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u043e\u043b\u043e\u0436\u0443 (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u043a\u0430\u043b\u0430\u043c\u0431\u0443\u0440) \u043a\u0440\u0430\u0442\u0447\u0430\u0439\u0448\u0438\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043f\u043e \u0432\u0441\u0435\u043c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u043a\u0430\u0436\u0443 \u0438\u0445 \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0435\u043c\u043e\u0432\u0435\u0440\u0441\u0438\u0438. \u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u0434? \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0435\u043f \u2014 <a href=\"https:\/\/github.com\/evandiewald\/trail-mapping\">\u0432\u043e\u0442 \u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>  <font color=\"#35b950\"><\/p>\n<h2>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p><\/font><br \/>  \u041a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u044b \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u2014 \u043a\u0430\u0440\u0442\u044b <a href=\"https:\/\/www.openstreetmap.org\/\">OpenStreetMap<\/a>. \u0414\u0430\u0436\u0435 <a href=\"https:\/\/support.alltrails.com\/hc\/en-us\/articles\/360019246411-OSM-Derivative-Database-Derivation-Methodology\">AllTrails<\/a> \u0431\u0435\u0440\u0451\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0445 \u0431\u0430\u0437\u0443 \u0434\u043e\u0440\u043e\u0433 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/Overpass_API\">Overpass API<\/a> \u0438 \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u0440\u043e\u0433\u0438, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0442\u0443\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0440\u043e\u043f\u044b.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0440\u0442 \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0410 \u0431\u043e\u043b\u044c \u0432\u0441\u044f\u043a\u043e\u0433\u043e, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u2014 \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438.<\/p>\n<p>  \u041a\u0430\u043a \u0438 \u0432\u0441\u0435 \u0434\u043e\u0440\u043e\u0433\u0438, \u0442\u0443\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0440\u043e\u043f\u044b \u0438\u043c\u0435\u044e\u0442 \u043f\u0435\u0440\u0435\u043a\u0440\u0451\u0441\u0442\u043a\u0438 (\u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0433\u0440\u0430\u0444\u0430) \u0438 \u043e\u0442\u0440\u0435\u0437\u043a\u0438 \u043f\u0443\u0442\u0438 (\u0440\u0451\u0431\u0440\u0430 \u0433\u0440\u0430\u0444\u0430). \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0433\u0440\u0430\u0444\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC_%D0%94%D0%B5%D0%B9%D0%BA%D1%81%D1%82%D1%80%D1%8B\">\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0414\u0435\u0439\u043a\u0441\u0442\u0440\u044b<\/a>.<\/p>\n<p>  \u0410\u043c\u0435\u0440\u0438\u043a\u0443 \u044f \u0432\u0430\u043c \u0442\u0443\u0442 \u043d\u0435 \u043e\u0442\u043a\u0440\u043e\u044e, \u0432\u0435\u0434\u044c <a href=\"https:\/\/shakasom.medium.com\/routing-street-networks-find-your-way-with-python-9ba498147342\">\u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/a> \u043f\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u043d\u0430 \u0433\u0440\u0430\u0444\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. \u0422\u0430\u043a\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u043a\u0430\u043a <a href=\"https:\/\/osmnx.readthedocs.io\/en\/stable\/\">OSMnx<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043d\u0430\u0431\u043e\u0440\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 OSM \u043f\u043e \u0433\u0435\u043e\u043a\u043e\u0434\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abShenandoah National Park, Virginia, USA\u00bb) \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0433\u0440\u0430\u0444\u044b <a href=\"https:\/\/networkx.org\/\">NetworkX<\/a>. <\/p>\n<p>  \u0412\u043e\u0442 \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>load_map<\/code>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0440\u043e\u043f\u0430\u0445 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u043e\u0432 (\u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0447\u0451\u0442\u0430) \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 GeoJSON (\u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438).<\/p>\n<pre><code class=\"python\">def load_map(place: str, graph_only: bool = False) -> (nx.MultiDiGraph, dict):     \"\"\"     Load OSM trail data for a given region. Initially check if the graph has already been cached on disk, otherwise it will be downloaded.     Args:         place: The geocode of the region of interest, e.g. 'Shenandoah National Park, Virginia, USA'         graph_only: If true, return only the NetworkX graph, not the geojson.      Returns: The dataset as a NetworkX MultiGraph, the nodes geojson, the edges geojson      \"\"\"     filename = p.sub(\"\", place).lower().replace(\" \", \"_\")     graph_fp = f\"static\/graphs\/{filename}.graphml\"     edges_fp = f\"static\/edges\/{filename}.geojson\"     nodes_fp = f\"static\/nodes\/{filename}.geojson\"     try:         G = ox.load_graphml(graph_fp)         print(\"Graph loaded from disk\")     except FileNotFoundError:         print(\"Downloading and caching graph from OSM\")         # custom filter to only include walkable segments - see: https:\/\/support.alltrails.com\/hc\/en-us\/articles\/360019246411-OSM-Derivative-Database-Derivation-Methodology         cf = '[\"highway\"~\"path|track|footway|steps|bridleway|cycleway\"]'         G = ox.graph_from_place(place, custom_filter=cf)         ox.save_graphml(G, graph_fp)     if graph_only:         return G     if os.path.isfile(edges_fp) is False or os.path.isfile(nodes_fp) is False:         # convert Graph to GeoDataFrames and save as GeoJSON         nodes, edges = ox.graph_to_gdfs(G)         edges = edges[[\"name\", \"geometry\", \"length\"]]         edges[\"name\"] = edges[\"name\"].apply(lambda x: x[0] if type(x) is list else x)         edges.to_file(edges_fp)         nodes.to_file(nodes_fp)     with open(nodes_fp, \"r\") as f:         nodes = json.load(f)     with open(edges_fp, \"r\") as f:         edges = json.load(f)     for feat in edges[\"features\"]:         # add custom tooltip property for Leaflet visualization         tooltip = f\"{feat['properties']['name']}, {round(feat['properties']['length'] \/ 1609, 1)} mi\"         feat[\"properties\"][\"tooltip\"] = tooltip     return G, nodes, edges <\/code><\/pre>\n<p>  \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043f\u0435\u0448\u0435\u0445\u043e\u0434\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u2014 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e, \u043f\u043e\u043c\u0438\u043c\u043e \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b, \u043f\u0440\u0438 \u0438\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c <em>\u0432\u044b\u0441\u043e\u0442\u0443 \u043d\u0430\u0434 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043c\u043e\u0440\u044f<\/em>. \u041a\u0430\u043a \u0438 \u043b\u044e\u0431\u0430\u044f \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0442\u0443\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0430, \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041c\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 API \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u044b \u043f\u043e \u0442\u043e\u0447\u043d\u044b\u043c \u0440\u0430\u0434\u0438\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c 2000 \u0433\u043e\u0434\u0430 \u0441 \u0448\u0430\u0442\u0442\u043b\u0430 <em>Endeavor.<\/em> \u041f\u0440\u0438 \u043e\u0431\u044a\u0451\u043c\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043a\u043e\u043b\u043e 18 \u0413\u0431 <a href=\"https:\/\/portal.opentopography.org\/raster?opentopoID=OTSRTM.042013.4326.1\">SRTM GL3<\/a> \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 120 \u043a\u043c<sup>2<\/sup> \u0441\u0443\u0448\u0438 \u0441 \u0448\u0430\u0433\u043e\u043c \u0432 90 \u043c. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/rasterio.readthedocs.io\/en\/latest\/index.html\">rasterio<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0440\u0435\u043b\u044c\u0435\u0444\u0430 \u0438\u0437 \u043e\u0442\u0440\u0435\u0437\u043a\u043e\u0432 \u043f\u0443\u0442\u0438, \u043d\u043e \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0441\u044e \u043a\u0430\u0440\u0442\u0443:<\/p>\n<pre><code class=\"python\">def get_elevation_profile_of_segment(dataset: rasterio.DatasetReader, coords: list[list]):     \"\"\"     Get the elevation profile (distance vs. altitude) of a path segment from the list of coordinates.     Args:         dataset: The opened rasterio dataset for the SRTM global topography data.          coords: The path coordinates in [[lon1, lat1], [lon2, lat2], ...] format.      Returns: The distance (in miles) and elevation (in feet) vectors.     \"\"\"     # coordinates are [lon, lat], flip for rasterio     coords = [[c[1], c[0]] for c in coords]     # convert meters to feet and use rasterio.sample.sample_gen to query each point     elev = [e[0] * 3.28084 for e in sample_gen(dataset, coords)]     d = [0.0]     for j in range(len(coords) - 1):         # use haversine distance         d.append(d[j] + haversine((coords[j][1], coords[j][0]), (coords[j + 1][1], coords[j + 1][0]), Unit.MILES))     return d, elev <\/code><\/pre>\n<p>  \u041d\u0435\u043f\u043b\u043e\u0445\u043e, \u0434\u0430? \u041a\u0441\u0442\u0430\u0442\u0438, <a href=\"https:\/\/developers.google.com\/maps\/documentation\/elevation\/usage-and-billing\">Google \u0431\u0435\u0440\u0451\u0442 5 \u0431\u0430\u043a\u0441\u043e\u0432 \u0437\u0430 1000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 Elevation API<\/a>, \u043d\u043e NASA \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<p>  <font color=\"#35b950\"><\/p>\n<h2>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/h2>\n<p><\/font><br \/>  <a href=\"https:\/\/dash.plotly.com\/introduction\">Dash<\/a> \u2014 \u043c\u043e\u044f \u043b\u044e\u0431\u0438\u043c\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u043d\u0430 Python. \u0415\u0451 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445, \u0430 \u043d\u0435 \u043d\u0430 \u0434\u0438\u0437\u0430\u0439\u043d\u0435. \u0415\u0441\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432 \u043f\u043e Dash \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0438 \u043b\u043e\u0433\u0438\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/5t\/4q\/_b\/5t4q_bxebr1tkekizfplw9hiw6s.png\" alt=\"\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/5t\/4q\/_b\/5t4q_bxebr1tkekizfplw9hiw6s.png\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0440\u0442\u044b \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c <a href=\"https:\/\/www.mapbox.com\/maps\/outdoors\">\u0442\u043e\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445<\/a> \u0442\u0430\u0439\u043b\u043e\u0432 Mapbox. \u0412\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0440\u043e\u043f \u0438\u0437 \u043a\u0435\u0448\u0430 \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e \u0433\u0435\u043e\u043a\u043e\u0434\u0443:<\/p>\n<pre><code class=\"python\">def layout(place=None):     if place:         global G, G2         G, _, edges = load_map(place)         G2 = nx.Graph(G)          polyline = dl.Polyline(id=\"route-line\", positions=[], color=\"red\", weight=10, fillColor=\"red\", fillOpacity=1.0)         patterns = [dict(repeat='100',                          arrowHead=dict(pixelSize=15, polygon=False, pathOptions=dict(color=\"red\", stroke=True)),                          line=dict(pixelSize=10, pathOptions=dict(color='#f00', weight=20)))]         route_decorator = dl.PolylineDecorator(id=\"route-arrows\", positions=[], patterns=patterns)          url = \"https:\/\/api.mapbox.com\/styles\/v1\/mapbox\/outdoors-v9\/tiles\/{z}\/{x}\/{y}?access_token=\" + open(\".mapbox_token\").read()         attribution = '&amp;copy; &lt;a href=\"https:\/\/openstreetmap.org\/\">OpenStreetMap&lt;\/a> | &amp;copy; &lt;a href=\"https:\/\/mapbox.com\/\">Mapbox&lt;\/a> '          res = html.Div([             html.Div([                 dbc.Label(\"Choose Mode\"),                 dbc.RadioItems(                     options=[                         {\"label\": \"Auto\", \"value\": 1},                         {\"label\": \"Custom\", \"value\": 2}                     ],                     value=1,                     id=\"mode-select\"                 )             ]),             dbc.Label(\"Distance Target (mi)\", html_for=\"distance-target\"),             dbc.Input(id=\"distance-target\", value=10, required=True, type=\"number\", min=0),             dbc.Label(\"Elevation Minimum (ft)\", html_for=\"elevation-min\"),             dbc.Input(id=\"elevation-min\", value=0, required=True, type=\"number\", min=0),             dl.Map([dl.TileLayer(url=url, attribution=attribution),                     polyline,                     dl.GeoJSON(data=edges, zoomToBounds=True, id=\"trail\", hoverStyle=arrow_function(dict(weight=5, color='#666', dashArray=''))),                     # polyline,                     route_decorator                     ],                    id=\"map\",                    style={'width': '100%',                           'height': '40vh',                           'margin': \"auto\",                           \"display\": \"block\",                           \"padding-top\": \"10px\"}),             dbc.Button(id=\"reset-btn\", children=\"Reset\", className=\"btn btn-danger\"),             dbc.Button(id=\"download-btn\", children=\"Export Route\"),             dcc.Download(id=\"download-route\"),             # dbc.Button(id=\"undo-btn\", children=\"Undo\"),             html.Br(),             html.P(id=\"total-distance\"),             html.P(id=\"elevation-gain\"),             dcc.Graph(id=\"profile\"),             dcc.Store(id=\"route-path\", data=[]),             dcc.Store(id=\"map-data\", data={\"edges\": edges})         ],         style={\"padding-top\": \"10px\"})         return res     else:         return html.Div(\"issue\") <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0441\u0435\u0442\u044c \u0442\u0440\u043e\u043f OSM \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/dash-leaflet.herokuapp.com\/\">dash-leaflet<\/a>. \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u043d\u0430 \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0432\u044b\u0441\u043e\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9_\/cb\/kn\/9_cbknqtygputs2udpey0litcqm.png\" alt=\"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0442\u0440\u0451\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u043f\u0435\u0442\u043b\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0433\u043e\u0440\u044b \u041e\u043b\u0434 \u0420\u044d\u0433 \u0432 \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0430\u0440\u043a\u0435 \u0428\u0435\u043d\u0430\u043d\u0434\u043e\u0430 (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)\" data-src=\"https:\/\/habrastorage.org\/webt\/9_\/cb\/kn\/9_cbknqtygputs2udpey0litcqm.png\"\/><br \/>  <em>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0442\u0440\u0451\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u043f\u0435\u0442\u043b\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0433\u043e\u0440\u044b \u041e\u043b\u0434 \u0420\u044d\u0433 \u0432 \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0430\u0440\u043a\u0435 \u0428\u0435\u043d\u0430\u043d\u0434\u043e\u0430 (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>  <font color=\"#35b950\"><\/p>\n<h2>\u0414\u0432\u0438\u0436\u043e\u043a \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430<\/h2>\n<p><\/font><br \/>  \u041c\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0445\u043e\u0434\u044b \u0432 \u0434\u0432\u0443\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u043e\u043f \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u0438 \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a \u0432\u0430\u0448 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u00ab\u043e\u0436\u0438\u0432\u0430\u0435\u0442\u00bb \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0437\u0430 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u043c. \u0412 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0442\u043e\u0447\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043a\u0440\u0430\u0442\u0447\u0430\u0439\u0448\u0435\u0433\u043e \u043f\u0443\u0442\u0438. \u0412\u043e\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u043f\u043e \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0430\u0440\u043a\u0443 \u041a\u0430\u0439\u0430\u0445\u043e\u0433\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1400\/1*QjsvC7Vhj2dyRjwAIidZYQ.gif\" alt=\"\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u043f\u043e \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0430\u0440\u043a\u0443 \u041a\u0430\u0439\u0430\u0445\u043e\u0433\u0430 (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)\" data-src=\"https:\/\/miro.medium.com\/max\/1400\/1*QjsvC7Vhj2dyRjwAIidZYQ.gif\"\/><br \/>  <em>\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u043f\u043e \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0430\u0440\u043a\u0443 \u041a\u0430\u0439\u0430\u0445\u043e\u0433\u0430 (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0447\u0443\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435. \u0412 \u043d\u0451\u043c \u0440\u0435\u0448\u0435\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0443\u0447\u0451\u0442\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0443\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0437 \u0432\u0438\u0434\u0443. \u0412\u043e\u0442 \u044d\u0442\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u044b:<\/p>\n<ul>\n<li>\u041f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432\u044b\u0441\u043e\u0442\u044b (\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439).<\/li>\n<li>\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/li>\n<li>\u0414\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 (\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u043c \u043f\u0443\u0442\u0438 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0445\u043e\u0434\u0430 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443).<\/li>\n<\/ul>\n<p>  \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/zl\/qo\/2d\/zlqo2dpe61oqyuzand6ifso829q.png\" alt=\"\u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/zl\/qo\/2d\/zlqo2dpe61oqyuzand6ifso829q.png\"\/><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cf7\/59a\/0df\/cf759a0dfface7fb52b8231eb4fa9e47.svg\" alt=\"$P$\" data-tex=\"inline\"\/> \u2014 \u044d\u0442\u043e \u043f\u0443\u0442\u044c, <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/aaa\/8ae\/92c\/aaa8ae92ce3ac53d1da238cb2f678a0b.svg\" alt=\"$d(P)$\" data-tex=\"inline\"\/> \u2014 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2e2\/3b0\/ca7\/2e23b0ca7b48e0096c7d8eb2d3c3d0ca.svg\" alt=\"$D$\" data-tex=\"inline\"\/> \u2014 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7c9\/19d\/ab0\/7c919dab0a6a2f50105eb25e98179548.svg\" alt=\"$r(P)$\" data-tex=\"inline\"\/> \u2014 \u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432 (\u0435\u0441\u043b\u0438 \u0438\u0434\u0442\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0442\u0443\u0434\u0430 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0442\u043e \u044d\u0442\u0430 \u0434\u043e\u043b\u044f \u0440\u0430\u0432\u043d\u0430 0,5), <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1c6\/ed0\/9d1\/1c6ed09d1a4018e35556348adc8a976e.svg\" alt=\"$e(P)$\" data-tex=\"inline\"\/> \u2014 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432\u044b\u0441\u043e\u0442\u044b \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0442\u0438, \u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4ce\/441\/0e6\/4ce4410e6263d450d4d204699b71f408.svg\" alt=\"$E$\" data-tex=\"inline\"\/> \u2014 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432\u044b\u0441\u043e\u0442\u044b.<\/p>\n<p>  \u041f\u043e\u0438\u0441\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0446\u0438\u043a\u043b\u043e\u0432 \u043f\u0440\u0438 \u043e\u0431\u0445\u043e\u0434\u0435 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f. \u0414\u043b\u044f \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043c\u0435\u0442\u043e\u0434, \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0449\u0438\u0439 <a href=\"https:\/\/networkx.org\/documentation\/stable\/reference\/algorithms\/generated\/networkx.algorithms.shortest_paths.generic.shortest_path.html#networkx.algorithms.shortest_paths.generic.shortest_path\">\u043a\u0440\u0430\u0442\u0447\u0430\u0439\u0448\u0438\u0435 \u043f\u0443\u0442\u0438<\/a> \u0438 <a href=\"https:\/\/networkx.org\/documentation\/stable\/reference\/algorithms\/generated\/networkx.algorithms.cycles.simple_cycles.html#networkx.algorithms.cycles.simple_cycles\">\u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0446\u0438\u043a\u043b\u044b<\/a>. \u0422\u0430\u043a\u0438\u043c \u0446\u0438\u043a\u043b\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u0431\u0435\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432.<\/p>\n<pre><code class=\"python\">def find_best_loop(G: nx.Graph, root, target_dist, tol=1.0, min_elev: Optional[Union[int, float]] = None,                    dataset: Optional[rasterio.DatasetReader] = None):     if min_elev and not dataset:         raise ValueError(\"If asking for elevation data, you must include a rasterio dataset\")     error = 1e8     best_path = []     for n in G.nodes():         if nx.has_path(G, root, n):             shortest_path = nx.shortest_path(G, root, n)             paths = nx.all_simple_paths(G, root, n, cutoff=10)             for path in paths:                 if path == shortest_path:                     continue                  path_loop = path + nx.shortest_path(G, n, root, weight=\"length\")[1:]                  path_diversity = len(set(path_loop)) \/ len(path_loop)                  dist = path_length(G, path_loop)                 e_new = np.abs(dist - target_dist) \/ path_diversity                 if e_new &lt; error:                     error = e_new                     best_path = path_loop                 if error &lt; tol:                     if min_elev:                         coords_list = path_to_coords_list(G, path_loop)                         _, elev = get_elevation_profile_of_segment(dataset, coords_list)                         elev_gain = elevation_gain(elev)                         if elev_gain &lt; min_elev:                             continue                     return best_path     return best_path <\/code><\/pre>\n<p>  \u041a\u043b\u0438\u043a \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u0432\u0431\u043b\u0438\u0437\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u043e\u043f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0443\u0437\u0435\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>find_best_loop<\/code> \u2014 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0448\u0435\u0445\u043e\u0434\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u0441\u0442\u043e\u044f\u043d\u043a\u0430 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0430\u043b\u043e\u0447\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442. \u041d\u0438\u0436\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0443\u0440\u043e\u0432\u044b\u0439 \u043c\u0430\u0440\u0448-\u0431\u0440\u043e\u0441\u043e\u043a \u0441 \u0432\u043e\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043d\u0430 <a href=\"https:\/\/www.nps.gov\/places\/old-rag.htm\">\u041e\u043b\u0434 \u0420\u044d\u0433<\/a> \u0432 \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0430\u0440\u043a\u0435 \u0428\u0435\u043d\u0430\u043d\u0434\u043e\u0430. \u0417\u0434\u0435\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043e\u0447\u0435\u043d\u044c \u043a\u0441\u0442\u0430\u0442\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/c1\/op\/l-\/c1opl-dia2y5vfdlzuibduwhgog.gif\" alt=\"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)\" data-src=\"https:\/\/habrastorage.org\/webt\/c1\/op\/l-\/c1opl-dia2y5vfdlzuibduwhgog.gif\"\/><br \/>  <em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u0432\u044b\u0441\u043e\u0442\u044b\u2026 \u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u044e\u0434\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u043a\u043b\u043e\u043d\u043e\u043c \u2014 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u043e\u0447\u0442\u0438 \u043f\u043b\u043e\u0441\u043a\u0438\u0439? \u0422\u043e\u0433\u0434\u0430 \u043b\u044e\u0431\u0430\u044f \u0443\u0445\u0430\u0431\u0438\u0441\u0442\u0430\u044f \u0434\u043e\u0440\u043e\u0433\u0430 \u043d\u0430 \u043f\u0443\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u0441\u0433\u043b\u0430\u0434\u0438\u0442\u044c \u043a\u0440\u0438\u0432\u044b\u0435 \u0432\u044b\u0441\u043e\u0442, \u0432\u0432\u0435\u0434\u0451\u043c <a href=\"https:\/\/github.com\/evandiewald\/trail-mapping\/blob\/c0255e3c7766e211b099a399735dcc812af72702\/mapping_utils.py#L101\">\u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u044b\u0441\u043e\u0442\u044b<\/a>. \u042d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041e\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/www.gpsvisualizer.com\/tutorials\/elevation_gain.html\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430 \u043e \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0435\u0442 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u00abrolling threshold\u00bb, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0430\u0432\u0442\u043e\u0440, \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d \u00abtrackpoint elevation threshold\u00bb \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00abReducing vertical noise\u00bb. \u0414\u0430\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u00abinstead of looking at horizontal distance, it only counts elevation changes once they&#8217;ve passed a certain vertical threshold\u00bb. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u0440\u043c\u0438\u043d \u043f\u0435\u0440\u0435\u0432\u0451\u043b \u043a\u0430\u043a \u00ab\u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433\u00bb, \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e<\/p><\/blockquote>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <font color=\"#35b950\"><\/p>\n<h2>\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438<\/h2>\n<p><\/font><br \/>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0445\u043e\u0434, \u0444\u043e\u0440\u043c\u0430\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0442\u043e\u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u0445. \u0411\u0443\u043c\u0430\u0436\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u0430\u0440\u0442\u044b \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432\u044b\u0441\u043e\u0442 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0432 GPX (\u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0444\u043e\u0440\u043c\u0430\u0442 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0445) \u0438 \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432 AllTrails, Gaia, Google Maps \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 GPS.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/c1\/op\/l-\/c1opl-dia2y5vfdlzuibduwhgog.gif\" alt=\"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b GPX \u0438 \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 AllTrails (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)\" data-src=\"https:\/\/habrastorage.org\/webt\/c1\/op\/l-\/c1opl-dia2y5vfdlzuibduwhgog.gif\"\/><br \/>  <em>\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b GPX \u0438 \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 AllTrails (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043a\u0430\u043a \u043f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 AllTrails!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bl\/rq\/vt\/blrqvtl_ahxyewhy3ugwqob2soa.png\" alt=\"\u041f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043b \u0441\u0432\u043e\u0439 \u043f\u043e\u0445\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f AllTrails (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)\" data-src=\"https:\/\/habrastorage.org\/webt\/bl\/rq\/vt\/blrqvtl_ahxyewhy3ugwqob2soa.png\"\/><br \/>  <em>\u041f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043b \u0441\u0432\u043e\u0439 \u043f\u043e\u0445\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f AllTrails (\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>  <font color=\"#35b950\"><\/p>\n<h2>\u041f\u043e\u0440\u0430 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f\u2026<\/h2>\n<p><\/font><br \/>  \u0412 \u044d\u0442\u043e\u043c \u0434\u0435\u043c\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u2014 OSM \u0438 NASA \u2014 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0445\u043e\u0434\u043e\u0432. \u041d\u0430 \u0441\u0442\u044b\u043a\u0435 \u0442\u0435\u043e\u0440\u0438\u0438 \u0433\u0440\u0430\u0444\u043e\u0432, \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u044f\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0430.<\/p>\n<p>  \u0421 \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c \u0436\u0434\u0443 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u043b\u044e\u0431\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0430\u043c\u0438, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u0435\u0441\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 <a href=\"https:\/\/github.com\/evandiewald\/trail-mapping\">Github<\/a>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0441\u044b\u043b\u043a\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">Aric A. Hagberg, Daniel A. Schult and Pieter J. Swart, <a href=\"http:\/\/conference.scipy.org\/proceedings\/SciPy2008\/paper_2\/\">\u00abExploring network structure, dynamics, and function using NetworkX\u00bb<\/a>, in <a href=\"http:\/\/conference.scipy.org\/proceedings\/SciPy2008\/index.html\">Proceedings of the 7th Python in Science Conference (SciPy2008)<\/a>, G\u00e4el Varoquaux, Travis Vaught, and Jarrod Millman (Eds), (Pasadena, CA USA), pp. 11\u201315, Aug 2008<\/p>\n<p>  Map data copyrighted OpenStreetMap contributors and available from <a href=\"https:\/\/www.openstreetmap.org\/\">https:\/\/www.openstreetmap.org<\/a><\/p>\n<p>  NASA Shuttle Radar Topography Mission (SRTM)(2013). Shuttle Radar Topography Mission (SRTM) Global. Distributed by OpenTopography. <a href=\"https:\/\/doi.org\/10.5069\/G9445JDF.\">https:\/\/doi.org\/10.5069\/G9445JDF.<\/a> Accessed: 2022\u201308\u201330  <\/div>\n<\/p><\/div>\n<p>  \u041f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u044c \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0432 IT \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0448\u0438 \u043a\u0443\u0440\u0441\u044b:  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_060922&amp;utm_term=conc\" title=\"\u0421\u043a\u0438\u0434\u043a\u0430 45% \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443 HABR\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python (15 \u043c\u0435\u0441\u044f\u0446\u0435\u0432)<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_060922&amp;utm_term=conc\" title=\"\u0421\u043a\u0438\u0434\u043a\u0430 45% \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443 HABR\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist (24 \u043c\u0435\u0441\u044f\u0446\u0430)<\/a><\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_060922&amp;utm_term=banner\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b16\/dac\/539\/b16dac539a0a09cd1c28951311a610c7.png\" alt=\"\u0421\u043a\u0438\u0434\u043a\u0430 45% \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443 HABR\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b16\/dac\/539\/b16dac539a0a09cd1c28951311a610c7.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/686688\/\"> https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/686688\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><font color=\"#35b950\"><\/p>\n<h2>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0448\u0438\u0445 \u043f\u043e\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430?<\/h2>\n<p><\/font><br \/>  <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/686688\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/9p\/u5\/cn\/9pu5cn-wtxgltqm0shsgraopy5w.jpeg\" width=\"780\" alt=\"\u041a\u0414\u041f\u0412\" data-src=\"https:\/\/habrastorage.org\/webt\/9p\/u5\/cn\/9pu5cn-wtxgltqm0shsgraopy5w.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u041b\u044e\u0431\u043e\u0439 \u0437\u0430\u044f\u0434\u043b\u044b\u0439 \u0442\u0443\u0440\u0438\u0441\u0442 \u0437\u043d\u0430\u0435\u0442: \u0432\u0441\u0451, \u0447\u0442\u043e \u0436\u0434\u0451\u0442 \u0435\u0433\u043e \u0432 \u043f\u043e\u0445\u043e\u0434\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \u0411\u0440\u0430\u0442\u044c \u043b\u0438 \u0434\u043e\u0436\u0434\u0435\u0432\u0438\u043a\u0438? \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0434\u0442\u0438 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0432\u043e\u0434\u044b \u0434\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e? \u0413\u0434\u0435 \u043b\u0443\u0447\u0448\u0435 \u043d\u043e\u0447\u0435\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430? \u041d\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0437\u0432\u0443\u0447\u0438\u0442 \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e: \u00ab\u0427\u0442\u043e \u044f \u0442\u0430\u043c \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c?\u00bb \u041e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0442\u0430\u0440\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e <u><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_060922&amp;utm_term=lead\">\u043a\u0443\u0440\u0441\u0430 \u043f\u043e Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Python<\/a><\/u>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-338022","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338022"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338022\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}