{"id":429724,"date":"2024-08-21T21:05:48","date_gmt":"2024-08-21T21:05:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=429724"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=429724","title":{"rendered":"<span>Open Street Map \u2014 OSINT-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433\u043e\u0432<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dd1\/5f5\/430\/dd15f5430e822db3a8df854967ec30b9.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd1\/5f5\/430\/dd15f5430e822db3a8df854967ec30b9.png\"\/><\/figure>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \/ email \u0434\u043b\u044f \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<p>1) \u043a\u0443\u043f\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443<\/p>\n<p>2) \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u0430\u0439\u0442\u043e\u0432 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443<\/p>\n<p>3) \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431, \u0442\u043e\u0436\u0435 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u0441 \u0434\u0432\u0443\u043c\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u2014 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<hr\/>\n<h2>\u041e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u041c\u0430\u043b\u043e \u043a\u0442\u043e \u0438\u0437 \u043f\u0440\u043e\u0434\u0430\u0436\u043d\u0438\u043a\u043e\u0432 \u0437\u043d\u0430\u0435\u0442 \u043f\u0440\u043e <a href=\"https:\/\/www.openstreetmap.org\/\"><u>OSM<\/u><\/a> \u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e, OSM \u2014 \u044d\u0442\u043e \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0433\u0434\u0435 \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043c\u0438\u0440\u0430 \u0438 \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0438\u043b\u0438 \u0444\u0438\u0442\u043d\u0435\u0441-\u043a\u043b\u0443\u0431, \u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e:\u00a0<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0430\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0442\u0430\u043a \u0438 \u0434\u0435\u043b\u0430\u044e\u0442. OSM \u2014 \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u044b OSM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abOrganic maps\u00bb, \u00abGo map!\u00bb. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 OSM<\/h2>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u041e\u043f\u0438\u0448\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439.<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e OSM \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u044f\u0437\u044b\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/RU:Overpass_API\"><u>overpass<\/u><\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445, \u043d\u0430\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u0414\u0430 \u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441. \u0412\u043e\u0442 \u043e\u043d:<\/p>\n<pre><code>[out:json]; nw[~\"^contact:.*|email|phone|.*site$\"~\".\"] ({{bbox}}); (._;&gt;;);out;<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u043d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u2014 &#171;<em>\u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u043c \/ \u043f\u043e\u0447\u0442\u043e\u0439 \/ \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0441\u0430\u0439\u0442\u0430<\/em>&#171;<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 python (\u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/python-overpy.readthedocs.io\/en\/latest\/api.html\"><u>overpy<\/u><\/a>), \u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u043d\u043b\u0430\u0439\u043d-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/osm-gpt.rohitgautam.com.np\/\"><u>\u044d\u0442\u0438\u043c<\/u><\/a>. \u0418\u0442\u0430\u043a, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>1. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u0440\u0435\u0433\u0438\u043e\u043d \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430. \u041f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0440\u043e\u0434 \u041f\u0430\u0440\u0438\u0436,\u00a0 \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0420\u043e\u0441\u0442\u043e\u0432-\u043d\u0430-\u0414\u043e\u043d\u0443 \u0441 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u043d\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/280\/9d6\/d3a\/2809d6d3ad59cbff7df8416407006cf2.png\" width=\"1600\" height=\"733\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/280\/9d6\/d3a\/2809d6d3ad59cbff7df8416407006cf2.png\"\/><\/figure>\n<p>2. \u0416\u043c\u0435\u043c \u201cManual Query\u201d, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>3. \u0412\u0441\u0435! \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u044f\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 geojson-\u0444\u043e\u0440\u043c\u0430\u0442\u0435.\u00a0<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c python-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0442\u0435\u043b\u0435\u0444\u043e\u043d, email, \u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430, \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438);<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 (csv) \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"python\">import json from dataclasses import dataclass, asdict import csv  @dataclass class Record:     type_obj: str     lat: float     lon: float     name: str     email: str     phone: str     site: str     social: str  # \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 geojson OSM GEOJSON_FILE = '&lt;path&gt;\/&lt;filename&gt;' # \u043f\u0443\u0442\u044c \u0438 \u0438\u043c\u044f csv-\u0444\u0430\u0439\u043b\u0430 CSV_FILE = '&lt;path&gt;\/&lt;filename&gt;' # \u0438\u043c\u0435\u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 TYPE_OBJ = ['leisure', 'amenity'] ALT_NAME = ['addr:city', 'addr:street', 'addr:housenumber', 'id'] EMAIL = ['email', 'contact:email'] PHONE = ['phone', 'contact:phone'] SITE = ['site', 'website', 'contact:website'] SOCIAL = ['contact:facebook', 'contact:instagram', 'contact:ok', 'contact:vk', 'contact:telegram']  def _get_data(jsn:dict, domain_name:str):     return ', '.join([jsn[_] for _ in jsn if _ in domain_name])  def get_object(rec:dict):     type_obj = _get_data(rec['properties'], TYPE_OBJ)                 email = _get_data(rec['properties'], EMAIL)     phone = _get_data(rec['properties'], PHONE)                 site = _get_data(rec['properties'], SITE)                 social = _get_data(rec['properties'], SOCIAL)                 name = rec['properties'].get('name', _get_data(rec['properties'], ALT_NAME))     match rec['geometry']['type']:         case 'Point':            lat, lon = rec['geometry']['coordinates']         case 'Polygon':            lat, lon = rec['geometry']['coordinates'][0][0]         case _:             return     record = Record(         type_obj=type_obj, lat=lat, lon=lon, name=name,         email=email, phone=phone, site=site, social=social         )     return record  if __name__ == '__main__':     count_parser = 0     data = json.load(open(GEOJSON_FILE, 'r', encoding='utf-8'))     print (f'\u0412\u0441\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b\u0435: {len(data[\"features\"])}')     f = open(CSV_FILE, 'a', newline='', encoding='utf-8')     csv_writer = None      for rec in data['features']:         record = get_object(rec)         if not record:             continue         if not csv_writer:             csv_writer = csv.DictWriter(f, fieldnames=asdict(record).keys(), delimiter=';')             csv_writer.writeheader()         csv_writer.writerow(asdict(record))         count_parser += 1     f.close()     print (f'\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e: {count_parser}')<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0433\u043e \u0433\u0435\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0430\u0439\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b) \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441 \u0442\u0438\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.\u00a0<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0432 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 HORECA, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>bar;<\/p>\n<\/li>\n<li>\n<p>cafe;<\/p>\n<\/li>\n<li>\n<p>fast_food;<\/p>\n<\/li>\n<li>\n<p>pub;<\/p>\n<\/li>\n<li>\n<p>restaurant.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0420\u043e\u0441\u0442\u043e\u0432\u0435-\u043d\u0430-\u0414\u043e\u043d\u0443, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c OSM, \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0430\u0448\u043b\u043e\u0441\u044c 241, \u0432 \u041f\u0430\u0440\u0438\u0436\u0435 \u2014 7570.<\/p>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0438\u043f\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043c\u043e\u0436\u043d\u043e \u043d\u0430 <a href=\"https:\/\/taginfo.openstreetmap.org\/\"><u>\u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435<\/u><\/a>.\u00a0<\/p>\n<h2>\u0411\u043e\u043d\u0443\u0441<\/h2>\n<p>\u0412 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430: \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u044b.\u00a0<\/p>\n<p>\u041d\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c\u0438. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e (\u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f).\u00a0<\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434. \u0423 OSM \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 <a href=\"https:\/\/nominatim.openstreetmap.org\"><u>Nominatim<\/u><\/a>. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u0433\u0435\u043e\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 python:<\/p>\n<pre><code class=\"python\">import requests def get_address(lat:float, lon:float)-&gt; str:     url = f'https:\/\/nominatim.openstreetmap.org\/reverse?format=json&amp;lat={lat}&amp;lon={lon}'     result = requests.get(url)     return result.json().get('display_name')<\/code><\/pre>\n<h2>\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u0432 \u0437\u0430\u0449\u0438\u0442\u0443 \u043a\u0435\u0439\u0441\u0430<\/h2>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043b\u0430\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0435\u0439\u0441\u0430 \u2014 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043a \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043a\u0443\u043f\u0438\u043b\u0438 \/ \u0441\u043a\u0430\u0447\u0430\u043b\u0438, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0410 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0438 \u043a\u0440\u043e\u0441\u0441-\u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u0445 \u0440\u0430\u0437\u0431\u043e\u0440 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u0435\u043c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/p>\n<hr\/>\n<p>\u041d\u041b\u041e \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u0433\u0430:<br \/><a href=\"https:\/\/firstvds.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=product&amp;utm_content=vds15exeptprogrev\">-15% \u043d\u0430 \u0437\u0430\u043a\u0430\u0437 \u043b\u044e\u0431\u043e\u0433\u043e VDS<\/a>\u00a0(\u043a\u0440\u043e\u043c\u0435 \u0442\u0430\u0440\u0438\u0444\u0430 \u041f\u0440\u043e\u0433\u0440\u0435\u0432) \u2014 <strong>HABRFIRSTVDS<\/strong><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/833926\/\"> https:\/\/habr.com\/ru\/articles\/833926\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \/ email \u0434\u043b\u044f \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<p>1) \u043a\u0443\u043f\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443<\/p>\n<p>2) \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u0430\u0439\u0442\u043e\u0432 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443<\/p>\n<p>3) \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431, \u0442\u043e\u0436\u0435 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u0441 \u0434\u0432\u0443\u043c\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u2014 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<hr\/>\n<h2>\u041e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u041c\u0430\u043b\u043e \u043a\u0442\u043e \u0438\u0437 \u043f\u0440\u043e\u0434\u0430\u0436\u043d\u0438\u043a\u043e\u0432 \u0437\u043d\u0430\u0435\u0442 \u043f\u0440\u043e <a href=\"https:\/\/www.openstreetmap.org\/\"><u>OSM<\/u><\/a> \u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e, OSM \u2014 \u044d\u0442\u043e \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0433\u0434\u0435 \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043c\u0438\u0440\u0430 \u0438 \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0438\u043b\u0438 \u0444\u0438\u0442\u043d\u0435\u0441-\u043a\u043b\u0443\u0431, \u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e:\u00a0<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0430\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0442\u0430\u043a \u0438 \u0434\u0435\u043b\u0430\u044e\u0442. OSM \u2014 \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u044b OSM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abOrganic maps\u00bb, \u00abGo map!\u00bb. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 OSM<\/h2>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u041e\u043f\u0438\u0448\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439.<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e OSM \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u044f\u0437\u044b\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/RU:Overpass_API\"><u>overpass<\/u><\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445, \u043d\u0430\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u0414\u0430 \u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441. \u0412\u043e\u0442 \u043e\u043d:<\/p>\n<pre><code>[out:json]; nw[~\"^contact:.*|email|phone|.*site$\"~\".\"] ({{bbox}}); (._;&gt;;);out;<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u043d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u2014 &#171;<em>\u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u043c \/ \u043f\u043e\u0447\u0442\u043e\u0439 \/ \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0441\u0430\u0439\u0442\u0430<\/em>&#171;<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 python (\u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/python-overpy.readthedocs.io\/en\/latest\/api.html\"><u>overpy<\/u><\/a>), \u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u043d\u043b\u0430\u0439\u043d-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/osm-gpt.rohitgautam.com.np\/\"><u>\u044d\u0442\u0438\u043c<\/u><\/a>. \u0418\u0442\u0430\u043a, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>1. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u0440\u0435\u0433\u0438\u043e\u043d \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430. \u041f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0440\u043e\u0434 \u041f\u0430\u0440\u0438\u0436,\u00a0 \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0420\u043e\u0441\u0442\u043e\u0432-\u043d\u0430-\u0414\u043e\u043d\u0443 \u0441 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u043d\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u0416\u043c\u0435\u043c \u201cManual Query\u201d, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>3. \u0412\u0441\u0435! \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u044f\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 geojson-\u0444\u043e\u0440\u043c\u0430\u0442\u0435.\u00a0<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c python-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0442\u0435\u043b\u0435\u0444\u043e\u043d, email, \u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430, \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438);<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 (csv) \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"python\">import json from dataclasses import dataclass, asdict import csv  @dataclass class Record:     type_obj: str     lat: float     lon: float     name: str     email: str     phone: str     site: str     social: str  # \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 geojson OSM GEOJSON_FILE = '&lt;path&gt;\/&lt;filename&gt;' # \u043f\u0443\u0442\u044c \u0438 \u0438\u043c\u044f csv-\u0444\u0430\u0439\u043b\u0430 CSV_FILE = '&lt;path&gt;\/&lt;filename&gt;' # \u0438\u043c\u0435\u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 TYPE_OBJ = ['leisure', 'amenity'] ALT_NAME = ['addr:city', 'addr:street', 'addr:housenumber', 'id'] EMAIL = ['email', 'contact:email'] PHONE = ['phone', 'contact:phone'] SITE = ['site', 'website', 'contact:website'] SOCIAL = ['contact:facebook', 'contact:instagram', 'contact:ok', 'contact:vk', 'contact:telegram']  def _get_data(jsn:dict, domain_name:str):     return ', '.join([jsn[_] for _ in jsn if _ in domain_name])  def get_object(rec:dict):     type_obj = _get_data(rec['properties'], TYPE_OBJ)                 email = _get_data(rec['properties'], EMAIL)     phone = _get_data(rec['properties'], PHONE)                 site = _get_data(rec['properties'], SITE)                 social = _get_data(rec['properties'], SOCIAL)                 name = rec['properties'].get('name', _get_data(rec['properties'], ALT_NAME))     match rec['geometry']['type']:         case 'Point':            lat, lon = rec['geometry']['coordinates']         case 'Polygon':            lat, lon = rec['geometry']['coordinates'][0][0]         case _:             return     record = Record(         type_obj=type_obj, lat=lat, lon=lon, name=name,         email=email, phone=phone, site=site, social=social         )     return record  if __name__ == '__main__':     count_parser = 0     data = json.load(open(GEOJSON_FILE, 'r', encoding='utf-8'))     print (f'\u0412\u0441\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b\u0435: {len(data[\"features\"])}')     f = open(CSV_FILE, 'a', newline='', encoding='utf-8')     csv_writer = None      for rec in data['features']:         record = get_object(rec)         if not record:             continue         if not csv_writer:             csv_writer = csv.DictWriter(f, fieldnames=asdict(record).keys(), delimiter=';')             csv_writer.writeheader()         csv_writer.writerow(asdict(record))         count_parser += 1     f.close()     print (f'\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e: {count_parser}')<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0433\u043e \u0433\u0435\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0430\u0439\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b) \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441 \u0442\u0438\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.\u00a0<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0432 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 HORECA, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>bar;<\/p>\n<\/li>\n<li>\n<p>cafe;<\/p>\n<\/li>\n<li>\n<p>fast_food;<\/p>\n<\/li>\n<li>\n<p>pub;<\/p>\n<\/li>\n<li>\n<p>restaurant.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0420\u043e\u0441\u0442\u043e\u0432\u0435-\u043d\u0430-\u0414\u043e\u043d\u0443, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c OSM, \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0430\u0448\u043b\u043e\u0441\u044c 241, \u0432 \u041f\u0430\u0440\u0438\u0436\u0435 \u2014 7570.<\/p>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0438\u043f\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043c\u043e\u0436\u043d\u043e \u043d\u0430 <a href=\"https:\/\/taginfo.openstreetmap.org\/\"><u>\u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435<\/u><\/a>.\u00a0<\/p>\n<h2>\u0411\u043e\u043d\u0443\u0441<\/h2>\n<p>\u0412 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430: \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u044b.\u00a0<\/p>\n<p>\u041d\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c\u0438. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e (\u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f).\u00a0<\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434. \u0423 OSM \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 <a href=\"https:\/\/nominatim.openstreetmap.org\"><u>Nominatim<\/u><\/a>. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u0433\u0435\u043e\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 python:<\/p>\n<pre><code class=\"python\">import requests def get_address(lat:float, lon:float)-&gt; str:     url = f'https:\/\/nominatim.openstreetmap.org\/reverse?format=json&amp;lat={lat}&amp;lon={lon}'     result = requests.get(url)     return result.json().get('display_name')<\/code><\/pre>\n<h2>\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u0432 \u0437\u0430\u0449\u0438\u0442\u0443 \u043a\u0435\u0439\u0441\u0430<\/h2>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043b\u0430\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0435\u0439\u0441\u0430 \u2014 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043a \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043a\u0443\u043f\u0438\u043b\u0438 \/ \u0441\u043a\u0430\u0447\u0430\u043b\u0438, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0410 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0438 \u043a\u0440\u043e\u0441\u0441-\u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u0445 \u0440\u0430\u0437\u0431\u043e\u0440 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u0435\u043c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/p>\n<hr\/>\n<p>\u041d\u041b\u041e \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u0433\u0430:<br \/><a href=\"https:\/\/firstvds.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=product&amp;utm_content=vds15exeptprogrev\">-15% \u043d\u0430 \u0437\u0430\u043a\u0430\u0437 \u043b\u044e\u0431\u043e\u0433\u043e VDS<\/a>\u00a0(\u043a\u0440\u043e\u043c\u0435 \u0442\u0430\u0440\u0438\u0444\u0430 \u041f\u0440\u043e\u0433\u0440\u0435\u0432) \u2014 <strong>HABRFIRSTVDS<\/strong><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/833926\/\"> https:\/\/habr.com\/ru\/articles\/833926\/<\/a><br \/><\/br><\/br><\/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-429724","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/429724","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=429724"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/429724\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}