{"id":344872,"date":"2023-02-02T09:01:59","date_gmt":"2023-02-02T09:01:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344872"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344872","title":{"rendered":"<span>\u041a\u0430\u043a \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u043c\u0438\u0440 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043d\u043e\u0443\u0442\u0431\u0443\u043a: PostgreSQL \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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0440\u0430\u043d\u044c\u0448\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0447\u0442\u043e\u00a0\u043e\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u043c\u0438\u0440, \u0442\u043e \u0435\u0433\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0438 \u0432\u00a0\u0441\u043e\u0441\u0435\u0434\u043d\u044e\u044e \u043f\u0430\u043b\u0430\u0442\u0443 \u0441\u00a0\u0411\u043e\u043d\u0430\u043f\u0430\u0440\u0442\u043e\u043c \u041d\u0430\u043f\u043e\u043b\u0435\u043e\u043d\u043e\u043c. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e\u00a0\u044d\u0442\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u00a0\u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0438 \u043a\u0430\u0436\u0434\u044b\u0439\u00a0\u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0435\u0439 \u0417\u0435\u043c\u043b\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430\u00a0\u0441\u0432\u043e\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0437\u0430\u00a0\u043c\u0438\u043d\u0443\u0442\u044b \u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u042f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b <a href=\"https:\/\/github.com\/igor-suhorukov\/openstreetmap_h3\" rel=\"noopener noreferrer nofollow\">Openstreetmap_h3<\/a>\u00a0\u2014 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0433\u0435\u043e\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u043d\u0430\u0434 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0OpenStreetMap \u0432\u00a0PostGIS \u0438\u043b\u0438\u00a0\u0432\u00a0\u0434\u0432\u0438\u0436\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u00a0Apache Arrow\/Parquet.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u043f\u0440\u0438\u0432\u0435\u0442 \u0445\u0435\u0439\u0442\u0435\u0440\u0430\u043c \u0438 \u0441\u043a\u0435\u043f\u0442\u0438\u043a\u0430\u043c. \u0422\u043e \u0447\u0442\u043e\u00a0\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u00a0\u2014 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0438 \u0434\u0430\u0442\u0430\u0441\u0430\u0435\u043d\u0441 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u0431\u0435\u0437\u00a0\u0431\u0438\u0433\u0434\u0430\u0442, GPGPU, FPGA. \u0422\u043e \u0447\u0442\u043e\u00a0\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438 \u0432\u00a0\u043a\u043e\u0434\u0435\u00a0\u2014 \u044d\u0442\u043e \u043c\u043e\u0439\u00a0\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u0438 \u043e\u0442\u043f\u0443\u0441\u043a\u0430, \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435, \u0431\u0435\u0441\u0441\u043e\u043d\u043d\u044b\u0435 \u043d\u043e\u0447\u0438 \u0438 \u0443\u0439\u043c\u0443\u00a0\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 3\u00a0\u0433\u043e\u0434\u0430. \u041c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0438 \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438 \u043f\u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0445\u043e\u0434\u0438\u043b, \u043d\u043e\u00a0\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0432\u0441\u0435\u00a0\u0436\u0435 \u043e\u043f\u0438\u0448\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0441\u0442 \u043d\u0435\u00a0\u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430\u00a0\u043c\u043e\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044e, \u043d\u0430\u0447\u043d\u0443 \u0441\u00a0\u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430. \u041f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043d\u0430\u00a0\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044f\u0445 \u0438 \u0432\u00a0\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445, \u0430\u00a0\u0442\u0435\u043c\u0430 \u0445\u043e\u0442\u044c \u0438 \u043d\u0438\u0448\u0435\u0432\u0430\u044f, \u043d\u043e\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u00a0\u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0OSM. \u0414\u043b\u044f\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u0435\u00a0\u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0441\u00a0OSM \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u0438 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u043e\u043a\u0430 \u044f \u043d\u0435\u00a0\u0431\u0443\u0434\u0443 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u00a0\u044d\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u044b. \u041e\u0442\u043c\u0435\u0447\u0443\u00a0\u043b\u0438\u0448\u044c, \u0447\u0442\u043e\u00a0\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430\u00a0\u0435\u0433\u043e \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u0441\u0430\u043c OpenStreetMap \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u0434 \u043e\u0442\u00a0\u0433\u043e\u0434\u0430. \u0412\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u0445 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 OSM \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c \u0443\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a\u0430\u044f \u043e\u043d\u0430 \u0435\u0441\u0442\u044c\u00a0\u2014 \u0433\u0438\u0431\u043a\u0430\u044f \u0438 \u043d\u0435\u00a0\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u00a0\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044e\u0449\u0430\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u00a0\u0441\u0447\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0435, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 opensource \u0411\u0414 \u0441\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0442\u0430\u043a\u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b, \u043d\u043e\u00a0\u0432\u0441\u0435\u00a0\u0436\u0435 PostgreSQL+PostGIS \u043d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0441\u0430\u043c\u044b\u043c\u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0443 \u0438 \u0432\u0438\u0448\u0435\u043d\u043a\u043e\u0439 \u043d\u0430\u00a0\u0442\u043e\u0440\u0442\u0435: \u044d\u0442\u0430\u00a0\u0436\u0435 \u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0Postgresql \u0432\u0441\u0435\u0433\u043e\u00a0\u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u00a0\u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 <a href=\"https:\/\/github.com\/citusdata\/citus\" rel=\"noopener noreferrer nofollow\">CitusDB<\/a> \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u043e\u0433\u043e\u00a0\u0436\u0435 PostgreSQL.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0447\u0435\u043c \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043c\u043f \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u0432\u00a0PostgreSQL \u0431\u0430\u0437\u0443\u00a0\u0431\u044b\u043b\u0438 \u0434\u043e\u043b\u0433\u0438\u0435 \u0438 \u043c\u0443\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435&#8230; \u0423\u0442\u0438\u043b\u0438\u0442\u0430 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/RU:Osmosis\" rel=\"noopener noreferrer nofollow\">Osmosis<\/a>  \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430\u00a0java, \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u0433\u0430\u0442\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u00a0\u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 OSM \u0438 \u0432\u00a0\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostgreSQL \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <a href=\"https:\/\/github.com\/openstreetmap\/osmosis\/tree\/main\/package\/script\" rel=\"noopener noreferrer nofollow\">pgSnapshot<\/a> \u0434\u043b\u044f\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u00a0\u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0PBF \u0432\u00a0tsv \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f\u00a0\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u00a0\u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b \u0411\u0414. \u0421\u0445\u0435\u043c\u0430 pgSnapshot lossless, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u0435\u0437\u00a0\u043f\u043e\u0442\u0435\u0440\u044c, \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0438\u0442\u043f. \u041d\u043e\u00a0\u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441\u00a0\u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b nodes, ways \u043d\u0430\u00a0\u0441\u043e\u0442\u043d\u0438 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, \u0447\u0442\u043e\u00a0\u043d\u0435\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0434\u043e\u043b\u0433\u043e\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0445 \u043f\u043e\u00a0\u043e\u0431\u044a\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 full scan \u043f\u043e\u00a0\u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. Osm2pgsql, Imposm \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostGIS, \u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u00a0\u043c\u044d\u043f\u043f\u0438\u043d\u0433\u0443 \u0441\u00a0\u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435\u00a0\u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f\u00a0\u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0440\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f\u00a0\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. Osmium export \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u044b\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0447\u0435\u043c Osmosis, \u043d\u043e\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b PostGIS \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u0435\u0435 \u043f\u043e\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0447\u0435\u043c \u0432\u00a0Osmosis.<\/p>\n<h2>\u041a\u043e\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u043b\u043e\u0448\u0430\u0434\u043a\u0430 \u043d\u0435 \u0443\u0442\u044f\u043d\u0435\u0442, \u043f\u043e\u0440\u0430 \u0437\u0430\u043f\u0440\u044f\u0433\u0430\u0442\u044c \u0441\u043b\u043e\u043d\u0430 (PostgreSQL+PostGIS)<\/h2>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c\u00a0\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostgreSQL \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u043e\u043c \u043a\u00a0pgSnapshot, \u0441\u00a0\u0431\u044b\u0441\u0442\u0440\u044b\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u00a0PBF \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u00a0\u0411\u0414.\u00a0\u0411\u044b\u043b\u043e\u00a0\u0431\u044b \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435\u00a0\u0431\u044b\u043b\u0438 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438\u00a0\u0431\u044b\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u0434\u0440\u0443\u0433 \u043a\u00a0\u0434\u0440\u0443\u0433\u0443 \u0438 \u0441\u0435\u0442\u043a\u0430 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u00a0\u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u00a0\u0440\u0430\u0434\u0438\u0443\u0441\u0443, \u043a\u0430\u043a\u00a0\u0443\u00a0\u044d\u043a\u0432\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u0438 \u0443\u00a0\u043f\u043e\u043b\u044e\u0441\u043e\u0432 \u043f\u043b\u0430\u043d\u0435\u0442\u044b. \u0418\u0437\u00a0\u0441\u0438\u0441\u0442\u0435\u043c \u0433\u0435\u043e\u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b\u00a0\u2014 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u00a0\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c\/\u0441\u0442\u0440\u0430\u043d\u0430\u043c, \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u043a\u043e\u0439, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b S2\u00a0\u0438 H3. \u0418 \u0432\u044b\u0431\u043e\u0440\u00a0\u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0432\u00a0\u043f\u043e\u043b\u044c\u0437\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a\u00a0\u044d\u0442\u0430 <a href=\"https:\/\/h3geo.org\" rel=\"noopener noreferrer nofollow\">\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f H3<\/a> \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0432\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0430\u0434\u0438\u0443\u0441 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u0432\u00a0\u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0437\u0435\u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430), \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f\u00a0\u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0H3\u00a0\u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f\u00a0PostgreSQL\/JVM.<\/p>\n<p>\u0412\u00a0\u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u00a0Java \u0438 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0445\u0435\u043c\u0443 \u0411\u0414 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0441\u00a0pgSnapshot, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0423\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u0445\u0435\u043c\u044b \u0411\u0414, \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u00a0PBF \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0432\u00a0\u0411\u0414 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>\u042d\u0442\u043e\u00a0\u0431\u044b\u043b \u043f\u0443\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0441\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Osmosis \u0438 osm\u2011parquetizer. \u0421\u043e\u0431\u0438\u0440\u0430\u043b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u0435\u043a\u00a0\u043b\u0438\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f memory mapped \u0444\u0430\u0439\u043b \u043d\u0430\u00a0\u0441\u043e\u0442\u043d\u044e \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 \u0432\u00a0Java \u043a\u043e\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b add\u2011locations\u2011to\u2011ways \u0438\u0437\u00a0osmium\u00a0\u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e\u00a0\u0436\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041a\u00a0\u0442\u043e\u043c\u0443\u00a0\u0436\u0435 osmium \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u043b\u0438\u0433\u043e\u043d\u044b, \u0447\u0442\u043e\u00a0\u0433\u043e\u0440\u0430\u0437\u0434\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435 \u0447\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 \u0411\u0414, \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0435\u0449\u0451 \u0442\u044f\u043d\u0435\u0442 \u0432 \u0431\u0438\u0433\u0434\u0430\u0442\u0443 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c Apache Arrow<\/h2>\n<p>\u0423\u00a0\u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u00a0H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostgreSQL \u0438 \u0432\u0441\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u043e\u00a0\u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u0442\u0438\u00a0\u0436\u0435 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0Apache Spark \u0438\u043b\u0438\u00a0Hadoop \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c\u00a0\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0PBF \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 Arrow\/Parquet \u0431\u0435\u0437\u00a0\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e PostgreSQL. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u0432\u043e\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043e\u043f\u044b\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 <a href=\"https:\/\/github.com\/adrianulbona\/osm-parquetizer\" rel=\"noopener noreferrer nofollow\">osm\u2011parquetizer<\/a>, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u00a0\u0441\u0432\u043e\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 Apache Arrow \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f Parquet \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u00a0H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043d\u0443\u0436\u0435\u043d \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433 \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043f\u043e\u043a\u0430 \u0447\u0442\u043e\u00a0\u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c python \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430). \u0418\u0437\u00a0\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u043c\u043e\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043f\u0435\u0440\u0435\u0434 osm\u2011parquetizer\u00a0\u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c \u0432\u00a0\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 PBF \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0431\u043e\u0440\u043a\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0434\u043b\u044f\u00a0\u043b\u0438\u043d\u0438\u0439 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0433\u0435\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0430 H3\u00a0\u0434\u043b\u044f\u00a0nodes, ways. \u041e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u043b\u044f\u00a0\u0433\u0435\u043e\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u00a0parquet\u00a0\u2014 \u044d\u0442\u043e \u043a\u0430\u043a\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u00a0\u043b\u0438\u043d\u0438\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u00a0\u0430\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0438\u0445 \u043a\u0430\u043a\u00a0\u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u043e\u0447\u0435\u043a, \u044f\u00a0\u0436\u0435 \u043f\u043e\u043a\u0430 \u0440\u0435\u0448\u0438\u043b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00a0\u043b\u0438\u043d\u0438\u0438 \u0432\u00a0WKB \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<h3>Openstreetmap_h3 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Java<\/h3>\n<p>\u041a\u0430\u043a\u00a0\u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u0432\u044b\u0448\u0435, \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u043e\u0437\u043d\u0438\u043a \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u043e \u0438\u0437\u00a0Osmosis \u0438 osm\u2011parquetizer \u0438\u00a0\u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d \u00ab\u0441 \u043d\u0443\u043b\u044f\u00bb \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u0433\u0440\u0430\u0431\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u0440\u0430\u043b \u0432\u00a0\u044d\u0442\u0438\u0445 Java \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u00a0maven, \u0430\u00a0\u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a\u00a0\u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package com.github.isuhorukov.osm.pgsnapshot;  import com.beust.jcommander.JCommander; import com.github.isuhorukov.osm.pgsnapshot.model.*; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.BlockStat; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.MultipolygonTime; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.PbfStatistics; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.Stat; import com.github.isuhorukov.osm.pgsnapshot.model.table.StatType; import com.github.isuhorukov.osm.pgsnapshot.model.table.TableStat; import com.github.isuhorukov.osm.pgsnapshot.util.CompactH3; import com.github.isuhorukov.osm.pgsnapshot.util.PartitionSplitter; import com.google.common.util.concurrent.MoreExecutors; import com.uber.h3core.H3Core; import com.uber.h3core.util.LatLng; import net.postgis.jdbc.geometry.LineString; import net.postgis.jdbc.geometry.LinearRing; import net.postgis.jdbc.geometry.Point; import net.postgis.jdbc.geometry.Polygon; import net.postgis.jdbc.geometry.binary.BinaryWriter; import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.*; import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.complex.impl.UnionListWriter; import org.apache.arrow.vector.complex.impl.UnionMapWriter; import org.apache.arrow.vector.ipc.ArrowFileWriter; import org.apache.arrow.vector.types.FloatingPointPrecision; import org.apache.arrow.vector.types.pojo.ArrowType; import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.FieldType; import org.apache.arrow.vector.types.pojo.Schema; import org.apache.commons.io.IOUtils; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.h2gis.functions.spatial.properties.ST_IsClosed; import org.locationtech.jts.algorithm.MinimumBoundingCircle; import org.locationtech.jts.geom.*; import org.locationtech.jts.io.WKBWriter; import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.TransformException; import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer; import org.openstreetmap.osmosis.core.container.v0_6.NodeContainer; import org.openstreetmap.osmosis.core.container.v0_6.RelationContainer; import org.openstreetmap.osmosis.core.container.v0_6.WayContainer; import org.openstreetmap.osmosis.core.domain.v0_6.Entity; import org.openstreetmap.osmosis.core.domain.v0_6.RelationMember; import org.openstreetmap.osmosis.core.domain.v0_6.Tag; import org.openstreetmap.osmosis.core.domain.v0_6.WayNode; import org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfBlobDecoder; import org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfBlobDecoderListener; import org.openstreetmap.osmosis.pbf2.v0_6.impl.RawBlob; import org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.MemberTypeValueMapper;  import java.io.*; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors;  import static java.util.stream.Collectors.toList;  public class OsmPbfTransformation {      public static final String NODES_DIR = \"nodes\";     public static final String RELATIONS_DIR = \"relations\";     public static final String WAYS_DIR = \"ways\";     public static final String MULTIPOLYGON_DIR = \"multipolygon\";     public static final String SQL_DIR = \"sql\";     public static final String ARROW_DIR = \"arrow\";     public static final String IMPORT_RELATED_METADATA_DIR = \"import_related_metadata\";     public static final String STATIC_DIR = \"static\";      public static void main(String[] args) throws Exception{          CliParameters parameters = parseCliArguments(args);         if (parameters == null){             return;         }         long commandStartTime = System.currentTimeMillis();          String sourceFilePath = parameters.sourceFilePath;         File sourcePbfFile = new File(sourceFilePath);         if(!sourcePbfFile.exists() || sourcePbfFile.length()==0){             throw new IllegalArgumentException(\"Input pbf should exists and should be non empty\");         }          Splitter.Blocks blocks =ExternalProcessing.enrichSourcePbfAndSplitIt(sourcePbfFile);          File inputDirectory = new File(blocks.getDirectory());         File[] files = inputDirectory.listFiles();         Arrays.sort(Objects.requireNonNull(files));         File resultDirectory = prepareResultDirectories(new File(inputDirectory.getParent(),                                                             resultDirectoryNameFromSource(inputDirectory)),                 parameters.savePostgresqlTsv, parameters.saveArrow);          copyOsmiumSettings(resultDirectory);         if(parameters.savePostgresqlTsv) {             copyResources(resultDirectory, parameters.columnarStorage);         }          long processingStartTime = System.currentTimeMillis();          final H3Core h3Core = H3Core.newInstance();           ExecutorService saveExecutorService = getExecutorService(parameters.workers);         ExecutorService executorService = getExecutorService(parameters.workers);          Map&lt;Long, BlockStat> blockStat= new ConcurrentHashMap&lt;>();         AtomicInteger currentBlockToSave= new AtomicInteger(0);         for(File blockFile: files){              executorService.submit(() -> {                 long threadStart = System.currentTimeMillis();                 Long blockNumber = Long.parseLong(blockFile.getName());                 if(blockNumber%1000==0){                     System.out.println(blockNumber);                 }                 RawBlob rawBlob;                 try {                     FileInputStream blobInputStream = new FileInputStream(blockFile);                     rawBlob = new RawBlob(\"OSMData\", IOUtils.toByteArray(blobInputStream));                 } catch (IOException e) {                     throw new IllegalArgumentException(e);                 }                  PbfBlobDecoder blobDecoder = new PbfBlobDecoder(rawBlob, new PbfBlobDecoderListener() {                     @Override                     public void complete(List&lt;EntityContainer> decodedEntities) {                         long blockStartTime = System.currentTimeMillis();                         GeometryFactory geometryFactory = new GeometryFactory();                         MemberTypeValueMapper memberTypeValueMapper = new MemberTypeValueMapper();                         Map&lt;Short, StringBuilder> csvResultPerH33 =new HashMap&lt;>();                         BinaryWriter binaryWriter = new BinaryWriter();                         ArrayList&lt;ArrowNodeOrWay> arrowNodeOrWays = new ArrayList&lt;>();                         ArrayList&lt;ArrowRelation> arrowRelations = new ArrayList&lt;>();                         WKBWriter wkbWriter = new WKBWriter();                         final CoordinateReferenceSystem coordinateReferenceSystem;                         try {                             coordinateReferenceSystem = CRS.decode(\"EPSG:\" + Serializer.SRID);                         } catch (FactoryException e) {                             throw new RuntimeException(e);                         }                          Map&lt;Short, Stat> nodeStat =new HashMap&lt;>();                         long nodeRecords = decodedEntities.stream().                                 filter(entityContainer -> entityContainer instanceof NodeContainer).                             map(entityContainer -> ((NodeContainer) entityContainer).getEntity()).map(entity -> {                                 prepareNodeData(csvResultPerH33, binaryWriter, arrowNodeOrWays,                                         nodeStat, entity, h3Core, parameters.collectOnlyStat, parameters.saveArrow, parameters.savePostgresqlTsv);                                 return null;                             }).filter(Objects::isNull).count();                          Map&lt;Short, Stat> wayStat =new HashMap&lt;>();                         long wayRecords = decodedEntities.stream().                                 filter(entityContainer -> entityContainer instanceof WayContainer).                             map(entityContainer -> ((WayContainer) entityContainer).getEntity()).map(entity -> {                             prepareWayData(geometryFactory, csvResultPerH33, binaryWriter,  wkbWriter,                                     arrowNodeOrWays, wayStat, entity, h3Core,                                     parameters.scaleApproximation, parameters.collectOnlyStat, parameters.skipBuildings,                                     coordinateReferenceSystem, parameters.saveArrow, parameters.savePostgresqlTsv);                                 return null;                             }).filter(Objects::isNull).count();                         BlockStat blockStatistic = new BlockStat(blockNumber);                         blockStatistic.setThreadStart(threadStart);                         if(!nodeStat.isEmpty()) {                             blockStatistic.setNodeStat(nodeStat);                         }                         if(!wayStat.isEmpty()) {                             blockStatistic.setWayStat(wayStat);                         }                         long relationCount = decodedEntities.stream().                             filter(entityContainer -> entityContainer instanceof RelationContainer).                             map(entityContainer -> ((RelationContainer) entityContainer).getEntity()).                             map(entity -> {                                 if(!parameters.collectOnlyStat) {                                     long relationId = entity.getId();                                     if(parameters.savePostgresqlTsv){                                         StringBuilder relationCsv = csvResultPerH33.computeIfAbsent((short)0, h33Key -> new StringBuilder());                                         Serializer.serializeRelation(relationCsv, relationId, entity.getTags());                                     }                                      ArrowRelation arrowRelation = null;                                     if(parameters.saveArrow){                                         arrowRelation = new ArrowRelation(relationId, TagsUtil.tagsToMap(entity.getTags()));                                         arrowRelations.add(arrowRelation);                                     }                                      List&lt;RelationMember> relationMembers = entity.getMembers();                                     for(int sequenceId=0; sequenceId&lt;relationMembers.size();sequenceId++){                                         RelationMember relationMember = relationMembers.get(sequenceId);                                         long memberId = relationMember.getMemberId();                                         String memberType = memberTypeValueMapper.getMemberType(relationMember.getMemberType());                                         String memberRole = relationMember.getMemberRole();                                         if(parameters.saveArrow){                                             arrowRelation.getRelationMembers().add(                                                     new ArrowRelationMember(memberId, memberType.charAt(0), memberRole));                                         }                                         if(parameters.savePostgresqlTsv){                                             StringBuilder relationMembersCsv = csvResultPerH33.computeIfAbsent((short)1, h33Key -> new StringBuilder());                                             Serializer.serializeRelationMembers(relationMembersCsv, relationId,                                                     memberId, memberType, memberRole, sequenceId);                                         }                                     }                                 }                                 return null;                             }).count();                         long multipolygonCount = relationCount==0 ? 0 : decodedEntities.stream().                             filter(entityContainer -> entityContainer instanceof RelationContainer).                             map(entity -> {                                 for(Tag tag: entity.getEntity().getTags()){                                     if(\"type\".equals(tag.getKey()) &amp;&amp; \"multipolygon\".equals(tag.getValue())){                                         return 1;                                     }                                 }                                 return 0;                             }).mapToLong(Integer::longValue).sum();                         long relationMemberCount = decodedEntities.stream().                                 filter(entityContainer -> entityContainer instanceof RelationContainer).                                 map(entityContainer -> ((RelationContainer) entityContainer).getEntity()).                                 mapToLong(value -> value.getMembers().size()).sum();                         blockStatistic.setNodeCount(nodeRecords);                         blockStatistic.setWayCount(wayRecords);                         blockStatistic.setRelationCount(relationCount);                         blockStatistic.setRelationMembersCount(relationMemberCount);                         blockStatistic.setMultipolygonCount(multipolygonCount);                         blockStat.put(blockNumber, blockStatistic);                         blockStatistic.setProcessingTime(System.currentTimeMillis()-blockStartTime);                          if(!parameters.collectOnlyStat) {                             if(parameters.saveArrow){                                 long startSaveTime = System.currentTimeMillis();                                 if(!arrowNodeOrWays.isEmpty()){                                     saveArrowNodesOrWays(arrowNodeOrWays, blockNumber, new File(resultDirectory,ARROW_DIR));                                 }                                 if(!arrowRelations.isEmpty()){                                     saveArrowRelations(arrowRelations, blockNumber, new File(resultDirectory, ARROW_DIR));                                 }                                 blockStatistic.setSaveTime(System.currentTimeMillis()-startSaveTime);                             }                             if(parameters.savePostgresqlTsv){                                 saveDataOnlyInOneThread(csvResultPerH33, nodeRecords, wayRecords,                                     blockStatistic, relationCount,                                     currentBlockToSave, blockNumber, resultDirectory, saveExecutorService);                             }                         }                     }                      @Override                     public void error() {                         System.out.println(\"ERROR in block \"+blockNumber);                     }                 });                 blobDecoder.run();                 long threadTime = System.currentTimeMillis() - threadStart;                 blockStat.get(blockNumber).setThreadTime(threadTime);             });         }         executorService.shutdown();         executorService.awaitTermination(2,TimeUnit.DAYS);         saveExecutorService.shutdown();\/\/stop executor only when all tasks in processing executor is finished          List&lt;BlockStat> blockStatistics = new ArrayList&lt;BlockStat>(blockStat.values());         long multipolygonCount = blockStatistics.stream().map(BlockStat::getMultipolygonCount).mapToLong(Long::longValue).sum();         long dataProcessingTime = System.currentTimeMillis() - processingStartTime;         System.out.println(files.length+\" \"+\" time \"+dataProcessingTime);         System.out.println(\"diff between total and processing \" + blockStatistics.stream().map(blockStat1 -> blockStat1.getThreadTime()-blockStat1.getProcessingTime()).mapToLong(Long::longValue).sum());         System.out.println(\"total thread time \"+ blockStatistics.stream().map(BlockStat::getThreadTime).mapToLong(Long::longValue).sum());         System.out.println(\"total processing time \"+ blockStatistics.stream().map(BlockStat::getProcessingTime).mapToLong(Long::longValue).sum());         System.out.println(\"total save time \"+ blockStatistics.stream().map(BlockStat::getSaveTime).mapToLong(Long::longValue).sum());         System.out.println(\"total waiting for save time \"+ blockStatistics.stream().map(BlockStat::getWaitingForSaveTime).mapToLong(Long::longValue).sum());         System.out.println(\"thread max time \"+ blockStatistics.stream().map(BlockStat::getThreadTime).mapToLong(Long::longValue).max().orElse(0));         System.out.println(\"processing max time \"+ blockStatistics.stream().map(BlockStat::getProcessingTime).mapToLong(Long::longValue).max().orElse(0));         System.out.println(\"nodes \"+ blockStatistics.stream().map(BlockStat::getNodeCount).mapToLong(Long::longValue).sum());         System.out.println(\"ways \"+ blockStatistics.stream().map(BlockStat::getWayCount).mapToLong(Long::longValue).sum());         System.out.println(\"relations \"+ blockStatistics.stream().map(BlockStat::getRelationCount).mapToLong(Long::longValue).sum());         System.out.println(\"relation members \"+ blockStatistics.stream().map(BlockStat::getRelationMembersCount).mapToLong(Long::longValue).sum());         System.out.println(\"multipolygon count \"+ multipolygonCount);           if(!parameters.collectOnlyStat) {             savePartitioningScripts(resultDirectory, parameters.scriptCount,                     parameters.thresholdPercentFromMaxPartition, blockStatistics, parameters.columnarStorage);         }          MultipolygonTime multipolygonTime = new MultipolygonTime(); \/\/multipolygonCount calculation is only one reason why this generator at the end of process         if(!parameters.collectOnlyStat) {             multipolygonTime = ExternalProcessing.prepareMultipolygonDataAndScripts(sourcePbfFile,                     resultDirectory, parameters.scriptCount, multipolygonCount);         }         PbfStatistics statistics = new PbfStatistics(blockStatistics);         statistics.setMultipolygonCount(multipolygonCount);         statistics.setDataProcessingTime(dataProcessingTime);         statistics.setAddLocationsToWaysTime(blocks.getAddLocationsToWaysTime());         statistics.setPbfSplitTime(blocks.getPbfSplitTime());         statistics.setMultipolygonExportTime(multipolygonTime.getMultipolygonExportTime());         statistics.setSplitMultipolygonByPartsTime(multipolygonTime.getSplitMultipolygonByPartsTime());         statistics.setTotalTime(System.currentTimeMillis()-commandStartTime);          saveStatistics(resultDirectory, statistics);      } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u00a0\u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u00a0Apache Spark, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0435\u043a\u0446\u0438\u0439 PBF \u0434\u0430\u043c\u043f\u0430 \u0432\u00a0\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435. \u041d\u043e\u00a0\u043e\u043f\u044f\u0442\u044c\u00a0\u0436\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u00a0\u2014 \u0441\u0442\u043e\u0438\u0442\u00a0\u043b\u0438 \u0438\u0433\u0440\u0430 \u0441\u0432\u0435\u0447. \u0414\u043b\u044f\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 parquet \u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u00a0\u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043c\u044b\u0441\u043b, \u0430\u00a0\u0434\u043b\u044f\u00a0PostgreSQL TSV \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0440\u044f\u0434\u00a0\u043b\u0438.<\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0441 Openstreetmap_h3<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0432\u0441\u0435 \u0447\u0442\u043e\u00a0\u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f\u00a0\u043d\u0430\u0447\u0430\u043b\u0430: \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL 14, \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Openstreetmap \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043d\u043e\u0443\u0442\u0431\u0443\u043a. \u0412\u00a0\u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e Dell Latitude 7320: i7\u20131165G7@2.80GHz, 16\u0413\u0431 \u041e\u0417\u0423 \u0441 2\u0422\u0431 NVMe \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u0435\u043c. \u041f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u00a0\u0441\u00a0\u0434\u0430\u043c\u043f\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 PBF, \u0442\u0430\u043a \u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438 c <a href=\"https:\/\/download.geofabrik.de\/index.html\" rel=\"noopener noreferrer nofollow\">Geofabrik <\/a><\/p>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n<pre><code>git clone https:\/\/github.com\/igor-suhorukov\/openstreetmap_h3.git cd openstreetmap_h3 mvn install<\/code><\/pre>\n<p>\u0414\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 Docker. \u041f\u0440\u0438\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:<\/p>\n<pre><code>~\/dev\/projects\/oss_contrib\/openstreetmap_h3$ java -jar target\/osm-to-pgsnapshot-schema-ng-1.0-SNAPSHOT.jar The following option is required: [-source_pbf] Usage: &lt;main class> [options]   Options:   * -source_pbf       Source path for OpenStreetMap data in PBF format     -collect_only_statistics       Collect only statistics from data - partition distribution       Default: false     -columnar_storage       Use columnar storage in PostgreSql tables for nodes\/ways\/multipolygon       Default: false     -data_partition_ratio       Filling ratio from maximum size of partition. This parameter change        PostgreSQL partitions count       Default: 0.48     -help       Information about command line parameters     -pg_script_count       Script count for PostgreSQL parallel COPY       Default: 4     -result_in_arrow       Save data transforming and enrichment in Apache Arrow format       Default: false     -result_in_tsv       Save result data in TabSeparatedValue format for PostgreSQL COPY       Default: true     -scale_approx_calc       Approximate scale calculation. Value 'false' - distance in meter       Default: false     -skip_buildings       Skip any ways with 'building' tag       Default: false     -worker_threads       Worker threads count for data processing       Default: 4<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c OSM <a href=\"https:\/\/planet.openstreetmap.org\/pbf\/\" rel=\"noopener noreferrer nofollow\">PBD \u0434\u0430\u043c\u043f<\/a> \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u0438\u043b\u0438\u00a0\u043a\u0430\u043a\u0443\u044e\u2011\u043b\u0438\u0431\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u0430\u043d\u0443 \u0441 <a href=\"https:\/\/download.geofabrik.de\/asia\/thailand.html\" rel=\"noopener noreferrer nofollow\">Geofabric<\/a><\/p>\n<p>\u0418 \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u0432\u043e\u0439 docker \u043e\u0431\u0440\u0430\u0437 PostgreSQL(Dockerfile \u0432\u00a0\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430) \u0441\u00a0\u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0411\u0414, <a href=\"https:\/\/github.com\/igor-suhorukov\/openstreetmap_h3\/blob\/master\/postgis_docker_14-master\/docker-entrypoint-initdb.d\/init_db.sh\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443<\/a> \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"bash\">docker run --name postgis14-thailand --memory=12g --memory-swap=12g --memory-swappiness 0 --shm-size=1g -v \/home\/acc\/dev\/map\/database\/thailand:\/var\/lib\/postgresql\/data -v \/home\/acc\/dev\/map\/thailand\/thailand-latest_loc_ways:\/input -e POSTGRES_PASSWORD=osmworld -e LD_LIBRARY_PATH=\/usr\/lib\/jvm\/java-11-openjdk-amd64\/lib\/server\/ -d -p 5432:5432 -p 5005:5005 5d411c3be57f -c checkpoint_timeout='15 min' -c checkpoint_completion_target=0.9 -c shared_buffers='4096 MB' -c wal_buffers=-1 -c bgwriter_delay=200ms -c bgwriter_lru_maxpages=100 -c bgwriter_lru_multiplier=2.0 -c bgwriter_flush_after=0 -c max_wal_size='32768 MB' -c min_wal_size='16384 MB'<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0411\u0414:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">~\/dev\/map\/thailand\/thailand-latest_loc_ways$ tree . \u251c\u2500\u2500 import_related_metadata \u2502\u00a0\u00a0 \u251c\u2500\u2500 osm_file_block_content.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 osm_file_block.tsv \u2502\u00a0\u00a0 \u2514\u2500\u2500 osm_file_statistics.tsv \u251c\u2500\u2500 multipolygon \u2502\u00a0\u00a0 \u251c\u2500\u2500 multipolygon_aa \u2502\u00a0\u00a0 \u251c\u2500\u2500 multipolygon_ab \u2502\u00a0\u00a0 \u251c\u2500\u2500 multipolygon_ac \u2502\u00a0\u00a0 \u251c\u2500\u2500 multipolygon_ad \u2502\u00a0\u00a0 \u2514\u2500\u2500 multipolygon_ae \u251c\u2500\u2500 nodes \u2502\u00a0\u00a0 \u251c\u2500\u2500 16713.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 16717.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 16744.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 16745.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 16747.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 16748.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 16749.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25600.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25601.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25606.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25620.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25622.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25632.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25634.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25636.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25638.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25648.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25649.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25650.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25651.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25652.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25653.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25654.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25728.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25729.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25730.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25731.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25732.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25733.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25734.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25744.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25745.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25748.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25749.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25756.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25760.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25761.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25762.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25763.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25764.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25765.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25766.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25774.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25776.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25777.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25778.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25779.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25780.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25781.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25782.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25873.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25880.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25881.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25882.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25883.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25884.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25885.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25886.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25985.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25989.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25992.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25993.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25994.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25995.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25996.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 25998.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26000.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26001.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26003.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26008.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26009.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26010.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26011.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26012.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26013.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26014.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26019.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26026.tsv \u2502\u00a0\u00a0 \u251c\u2500\u2500 26029.tsv \u2502\u00a0\u00a0 \u2514\u2500\u2500 26030.tsv \u251c\u2500\u2500 relations \u2502\u00a0\u00a0 \u251c\u2500\u2500 00000.tsv \u2502\u00a0\u00a0 \u2514\u2500\u2500 00001.tsv \u251c\u2500\u2500 sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 nodes_import_000.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 nodes_import_001.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 nodes_import_002.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 nodes_import_003.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 ways_import_000.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 ways_import_001.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 ways_import_002.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 ways_import_003.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 y_multipoly_aa.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 y_multipoly_ab.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 y_multipoly_ac.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 y_multipoly_ad.sql \u2502\u00a0\u00a0 \u2514\u2500\u2500 y_multipoly_ae.sql \u251c\u2500\u2500 static \u2502\u00a0\u00a0 \u251c\u2500\u2500 database_after_init.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 database_init.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 h3_poly.tsv.gz \u2502\u00a0\u00a0 \u251c\u2500\u2500 multipolygon.sql \u2502\u00a0\u00a0 \u251c\u2500\u2500 multipolygon_tables.sql \u2502\u00a0\u00a0 \u2514\u2500\u2500 osmium_export.json \u2514\u2500\u2500 ways     \u251c\u2500\u2500 16717.tsv     \u251c\u2500\u2500 16744.tsv     \u251c\u2500\u2500 16745.tsv     \u251c\u2500\u2500 16747.tsv     \u251c\u2500\u2500 16748.tsv     \u251c\u2500\u2500 16749.tsv     \u251c\u2500\u2500 25620.tsv     \u251c\u2500\u2500 25622.tsv     \u251c\u2500\u2500 25634.tsv     \u251c\u2500\u2500 25638.tsv     \u251c\u2500\u2500 25648.tsv     \u251c\u2500\u2500 25649.tsv     \u251c\u2500\u2500 25650.tsv     \u251c\u2500\u2500 25651.tsv     \u251c\u2500\u2500 25652.tsv     \u251c\u2500\u2500 25653.tsv     \u251c\u2500\u2500 25654.tsv     \u251c\u2500\u2500 25728.tsv     \u251c\u2500\u2500 25729.tsv     \u251c\u2500\u2500 25730.tsv     \u251c\u2500\u2500 25731.tsv     \u251c\u2500\u2500 25732.tsv     \u251c\u2500\u2500 25733.tsv     \u251c\u2500\u2500 25734.tsv     \u251c\u2500\u2500 25744.tsv     \u251c\u2500\u2500 25745.tsv     \u251c\u2500\u2500 25748.tsv     \u251c\u2500\u2500 25749.tsv     \u251c\u2500\u2500 25756.tsv     \u251c\u2500\u2500 25760.tsv     \u251c\u2500\u2500 25761.tsv     \u251c\u2500\u2500 25762.tsv     \u251c\u2500\u2500 25763.tsv     \u251c\u2500\u2500 25764.tsv     \u251c\u2500\u2500 25765.tsv     \u251c\u2500\u2500 25766.tsv     \u251c\u2500\u2500 25774.tsv     \u251c\u2500\u2500 25776.tsv     \u251c\u2500\u2500 25777.tsv     \u251c\u2500\u2500 25778.tsv     \u251c\u2500\u2500 25779.tsv     \u251c\u2500\u2500 25780.tsv     \u251c\u2500\u2500 25781.tsv     \u251c\u2500\u2500 25782.tsv     \u251c\u2500\u2500 25873.tsv     \u251c\u2500\u2500 25880.tsv     \u251c\u2500\u2500 25881.tsv     \u251c\u2500\u2500 25882.tsv     \u251c\u2500\u2500 25883.tsv     \u251c\u2500\u2500 25884.tsv     \u251c\u2500\u2500 25886.tsv     \u251c\u2500\u2500 25984.tsv     \u251c\u2500\u2500 25985.tsv     \u251c\u2500\u2500 25989.tsv     \u251c\u2500\u2500 25992.tsv     \u251c\u2500\u2500 25993.tsv     \u251c\u2500\u2500 25994.tsv     \u251c\u2500\u2500 25995.tsv     \u251c\u2500\u2500 25996.tsv     \u251c\u2500\u2500 25998.tsv     \u251c\u2500\u2500 26000.tsv     \u251c\u2500\u2500 26001.tsv     \u251c\u2500\u2500 26003.tsv     \u251c\u2500\u2500 26008.tsv     \u251c\u2500\u2500 26009.tsv     \u251c\u2500\u2500 26010.tsv     \u251c\u2500\u2500 26011.tsv     \u251c\u2500\u2500 26012.tsv     \u251c\u2500\u2500 26013.tsv     \u251c\u2500\u2500 26014.tsv     \u251c\u2500\u2500 26017.tsv     \u251c\u2500\u2500 26019.tsv     \u251c\u2500\u2500 26026.tsv     \u251c\u2500\u2500 26030.tsv     \u2514\u2500\u2500 32767.tsv  7 directories, 184 files<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>docker logs postgis14-thailand | tail -n 40 <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">initdb: warning: enabling \"trust\" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. 2023-01-29 10:22:09.841 UTC [1] LOG:  starting PostgreSQL 14.1 (Debian 14.1-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2023-01-29 10:22:09.841 UTC [1] LOG:  listening on IPv4 address \"0.0.0.0\", port 5432 2023-01-29 10:22:09.841 UTC [1] LOG:  listening on IPv6 address \"::\", port 5432 2023-01-29 10:22:09.847 UTC [1] LOG:  listening on Unix socket \"\/var\/run\/postgresql\/.s.PGSQL.5432\" 2023-01-29 10:22:09.855 UTC [163] LOG:  database system was shut down at 2023-01-29 10:22:08 UTC 2023-01-29 10:22:09.863 UTC [1] LOG:  database system is ready to accept connections Time: 16.011 ms ANALYZE Time: 49.590 ms CREATE TABLE Time: 1.509 ms COPY 1 Time: 1.110 ms ANALYZE Time: 1.167 ms CREATE TABLE Time: 1.284 ms COPY 566 Time: 2.092 ms ANALYZE Time: 1.880 ms CREATE TABLE Time: 1.210 ms COPY 17482 Time: 19.023 ms ANALYZE Time: 27.044 ms SELECT 80 Time: 8.333 ms ANALYZE Time: 1.533 ms SELECT 75 Time: 9.650 ms ANALYZE Time: 1.213 ms  2023-01-29 10:22:07.219 UTC [49] LOG:  received fast shutdown request waiting for server to shut down....2023-01-29 10:22:07.222 UTC [49] LOG:  aborting any active transactions 2023-01-29 10:22:07.223 UTC [49] LOG:  background worker \"logical replication launcher\" (PID 56) exited with exit code 1 2023-01-29 10:22:07.392 UTC [51] LOG:  shutting down ..2023-01-29 10:22:09.631 UTC [49] LOG:  database system is shut down  done server stopped  PostgreSQL init process complete; ready for start up.  docker exec -it postgis14-thailand psql -U postgres -d osmworld psql (14.1 (Debian 14.1-1.pgdg110+1)) Type \"help\" for help.  osmworld=# \\d                        List of relations  Schema |          Name          |       Type        |  Owner    --------+------------------------+-------------------+----------  public | geography_columns      | view              | postgres  public | geometry_columns       | view              | postgres  public | h3_3_bounds_complex    | table             | postgres  public | multipolygon           | partitioned table | postgres  public | multipolygon_000       | table             | postgres  public | multipolygon_001       | table             | postgres  public | multipolygon_002       | table             | postgres  public | multipolygon_003       | table             | postgres  public | multipolygon_004       | table             | postgres  public | multipolygon_005       | table             | postgres  public | multipolygon_006       | table             | postgres  public | multipolygon_007       | table             | postgres  public | multipolygon_008       | table             | postgres  public | multipolygon_009       | table             | postgres  public | multipolygon_010       | table             | postgres  public | multipolygon_32767     | table             | postgres  public | nodes                  | partitioned table | postgres  public | nodes_000              | table             | postgres  public | nodes_001              | table             | postgres  public | nodes_002              | table             | postgres  public | nodes_003              | table             | postgres  public | nodes_004              | table             | postgres  public | nodes_005              | table             | postgres  public | nodes_006              | table             | postgres  public | nodes_007              | table             | postgres  public | nodes_008              | table             | postgres  public | nodes_009              | table             | postgres  public | nodes_010              | table             | postgres  public | osm_file_block         | table             | postgres  public | osm_file_block_content | table             | postgres  public | osm_file_statistics    | table             | postgres  public | osm_stat_nodes_3_3     | table             | postgres  public | osm_stat_ways_3_3      | table             | postgres  public | relation_members       | table             | postgres  public | relations              | table             | postgres  public | spatial_ref_sys        | table             | postgres  public | ways                   | partitioned table | postgres  public | ways_000               | table             | postgres  public | ways_001               | table             | postgres  public | ways_002               | table             | postgres  public | ways_003               | table             | postgres  public | ways_004               | table             | postgres  public | ways_005               | table             | postgres  public | ways_006               | table             | postgres  public | ways_007               | table             | postgres  public | ways_008               | table             | postgres  public | ways_009               | table             | postgres  public | ways_010               | table             | postgres  public | ways_32767             | table             | postgres (49 rows)  osmworld=# explain select h3_3, count(*) from ways group by 1;                                         QUERY PLAN                                          -------------------------------------------------------------------------------------------  Gather  (cost=34456.99..97465.64 rows=76 width=10)    Workers Planned: 4    ->  Parallel Append  (cost=33456.99..96458.04 rows=19 width=10)          ->  HashAggregate  (cost=96457.88..96457.95 rows=7 width=10)                Group Key: ways_4.h3_3                ->  Seq Scan on ways_004 ways_4  (cost=0.00..90269.92 rows=1237592 width=2)          ->  HashAggregate  (cost=60359.46..60359.53 rows=7 width=10)                Group Key: ways_9.h3_3                ->  Seq Scan on ways_009 ways_9  (cost=0.00..56666.64 rows=738564 width=2)          ->  HashAggregate  (cost=39018.48..39018.54 rows=6 width=10)                Group Key: ways_7.h3_3                ->  Seq Scan on ways_007 ways_7  (cost=0.00..36567.32 rows=490232 width=2)          ->  HashAggregate  (cost=33456.99..33457.06 rows=7 width=10)                Group Key: ways_2.h3_3                ->  Seq Scan on ways_002 ways_2  (cost=0.00..31580.66 rows=375266 width=2)          ->  HashAggregate  (cost=30029.44..30029.53 rows=9 width=10)                Group Key: ways_5.h3_3                ->  Seq Scan on ways_005 ways_5  (cost=0.00..28346.96 rows=336496 width=2)          ->  HashAggregate  (cost=26775.62..26775.72 rows=10 width=10)                Group Key: ways.h3_3                ->  Seq Scan on ways_000 ways  (cost=0.00..25251.75 rows=304775 width=2)          ->  HashAggregate  (cost=19023.96..19024.03 rows=7 width=10)                Group Key: ways_1.h3_3                ->  Seq Scan on ways_001 ways_1  (cost=0.00..17901.97 rows=224397 width=2)          ->  HashAggregate  (cost=15682.35..15682.43 rows=8 width=10)                Group Key: ways_6.h3_3                ->  Seq Scan on ways_006 ways_6  (cost=0.00..14803.23 rows=175823 width=2)          ->  HashAggregate  (cost=13881.85..13881.90 rows=5 width=10)                Group Key: ways_3.h3_3                ->  Seq Scan on ways_003 ways_3  (cost=0.00..13173.90 rows=141590 width=2)          ->  HashAggregate  (cost=6970.89..6970.92 rows=3 width=10)                Group Key: ways_8.h3_3                ->  Seq Scan on ways_008 ways_8  (cost=0.00..6567.26 rows=80726 width=2)          ->  HashAggregate  (cost=2385.09..2385.10 rows=1 width=10)                Group Key: ways_11.h3_3                ->  Seq Scan on ways_32767 ways_11  (cost=0.00..2327.06 rows=11606 width=2)          ->  HashAggregate  (cost=37.55..37.59 rows=4 width=10)                Group Key: ways_10.h3_3                ->  Seq Scan on ways_010 ways_10  (cost=0.00..36.70 rows=170 width=2) (39 rows)  osmworld=# select h3_3, count(*) from ways group by 1 order by 2 desc limit 20;  h3_3  | count   -------+--------  25764 | 890643  26010 | 329973  25994 | 203645  25730 | 188810  25995 | 139373  26011 | 136930  25780 | 118165  25765 | 105996  26009 | 100196  25762 |  91177  26014 |  75555  26003 |  71479  26008 |  70353  25883 |  60808  25634 |  59705  25777 |  58151  16749 |  57887  25782 |  57509  25638 |  57296  25880 |  56838 (20 rows) <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0430\u0437\u044b \u0441\u00a0OSM \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a\u00a0\u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u044e\u0431\u044b\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c:<\/p>\n<pre><code class=\"bash\">docker start postgis14-planet-220704 psql -h 127.0.0.1 -p 5432 -U postgres -d osmworld<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0418 \u043b\u044e\u0431\u0443\u0435\u043c\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u0431\u0430\u0437\u044b \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430 (587 GB):<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>         Table          | Rows  |     Total Size     |     Table Size     |  Index(es) Size  |     TOAST Size      ------------------------+-------+--------------------+--------------------+------------------+--------------------  *** TOTAL ***          | ~1B   | 587 GB (100.00%)   | 501 GB (100.00%)   | 54 GB (100.00%)  | 32 GB (100.00%)                         |       |                    |                    |                  |   ways_051               | ~21M  | 12 GB (2.02%)      | 11 GB (2.14%)      | 1070 MB (1.94%)  | 73 MB (0.22%)  relation_members       | ~113M | 9523 MB (1.58%)    | 6136 MB (1.20%)    | 3386 MB (6.15%)  | 8192 bytes (0.00%)  ways_043               | ~14M  | 8102 MB (1.35%)    | 7334 MB (1.43%)    | 737 MB (1.34%)   | 31 MB (0.09%)  ways_052               | ~14M  | 8013 MB (1.33%)    | 7200 MB (1.40%)    | 729 MB (1.32%)   | 84 MB (0.26%)  ways_002               | ~17M  | 7923 MB (1.32%)    | 7013 MB (1.37%)    | 870 MB (1.58%)   | 40 MB (0.12%)  ways_001               | ~15M  | 7360 MB (1.22%)    | 6485 MB (1.26%)    | 788 MB (1.43%)   | 87 MB (0.26%)  ways_081               | ~14M  | 6963 MB (1.16%)    | 6127 MB (1.19%)    | 716 MB (1.30%)   | 120 MB (0.37%)  ways_004               | ~13M  | 6886 MB (1.15%)    | 6108 MB (1.19%)    | 691 MB (1.25%)   | 87 MB (0.27%)  ways_029               | ~11M  | 6824 MB (1.14%)    | 6197 MB (1.21%)    | 567 MB (1.03%)   | 60 MB (0.18%)  ways_047               | ~11M  | 6750 MB (1.12%)    | 6101 MB (1.19%)    | 577 MB (1.05%)   | 71 MB (0.22%)  ways_093               | ~13M  | 6522 MB (1.09%)    | 5749 MB (1.12%)    | 644 MB (1.17%)   | 128 MB (0.39%)  ways_095               | ~13M  | 6451 MB (1.07%)    | 5689 MB (1.11%)    | 671 MB (1.22%)   | 91 MB (0.28%)  ways_090               | ~12M  | 6405 MB (1.07%)    | 5708 MB (1.11%)    | 620 MB (1.13%)   | 77 MB (0.23%)  ways_003               | ~12M  | 6401 MB (1.07%)    | 5553 MB (1.08%)    | 641 MB (1.16%)   | 206 MB (0.63%)  multipolygon_32767     | ~187k | 6366 MB (1.06%)    | 338 MB (0.07%)     | 27 MB (0.05%)    | 6002 MB (18.32%)  ways_005               | ~12M  | 6317 MB (1.05%)    | 5590 MB (1.09%)    | 601 MB (1.09%)   | 126 MB (0.38%)  ways_092               | ~12M  | 6227 MB (1.04%)    | 5511 MB (1.07%)    | 610 MB (1.11%)   | 107 MB (0.33%)  ways_074               | ~11M  | 6208 MB (1.03%)    | 5507 MB (1.07%)    | 587 MB (1.07%)   | 114 MB (0.35%)  ways_091               | ~11M  | 6158 MB (1.02%)    | 5425 MB (1.06%)    | 578 MB (1.05%)   | 156 MB (0.47%)  ways_098               | ~12M  | 6154 MB (1.02%)    | 5421 MB (1.06%)    | 595 MB (1.08%)   | 138 MB (0.42%)  ways_089               | ~11M  | 6128 MB (1.02%)    | 5418 MB (1.06%)    | 576 MB (1.05%)   | 134 MB (0.41%)  ways_080               | ~11M  | 5973 MB (0.99%)    | 5206 MB (1.01%)    | 549 MB (1.00%)   | 217 MB (0.66%)  ways_097               | ~11M  | 5940 MB (0.99%)    | 5298 MB (1.03%)    | 547 MB (0.99%)   | 95 MB (0.29%)  ways_045               | ~11M  | 5877 MB (0.98%)    | 5261 MB (1.03%)    | 546 MB (0.99%)   | 70 MB (0.21%)  ways_053               | ~9M   | 5810 MB (0.97%)    | 5289 MB (1.03%)    | 487 MB (0.88%)   | 34 MB (0.10%)  ways_019               | ~10M  | 5794 MB (0.96%)    | 5124 MB (1.00%)    | 517 MB (0.94%)   | 153 MB (0.47%)  ways_006               | ~10M  | 5774 MB (0.96%)    | 5033 MB (0.98%)    | 510 MB (0.93%)   | 231 MB (0.70%)  ways_046               | ~10M  | 5702 MB (0.95%)    | 5094 MB (0.99%)    | 505 MB (0.92%)   | 103 MB (0.31%)  ways_042               | ~10M  | 5683 MB (0.95%)    | 5075 MB (0.99%)    | 496 MB (0.90%)   | 112 MB (0.34%)  ways_049               | ~9M   | 5663 MB (0.94%)    | 5118 MB (1.00%)    | 456 MB (0.83%)   | 89 MB (0.27%)  ways_037               | ~9M   | 5634 MB (0.94%)    | 5040 MB (0.98%)    | 447 MB (0.81%)   | 147 MB (0.45%)  ways_054               | ~9M   | 5627 MB (0.94%)    | 4856 MB (0.95%)    | 485 MB (0.88%)   | 286 MB (0.87%)  ways_017               | ~10M  | 5605 MB (0.93%)    | 4950 MB (0.97%)    | 507 MB (0.92%)   | 148 MB (0.45%)  ways_075               | ~9M   | 5587 MB (0.93%)    | 4940 MB (0.96%)    | 488 MB (0.89%)   | 159 MB (0.49%)  ways_026               | ~9M   | 5585 MB (0.93%)    | 5064 MB (0.99%)    | 482 MB (0.88%)   | 39 MB (0.12%)  ways_048               | ~9M   | 5584 MB (0.93%)    | 4985 MB (0.97%)    | 484 MB (0.88%)   | 114 MB (0.35%)  ways_082               | ~10M  | 5548 MB (0.92%)    | 4890 MB (0.95%)    | 500 MB (0.91%)   | 158 MB (0.48%)  ways_000               | ~9M   | 5460 MB (0.91%)    | 4750 MB (0.93%)    | 461 MB (0.84%)   | 248 MB (0.76%)  ways_094               | ~10M  | 5457 MB (0.91%)    | 4737 MB (0.92%)    | 493 MB (0.89%)   | 227 MB (0.69%)  ways_033               | ~8M   | 5454 MB (0.91%)    | 4808 MB (0.94%)    | 403 MB (0.73%)   | 243 MB (0.74%)  ways_087               | ~9M   | 5445 MB (0.91%)    | 4808 MB (0.94%)    | 463 MB (0.84%)   | 173 MB (0.53%)  ways_010               | ~9M   | 5357 MB (0.89%)    | 4774 MB (0.93%)    | 440 MB (0.80%)   | 143 MB (0.44%)  ways_040               | ~9M   | 5348 MB (0.89%)    | 4722 MB (0.92%)    | 467 MB (0.85%)   | 159 MB (0.48%)  ways_088               | ~9M   | 5262 MB (0.88%)    | 4662 MB (0.91%)    | 455 MB (0.83%)   | 145 MB (0.44%)  ways_060               | ~8M   | 5243 MB (0.87%)    | 4673 MB (0.91%)    | 420 MB (0.76%)   | 150 MB (0.46%)  ways_096               | ~10M  | 5207 MB (0.87%)    | 4613 MB (0.90%)    | 495 MB (0.90%)   | 99 MB (0.30%)  ways_024               | ~8M   | 5205 MB (0.87%)    | 4722 MB (0.92%)    | 431 MB (0.78%)   | 52 MB (0.16%)  ways_071               | ~9M   | 5198 MB (0.87%)    | 4625 MB (0.90%)    | 469 MB (0.85%)   | 104 MB (0.32%) :  <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0438\u0437\u00a0\u043c\u043e\u0438\u0445 <a href=\"https:\/\/habr.com\/ru\/post\/686860\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432<\/a> \u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0434\u0430\u043d\u0438\u0439 \u0448\u043a\u043e\u043b \u0432\u043e\u00a0\u0432\u0441\u0435\u043c \u043c\u0438\u0440\u0435 \u0441\u00a0\u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u00a0H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0443:<\/p>\n<pre><code class=\"sql\">docker start postgis14-planet-220704  psql -h 127.0.0.1 -p 5432 -U postgres -d osmworld  Password for user postgres:  ? ? postgres_dba 6.0 installed. Use \":dba\" to see menu Timing is on. psql (14.6 (Ubuntu 14.6-1.pgdg20.04+1), server 14.1 (Debian 14.1-1.pgdg110+1)) Type \"help\" for help.  osmworld=# \\timing on Timing is on. osmworld=# create table school      as select h3_3, count(*) as \"count\" from ways          where closed and (tags->'building' = 'school'           or (tags->'building' is not null and tags->'amenity'='school'))         group by h3_3 order by 2 desc; SELECT 6783 Time: 215154,128 ms (03:35,154)<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0447\u0442\u043e\u00a0\u0436\u0435 \u0437\u0430\u043d\u044f\u043b\u043e \u044d\u0442\u0438 03:35\u00a0\u043c\u0438\u043d\u0443\u0442\u044b \u0443\u00a0\u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a\u00a0\u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u00a0\u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u0445:<\/p>\n<pre><code class=\"sql\">explain create table school      as select h3_3, count(*) as \"count\" from ways          where closed and (tags->'building' = 'school'           or (tags->'building' is not null and tags->'amenity'='school'))         group by h3_3 order by 2 desc  QUERY PLAN                                                                                               -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Gather Merge  (cost=13217952.21..13219300.04 rows=11052 width=10)    Workers Planned: 6    ->  Sort  (cost=13216952.12..13216956.72 rows=1842 width=10)          Sort Key: (count(*)) DESC          ->  Parallel Append  (cost=1107174.96..13216852.21 rows=1842 width=10)                ->  GroupAggregate  (cost=1889369.47..1890603.83 rows=7 width=10)                      Group Key: ways_51.h3_3                      ->  Sort  (cost=1889369.47..1889780.90 rows=164572 width=2)                            Sort Key: ways_51.h3_3                            ->  Seq Scan on ways_051 ways_51  (cost=0.00..1873744.28 rows=164572 width=2)                                  Filter: (closed AND (((tags -> 'building'::text) = 'school'::text) OR (((tags -> 'building'::text) IS NOT NULL) AND ((tags -> 'amenity'::text) = 'school'::text))))                ->  HashAggregate  (cost=1278539.18..1278539.58 rows=40 width=10)                      Group Key: ways_2.h3_3                      ->  Seq Scan on ways_002 ways_2  (cost=0.00..1277795.15 rows=148806 width=2)                            Filter: (closed AND (((tags -> 'building'::text) = 'school'::text) OR (((tags -> 'building'::text) IS NOT NULL) AND ((tags -> 'amenity'::text) = 'school'::text))))                ->  GroupAggregate  (cost=1269524.73..1270332.33 rows=7 width=10)                      Group Key: ways_43.h3_3                      ->  Sort  (cost=1269524.73..1269793.90 rows=107671 width=2)                            Sort Key: ways_43.h3_3                            ->  Seq Scan on ways_043 ways_43  (cost=0.00..1260525.44 rows=107671 width=2)                                  Filter: (closed AND (((tags -> 'building'::text) = 'school'::text) OR (((tags -> 'building'::text) IS NOT NULL) AND ((tags -> 'amenity'::text) = 'school'::text))))                ->  GroupAggregate  (cost=1248285.94..1249040.42 rows=7 width=10)                      Group Key: ways_52.h3_3                      ->  Sort  (cost=1248285.94..1248537.41 rows=100588 width=2)                            Sort Key: ways_52.h3_3                            ->  Seq Scan on ways_052 ways_52  (cost=0.00..1239928.03 rows=100588 width=2)                                  Filter: (closed AND (((tags -> 'building'::text) = 'school'::text) OR (((tags -> 'building'::text) IS NOT NULL) AND ((tags -> 'amenity'::text) = 'school'::text))))  ...   JIT:    Functions: 806    Options: Inlining true, Optimization true, Expressions true, Deforming true (612 rows)<\/code><\/pre>\n<p>\u0418 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 QGIS:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b0d\/5e4\/c9c\/b0d5e4c9cb5e610fbed6b93dce76fa33.png\" width=\"1327\" height=\"887\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b0d\/5e4\/c9c\/b0d5e4c9cb5e610fbed6b93dce76fa33.png\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"sql\">select     h3_to_geo_boundary_geometry(h3_3::h3index),     count    from school        where count>100<\/code><\/pre>\n<p>PostgreSQL \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u041f\u041e \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043e\u043a\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0441\u0442\u0433\u0440\u0435\u0441 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e \u0438 \u0433\u0435\u043e\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432\u0435\u0437\u0434\u0435, \u043b\u0438\u0448\u044c \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u0438\u0440 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0433\u0435\u043e \u0434\u0430\u043d\u043d\u044b\u0445!<\/h2>\n<p>\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 OpenStreetMap \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430 \u043f\u043b\u0430\u043d\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0430\u0437\u044b \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043c\u043e\u0449\u043d\u044b\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043c\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 OSM \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0433\u0435\u043e\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043b\u044e\u0434\u0435\u0439 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u044d\u0442\u043e\u043c\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0438\u0440\u0430 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u043c\u0438\u0440 \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0430\u0441. <\/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\/post\/714326\/\"> https:\/\/habr.com\/ru\/post\/714326\/<\/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<p>\u041a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0440\u0430\u043d\u044c\u0448\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0447\u0442\u043e\u00a0\u043e\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u043c\u0438\u0440, \u0442\u043e \u0435\u0433\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0438 \u0432\u00a0\u0441\u043e\u0441\u0435\u0434\u043d\u044e\u044e \u043f\u0430\u043b\u0430\u0442\u0443 \u0441\u00a0\u0411\u043e\u043d\u0430\u043f\u0430\u0440\u0442\u043e\u043c \u041d\u0430\u043f\u043e\u043b\u0435\u043e\u043d\u043e\u043c. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e\u00a0\u044d\u0442\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u00a0\u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0438 \u043a\u0430\u0436\u0434\u044b\u0439\u00a0\u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0435\u0439 \u0417\u0435\u043c\u043b\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430\u00a0\u0441\u0432\u043e\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0437\u0430\u00a0\u043c\u0438\u043d\u0443\u0442\u044b \u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u042f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b <a href=\"https:\/\/github.com\/igor-suhorukov\/openstreetmap_h3\" rel=\"noopener noreferrer nofollow\">Openstreetmap_h3<\/a>\u00a0\u2014 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0433\u0435\u043e\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u043d\u0430\u0434 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0OpenStreetMap \u0432\u00a0PostGIS \u0438\u043b\u0438\u00a0\u0432\u00a0\u0434\u0432\u0438\u0436\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u00a0Apache Arrow\/Parquet.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u043f\u0440\u0438\u0432\u0435\u0442 \u0445\u0435\u0439\u0442\u0435\u0440\u0430\u043c \u0438 \u0441\u043a\u0435\u043f\u0442\u0438\u043a\u0430\u043c. \u0422\u043e \u0447\u0442\u043e\u00a0\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u00a0\u2014 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0438 \u0434\u0430\u0442\u0430\u0441\u0430\u0435\u043d\u0441 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u0431\u0435\u0437\u00a0\u0431\u0438\u0433\u0434\u0430\u0442, GPGPU, FPGA. \u0422\u043e \u0447\u0442\u043e\u00a0\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438 \u0432\u00a0\u043a\u043e\u0434\u0435\u00a0\u2014 \u044d\u0442\u043e \u043c\u043e\u0439\u00a0\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u0438 \u043e\u0442\u043f\u0443\u0441\u043a\u0430, \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435, \u0431\u0435\u0441\u0441\u043e\u043d\u043d\u044b\u0435 \u043d\u043e\u0447\u0438 \u0438 \u0443\u0439\u043c\u0443\u00a0\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 3\u00a0\u0433\u043e\u0434\u0430. \u041c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0438 \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438 \u043f\u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0445\u043e\u0434\u0438\u043b, \u043d\u043e\u00a0\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0432\u0441\u0435\u00a0\u0436\u0435 \u043e\u043f\u0438\u0448\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0441\u0442 \u043d\u0435\u00a0\u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430\u00a0\u043c\u043e\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044e, \u043d\u0430\u0447\u043d\u0443 \u0441\u00a0\u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430. \u041f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043d\u0430\u00a0\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044f\u0445 \u0438 \u0432\u00a0\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445, \u0430\u00a0\u0442\u0435\u043c\u0430 \u0445\u043e\u0442\u044c \u0438 \u043d\u0438\u0448\u0435\u0432\u0430\u044f, \u043d\u043e\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u00a0\u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0OSM. \u0414\u043b\u044f\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u0435\u00a0\u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0441\u00a0OSM \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u0438 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u043e\u043a\u0430 \u044f \u043d\u0435\u00a0\u0431\u0443\u0434\u0443 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u00a0\u044d\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u044b. \u041e\u0442\u043c\u0435\u0447\u0443\u00a0\u043b\u0438\u0448\u044c, \u0447\u0442\u043e\u00a0\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430\u00a0\u0435\u0433\u043e \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u0441\u0430\u043c OpenStreetMap \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u0434 \u043e\u0442\u00a0\u0433\u043e\u0434\u0430. \u0412\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u0445 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 OSM \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c \u0443\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a\u0430\u044f \u043e\u043d\u0430 \u0435\u0441\u0442\u044c\u00a0\u2014 \u0433\u0438\u0431\u043a\u0430\u044f \u0438 \u043d\u0435\u00a0\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u00a0\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044e\u0449\u0430\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u00a0\u0441\u0447\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0435, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 opensource \u0411\u0414 \u0441\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0442\u0430\u043a\u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b, \u043d\u043e\u00a0\u0432\u0441\u0435\u00a0\u0436\u0435 PostgreSQL+PostGIS \u043d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0441\u0430\u043c\u044b\u043c\u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0443 \u0438 \u0432\u0438\u0448\u0435\u043d\u043a\u043e\u0439 \u043d\u0430\u00a0\u0442\u043e\u0440\u0442\u0435: \u044d\u0442\u0430\u00a0\u0436\u0435 \u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0Postgresql \u0432\u0441\u0435\u0433\u043e\u00a0\u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u00a0\u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 <a href=\"https:\/\/github.com\/citusdata\/citus\" rel=\"noopener noreferrer nofollow\">CitusDB<\/a> \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u043e\u0433\u043e\u00a0\u0436\u0435 PostgreSQL.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0447\u0435\u043c \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043c\u043f \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u0432\u00a0PostgreSQL \u0431\u0430\u0437\u0443\u00a0\u0431\u044b\u043b\u0438 \u0434\u043e\u043b\u0433\u0438\u0435 \u0438 \u043c\u0443\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435&#8230; \u0423\u0442\u0438\u043b\u0438\u0442\u0430 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/RU:Osmosis\" rel=\"noopener noreferrer nofollow\">Osmosis<\/a>  \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430\u00a0java, \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u0433\u0430\u0442\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u00a0\u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 OSM \u0438 \u0432\u00a0\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostgreSQL \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <a href=\"https:\/\/github.com\/openstreetmap\/osmosis\/tree\/main\/package\/script\" rel=\"noopener noreferrer nofollow\">pgSnapshot<\/a> \u0434\u043b\u044f\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u00a0\u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0PBF \u0432\u00a0tsv \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f\u00a0\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u00a0\u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b \u0411\u0414. \u0421\u0445\u0435\u043c\u0430 pgSnapshot lossless, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u0435\u0437\u00a0\u043f\u043e\u0442\u0435\u0440\u044c, \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0438\u0442\u043f. \u041d\u043e\u00a0\u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441\u00a0\u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b nodes, ways \u043d\u0430\u00a0\u0441\u043e\u0442\u043d\u0438 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, \u0447\u0442\u043e\u00a0\u043d\u0435\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0434\u043e\u043b\u0433\u043e\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0445 \u043f\u043e\u00a0\u043e\u0431\u044a\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 full scan \u043f\u043e\u00a0\u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. Osm2pgsql, Imposm \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostGIS, \u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u00a0\u043c\u044d\u043f\u043f\u0438\u043d\u0433\u0443 \u0441\u00a0\u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435\u00a0\u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f\u00a0\u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0440\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f\u00a0\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. Osmium export \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u044b\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0447\u0435\u043c Osmosis, \u043d\u043e\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b PostGIS \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u0435\u0435 \u043f\u043e\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0447\u0435\u043c \u0432\u00a0Osmosis.<\/p>\n<h2>\u041a\u043e\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u043b\u043e\u0448\u0430\u0434\u043a\u0430 \u043d\u0435 \u0443\u0442\u044f\u043d\u0435\u0442, \u043f\u043e\u0440\u0430 \u0437\u0430\u043f\u0440\u044f\u0433\u0430\u0442\u044c \u0441\u043b\u043e\u043d\u0430 (PostgreSQL+PostGIS)<\/h2>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c\u00a0\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostgreSQL \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u043e\u043c \u043a\u00a0pgSnapshot, \u0441\u00a0\u0431\u044b\u0441\u0442\u0440\u044b\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u00a0PBF \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u00a0\u0411\u0414.\u00a0\u0411\u044b\u043b\u043e\u00a0\u0431\u044b \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435\u00a0\u0431\u044b\u043b\u0438 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438\u00a0\u0431\u044b\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u0434\u0440\u0443\u0433 \u043a\u00a0\u0434\u0440\u0443\u0433\u0443 \u0438 \u0441\u0435\u0442\u043a\u0430 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u00a0\u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u00a0\u0440\u0430\u0434\u0438\u0443\u0441\u0443, \u043a\u0430\u043a\u00a0\u0443\u00a0\u044d\u043a\u0432\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u0438 \u0443\u00a0\u043f\u043e\u043b\u044e\u0441\u043e\u0432 \u043f\u043b\u0430\u043d\u0435\u0442\u044b. \u0418\u0437\u00a0\u0441\u0438\u0441\u0442\u0435\u043c \u0433\u0435\u043e\u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b\u00a0\u2014 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u00a0\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c\/\u0441\u0442\u0440\u0430\u043d\u0430\u043c, \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u043a\u043e\u0439, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b S2\u00a0\u0438 H3. \u0418 \u0432\u044b\u0431\u043e\u0440\u00a0\u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0432\u00a0\u043f\u043e\u043b\u044c\u0437\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a\u00a0\u044d\u0442\u0430 <a href=\"https:\/\/h3geo.org\" rel=\"noopener noreferrer nofollow\">\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f H3<\/a> \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0432\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0430\u0434\u0438\u0443\u0441 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u0432\u00a0\u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0437\u0435\u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430), \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f\u00a0\u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0H3\u00a0\u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f\u00a0PostgreSQL\/JVM.<\/p>\n<p>\u0412\u00a0\u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u00a0Java \u0438 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0445\u0435\u043c\u0443 \u0411\u0414 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0441\u00a0pgSnapshot, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0423\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u0445\u0435\u043c\u044b \u0411\u0414, \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u00a0PBF \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0432\u00a0\u0411\u0414 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>\u042d\u0442\u043e\u00a0\u0431\u044b\u043b \u043f\u0443\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0441\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Osmosis \u0438 osm\u2011parquetizer. \u0421\u043e\u0431\u0438\u0440\u0430\u043b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u0435\u043a\u00a0\u043b\u0438\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f memory mapped \u0444\u0430\u0439\u043b \u043d\u0430\u00a0\u0441\u043e\u0442\u043d\u044e \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 \u0432\u00a0Java \u043a\u043e\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b add\u2011locations\u2011to\u2011ways \u0438\u0437\u00a0osmium\u00a0\u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e\u00a0\u0436\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041a\u00a0\u0442\u043e\u043c\u0443\u00a0\u0436\u0435 osmium \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u043b\u0438\u0433\u043e\u043d\u044b, \u0447\u0442\u043e\u00a0\u0433\u043e\u0440\u0430\u0437\u0434\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435 \u0447\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 \u0411\u0414, \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0435\u0449\u0451 \u0442\u044f\u043d\u0435\u0442 \u0432 \u0431\u0438\u0433\u0434\u0430\u0442\u0443 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c Apache Arrow<\/h2>\n<p>\u0423\u00a0\u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u00a0H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0PostgreSQL \u0438 \u0432\u0441\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u043e\u00a0\u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u0442\u0438\u00a0\u0436\u0435 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0Apache Spark \u0438\u043b\u0438\u00a0Hadoop \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c\u00a0\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0PBF \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 Arrow\/Parquet \u0431\u0435\u0437\u00a0\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e PostgreSQL. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u0432\u043e\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043e\u043f\u044b\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 <a href=\"https:\/\/github.com\/adrianulbona\/osm-parquetizer\" rel=\"noopener noreferrer nofollow\">osm\u2011parquetizer<\/a>, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u00a0\u0441\u0432\u043e\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 Apache Arrow \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f Parquet \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u00a0H3\u00a0\u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043d\u0443\u0436\u0435\u043d \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433 \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043f\u043e\u043a\u0430 \u0447\u0442\u043e\u00a0\u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c python \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430). \u0418\u0437\u00a0\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u043c\u043e\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043f\u0435\u0440\u0435\u0434 osm\u2011parquetizer\u00a0\u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c \u0432\u00a0\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 PBF \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0431\u043e\u0440\u043a\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0434\u043b\u044f\u00a0\u043b\u0438\u043d\u0438\u0439 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0433\u0435\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0430 H3\u00a0\u0434\u043b\u044f\u00a0nodes, ways. \u041e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u043b\u044f\u00a0\u0433\u0435\u043e\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u00a0parquet\u00a0\u2014 \u044d\u0442\u043e \u043a\u0430\u043a\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u00a0\u043b\u0438\u043d\u0438\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u00a0\u0430\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0438\u0445 \u043a\u0430\u043a\u00a0\u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u043e\u0447\u0435\u043a, \u044f\u00a0\u0436\u0435 \u043f\u043e\u043a\u0430 \u0440\u0435\u0448\u0438\u043b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00a0\u043b\u0438\u043d\u0438\u0438 \u0432\u00a0WKB \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<h3>Openstreetmap_h3 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Java<\/h3>\n<p>\u041a\u0430\u043a\u00a0\u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u0432\u044b\u0448\u0435, \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u043e\u0437\u043d\u0438\u043a \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u043e \u0438\u0437\u00a0Osmosis \u0438 osm\u2011parquetizer \u0438\u00a0\u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d \u00ab\u0441 \u043d\u0443\u043b\u044f\u00bb \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u0433\u0440\u0430\u0431\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u0440\u0430\u043b \u0432\u00a0\u044d\u0442\u0438\u0445 Java \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u00a0maven, \u0430\u00a0\u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a\u00a0\u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package com.github.isuhorukov.osm.pgsnapshot;  import com.beust.jcommander.JCommander; import com.github.isuhorukov.osm.pgsnapshot.model.*; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.BlockStat; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.MultipolygonTime; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.PbfStatistics; import com.github.isuhorukov.osm.pgsnapshot.model.statistics.Stat; import com.github.isuhorukov.osm.pgsnapshot.model.table.StatType; import com.github.isuhorukov.osm.pgsnapshot.model.table.TableStat; import com.github.isuhorukov.osm.pgsnapshot.util.CompactH3; import com.github.isuhorukov.osm.pgsnapshot.util.PartitionSplitter; import com.google.common.util.concurrent.MoreExecutors; import com.uber.h3core.H3Core; import com.uber.h3core.util.LatLng; import net.postgis.jdbc.geometry.LineString; import net.postgis.jdbc.geometry.LinearRing; import net.postgis.jdbc.geometry.Point; import net.postgis.jdbc.geometry.Polygon; import net.postgis.jdbc.geometry.binary.BinaryWriter; import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.*; import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.complex.impl.UnionListWriter; import org.apache.arrow.vector.complex.impl.UnionMapWriter; import org.apache.arrow.vector.ipc.ArrowFileWriter; import org.apache.arrow.vector.types.FloatingPointPrecision; import org.apache.arrow.vector.types.pojo.ArrowType; import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.FieldType; import org.apache.arrow.vector.types.pojo.Schema; import org.apache.commons.io.IOUtils; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.h2gis.functions.spatial.properties.ST_IsClosed; import org.locationtech.jts.algorithm.MinimumBoundingCircle; import org.locationtech.jts.geom.*; import org.locationtech.jts.io.WKBWriter; import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.TransformException; import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer; import org.openstreetmap.osmosis.core.container.v0_6.NodeContainer; import org.openstreetmap.osmosis.core.container.v0_6.RelationContainer; import org.openstreetmap.osmosis.core.container.v0_6.WayContainer; import org.openstreetmap.osmosis.core.domain.v0_6.Entity; import org.openstreetmap.osmosis.core.domain.v0_6.RelationMember; import org.openstreetmap.osmosis.core.domain.v0_6.Tag; import org.openstreetmap.osmosis.core.domain.v0_6.WayNode; import org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfBlobDecoder; import org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfBlobDecoderListener; import org.openstreetmap.osmosis.pbf2.v0_6.impl.RawBlob; import org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.MemberTypeValueMapper;  import java.io.*; import java.nio.charset.StandardCharsets; import java.util.*; import<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-344872","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344872","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=344872"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344872\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}