{"id":167517,"date":"2013-02-21T10:21:03","date_gmt":"2013-02-21T06:21:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=167517"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=167517","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u0431\u043e\u0440 WKB \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0431\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1d2\/ddd\/79b\/1d2ddd79b912f902060706cee1ea0f83.png\" align=\"left\"\/>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <nobr><a href=\"http:\/\/maps.mail.ru\">\u041a\u0430\u0440\u0442\u044b Mail.ru<\/a><\/nobr> \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Well-known_text\">WKB<\/a>. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"http:\/\/en.wikipedia.org\/wiki\/GDAL\">GDAL<\/a>, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u0435\u043d\u0438\u0435, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u044b\u043b\u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0438. \u0422\u0430\u043a \u0438 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u044d\u0442\u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434.<br \/>  \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\u0442\u043e\u0447\u043a\u0430<\/li>\n<li>\u043b\u0438\u043d\u0438\u044f<\/li>\n<li>\u043f\u043e\u043b\u0438\u0433\u043e\u043d<\/li>\n<li>\u043c\u0443\u043b\u044c\u0442\u0438\u043b\u0438\u043d\u0438\u044f<\/li>\n<li>\u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u043b\u0438\u0433\u043e\u043d<\/li>\n<\/ul>\n<p>  \u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0439\u0442 \u0432 \u0441\u043b\u043e\u0432\u0435. \u0410 \u0442\u0430\u043a \u2014 \u0431\u0435\u0440\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0441\u044f. <br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441-\u0432\u0440\u0430\u043f\u043f\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u0430\u043a STL-like \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440; \u0442\u0443\u0442 \u0434\u0430\u0436\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c <a href=\"https:\/\/github.com\/darkserj\/container\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u0418 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432: \u0442\u043e\u0447\u043a\u0438 \u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">namespace ml { \tstruct point_d { \t\tdouble x; \t\tdouble y; \t};  \tinline std::ostream & operator &lt;&lt; (std::ostream &s, point_d const &p) { \t\treturn s &lt;&lt; p.x &lt;&lt; &quot;, &quot; &lt;&lt; p.y; \t}  \tinline double distance(point_d const &p1, point_d const &p2) { \t\tdouble dx = (p1.x-p2.x); \t\tdouble dy = (p1.y-p2.y); \t\treturn sqrt(dx*dx+dy*dy); \t}  \tstruct rect_d { \t\tpoint_d min; \t\tpoint_d max;  \t\tstatic rect_d void_rect() { \t\t\treturn rect_d(std::numeric_limits&lt;T&gt;::max(),std::numeric_limits&lt;T&gt;::max(), \t\t\t\t\t\t\t -std::numeric_limits&lt;T&gt;::max(),-std::numeric_limits&lt;T&gt;::max()); \t\t}  \t\tbool empty() const { \t\t\treturn (*this == rect_d::void_rect() || (width()==0 && height()==0)); \t\t}  \t\tinline double height() const { \t\t\treturn fabs(max.y-min.y); \t\t} \t\t \t\tinline double width() const { \t\t\treturn fabs(max.x-min.x); \t\t} \t\trect_d & extend(const rect_d &r) { \t\t\tif(r.empty()) \t\t\t\treturn *this; \t\t\tmin.x = std::min(min.x,std::min(r.min.x,r.max.x)); \t\t\tmin.y = std::min(min.y,std::min(r.min.y,r.max.y)); \t\t\t \t\t\tmax.x = std::max(max.x,std::max(r.min.x,r.max.x)); \t\t\tmax.y = std::max(max.y,std::max(r.min.y,r.max.y)); \t\t\treturn *this; \t\t}  \t\ttemplate&lt; typename C &gt; \t\trect_d & bounds( C begin, C end) { \t\t\tfor(; begin != end; ++begin) { \t\t\t\tmin.x = std::min(min.x,begin-&gt;x); \t\t\t\tmin.y = std::min(min.y,begin-&gt;y); \t\t\t\tmax.x = std::max(max.x,begin-&gt;x); \t\t\t\tmax.y = std::max(max.y,begin-&gt;y); \t\t\t} \t\t\treturn *this; \t\t} \t};  \tinline std::ostream & operator &lt;&lt; (std::ostream &s,const rect_d &r) { \t\treturn s &lt;&lt; '[' &lt;&lt; r.min &lt;&lt; ',' &lt;&lt; r.max &lt;&lt; ']'; \t}  } \/\/ namespace ml <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 WKB \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. \u041a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u043f\u0443\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<br \/>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">char *data = .... ml::wkb shape(data); std::cout &lt;&lt; ml::wkb::type_to_text(shape.type()) &lt;&lt; std::endl; std::cout &lt;&lt; shape.bounds() &lt;&lt; std::endl; <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0432 \u043b\u043e\u0431, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">namespace ml { \t \tclass wkb { \t\tchar const * m_data; \t\t \tpublic: \t\tenum type_e{ \t\t\twkb_point = 1, \t\t\twkb_line_string = 2, \t\t\twkb_polygon = 3, \t\t\twkb_multi_point = 4, \t\t\twkb_multi_line_string = 5, \t\t\twkb_multi_polygon = 6, \t\t\twkb_geometry_collection = 7 \t\t}; \t\t \t\tstatic char const *type_to_text(type_e type) { \t\t\tswitch (type) { \t\t\t\tcase wkb_point: return &quot;wkb_point&quot;; \t\t\t\tcase wkb_line_string: return &quot;wkb_line_string&quot;; \t\t\t\tcase wkb_polygon: return &quot;wkb_polygon&quot;; \t\t\t\tcase wkb_multi_point: return &quot;wkb_multi_point&quot;; \t\t\t\tcase wkb_multi_line_string: return &quot;wkb_multi_line_string&quot;; \t\t\t\tcase wkb_multi_polygon: return &quot;wkb_multi_polygon&quot;; \t\t\t\tcase wkb_geometry_collection: return &quot;wkb_geometry_collection&quot;; \t\t\t\tdefault: return &quot;unknown&quot;; \t\t\t} \t\t} \t\t \t\ttypedef container&lt;ml::point_d&gt; line; \t\t \t\twkb(char const *data) : m_data(data) {} \t\t \t\twkb & operator = (wkb const &d) { m_data = d.m_data; return *this; } \t\t \t\tinline char byte_order() const { return m_data[0]; } \t\t \t\tinline type_e type() const { return (type_e)*(int*)&m_data[1]; } \t\tinline int size() const { return *(int*)&m_data[5]; } \t\t \t\tline linestring() const { \t\t\treturn line((line::value_type*)&m_data[9], size()); \t\t} \t\t \t\tml::point_d const & point() const { \t\t\treturn *(ml::point_d*)&m_data[5]; \t\t} \t\t \t\twkb linestring(size_t index) const { \t\t\tsize_t offset = 9; \t\t\tfor(size_t i=0; i&lt;size(); ++i) { \t\t\t\twkb l(&m_data[offset]); \t\t\t\tif (i == index) \t\t\t\t\treturn l; \t\t\t\toffset += 9 + 16 * l.size(); \t\t\t}\t\t\t \t\t\treturn wkb(0); \t\t} \t\t \t\tline ring(size_t index) const { \t\t\tsize_t offset = 9; \t\t\tfor(size_t i=0; i&lt;size(); ++i) { \t\t\t\tint point_count = *(int*)&m_data[offset]; \t\t\t\tif(i == index) \t\t\t\t\treturn line((line::value_type*)&m_data[offset+4], point_count); \t\t\t\toffset = offset + 4 + 16*point_count; \t\t\t} \t\t\treturn line(NULL,(size_t)0); \t\t} \t\t \t\twkb polygon(size_t index) const { \t\t\tsize_t offset = 9; \t\t\tfor(size_t i=0; i&lt;this-&gt;size(); ++i) { \t\t\t\twkb o(&m_data[offset]); \t\t\t\t \t\t\t\tif(i == index) \t\t\t\t\treturn o; \t\t\t\t \t\t\t\tfor(size_t j=0; j&lt;o.size(); ++j) \t\t\t\t\toffset += o.ring(j).size() * 16 + 4; \t\t\t\toffset += 9; \t\t\t} \t\t\treturn wkb(0); \t\t} \t\t \t\tml::rect_d bounds() const { \t\t\tml::rect_d r(ml::rect_d::void_rect()); \t\t\tswitch (type()) { \t\t\t\tcase wkb_polygon: { \t\t\t\t\tfor(size_t i=0; i &lt; size(); ++i) { \t\t\t\t\t\tline l = ring(i); \t\t\t\t\t\tr.bounds(l.begin(),l.end()); \t\t\t\t\t} \t\t\t\t} break; \t\t\t\tcase wkb_multi_polygon: { \t\t\t\t\tfor(size_t i=0; i &lt; size(); ++i) { \t\t\t\t\t\tr.extend(polygon(i).bounds()); \t\t\t\t\t} \t\t\t\t} break; \t\t\t\tcase wkb_point: { \t\t\t\t\tr.min.x = r.max.x = *(double*)&m_data[5]; \t\t\t\t\tr.min.y = r.max.y = *(double*)&m_data[13]; \t\t\t\t} break; \t\t\t\tcase wkb_line_string: { \t\t\t\t\tline l = linestring(); \t\t\t\t\tr.bounds(l.begin(),l.end()); \t\t\t\t} break; \t\t\t\tcase wkb_multi_line_string: { \t\t\t\t\tfor(size_t i=0; i &lt; size(); ++i) { \t\t\t\t\t\tr.extend(linestring(i).bounds()); \t\t\t\t\t} \t\t\t\t} break; \t\t\t\tdefault: \t\t\t\t\tbreak; \t\t\t} \t\t\treturn r; \t\t} \t\t \t}; } \/\/ namespace ml <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438 \u0434\u0430\u0432\u0430\u043b\u043e \u0432\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043d\u043e (\u043a\u0443\u0434\u0430 \u0436\u0435 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u00ab\u043d\u043e\u00bb) \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u043e.<\/p>\n<p>  \u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 WKB. \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0435\u043a\u0435 \u0438 \u0431\u044b\u043b\u0430 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043f\u0443\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043d\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f. \u041f\u043e\u0447\u0435\u0441\u0430\u0432 \u0432 \u0437\u0430\u0442\u044b\u043b\u043a\u0435, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0433\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434 \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0439 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442 \u043b\u0438\u0448\u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u043e\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">\t\tinline const char * end_of_ring(const char *ptr) const { \t\t\treturn ptr + 4 + (*(unsigned int *)(ptr) * 16); \t\t} \t\t \t\tinline const char * end_of_polygon(const char *ptr) const { \t\t\tfor (size_t sz = *(unsigned int*)((ptr+=9)-4);sz--;) \t\t\t\tptr += (*(unsigned int *)(ptr) * 16) + 4; \t\t\treturn ptr; \t\t} <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u043d\u0438 \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0449\u0435 \u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0435\u0435: <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\t\tline linestring() const { \t\t\treturn line((line::value_type*)(m_data+9), size()); \t\t} \t\t \t\tml::point_d const & point() const { \t\t\treturn *(ml::point_d*)(m_data+5); \t\t} \t\t \t\twkb linestring(size_t index) const { \t\t\tassert(index&gt;=0 && index&lt;m_size); \t\t\tconst char *ptr = m_data+9; \t\t\twhile (index--) { \t\t\t\tptr += 9 + (*(unsigned int*)(ptr+5) * 16); \t\t\t} \t\t\treturn wkb(ptr); \t\t} \t\t \t\twkb polygon(size_t index) const { \t\t\tassert(index&gt;=0 && index&lt;m_size); \t\t\tconst char *ptr = m_data+9; \t\t\twhile (index--) { \t\t\t\tptr = end_of_polygon(ptr); \t\t\t} \t\t\treturn wkb(ptr); \t\t}  \t\tline ring(size_t index) const { \t\t\tassert(index&gt;=0 && index&lt;m_size); \t\t\tconst char *ptr = m_data+9; \t\t\twhile (index--) { \t\t\t\tptr = end_of_ring(ptr); \t\t\t} \t\t\treturn line((line::value_type*)(ptr+4),(line::value_type*)end_of_ring(ptr)); \t\t} <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0423\u0436\u0435 \u044d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u0447\u0435\u043a, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0435\u0449\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434: <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">template&lt; typename T &gt; \t\tT & apply( T & func) const { \t\t\tswitch (type()) { \t\t\t\tcase wkb_polygon: { \t\t\t\t\tconst char * ptr = m_data+9; \t\t\t\t\tfor(size_t i=0; i&lt;m_size; ++i) { \t\t\t\t\t\tml::point_d *begin = (ml::point_d*)(ptr+4); \t\t\t\t\t\tml::point_d *end = begin + *(unsigned int *)(ptr); \t\t\t\t\t\tptr = (const char *)end; \t\t\t\t\t\tfunc(begin,end); \t\t\t\t\t} \t\t\t\t} break; \t\t\t\tcase wkb_multi_polygon: { \t\t\t\t\tconst char * ptr = m_data+9; \t\t\t\t\tfor(size_t i=0; i&lt;m_size; ++i) { \t\t\t\t\t\tfor (size_t sz = *(unsigned int*)((ptr+=9)-4);sz--;) { \t\t\t\t\t\t\tml::point_d *begin = (ml::point_d*)(ptr+4); \t\t\t\t\t\t\tml::point_d *end = begin + *(unsigned int *)(ptr); \t\t\t\t\t\t\tptr = (const char *)end; \t\t\t\t\t\t\tfunc(begin,end); \t\t\t\t\t\t} \t\t\t\t\t} \t\t\t\t} break; \t\t\t\tcase wkb_point: { \t\t\t\t\tml::point_d *begin = (ml::point_d*)(m_data+5); \t\t\t\t\tml::point_d *end = begin + 1; \t\t\t\t\tfunc(begin,end); \t\t\t\t} break; \t\t\t\tcase wkb_line_string: { \t\t\t\t\tml::point_d *begin = (ml::point_d*)(m_data+9); \t\t\t\t\tml::point_d *end = begin + size(); \t\t\t\t\tfunc(begin,end); \t\t\t\t} break; \t\t\t\tcase wkb_multi_line_string: { \t\t\t\t\tconst char * ptr = m_data+9; \t\t\t\t\tfor(size_t i=0; i&lt;m_size; ++i) { \t\t\t\t\t\tml::point_d *begin = (ml::point_d*)(ptr+9); \t\t\t\t\t\tml::point_d *end = begin + *(unsigned int *)(ptr+5); \t\t\t\t\t\tptr = (const char *)end; \t\t\t\t\t\tfunc(begin,end); \t\t\t\t\t} \t\t\t\t} break; \t\t\t\tdefault: \t\t\t\t\tbreak; \t\t\t} \t\t\treturn func; \t\t} <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u043c\u044b \u0434\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">\tstruct bounds_counter { \t\tml::rect_d r; \t\tbounds_counter() : r(ml::rect_d::void_rect()) {} \t\tvoid operator()(ml::point_d const *begin, ml::point_d const *end) { \t\t\tr.bounds(begin,end); \t\t} \t\tml::rect_d const & bounds() const { \t\t\treturn r; \t\t} \t}; <\/code><\/pre>\n<p>  \u043c\u0435\u0442\u043e\u0434 bounds \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a: <\/p>\n<pre><code class=\"cpp\">ml::rect_d ml::wkb::bounds() const { \tstruct bounds_counter { \t\tml::rect_d r; \t\tbounds_counter() : r(ml::rect_d::void_rect()) {} \t\tvoid operator()(ml::point_d const *begin, ml::point_d const *end) { \t\t\tr.bounds(begin,end); \t\t} \t\tml::rect_d const & bounds() const { \t\t\treturn r; \t\t} \t}; \tbounds_counter b; \treturn apply(b).bounds(); } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f g++, \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0436\u0435\u0441\u0442\u043a\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c:<\/p>\n<blockquote><p>14.3.1\/2: A local type, a type with no linkage, an unnamed type or a type compounded from any of these types shall not be used as a template-argument for a template type-parameter.  <\/p><\/blockquote>\n<p>\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0432 clang \u0438, \u0441\u0443\u0434\u044f \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0432 MSVC++ (\u0447\u0435\u0441\u0442\u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438). <i>\u0414\u043b\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0442\u043e\u0440\u0430 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.<\/i><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">std::string ml::wkb::to_geo_json() const { \tstruct point_formatter { \t\tstd::stringstream &ss; \t\tunsigned int counter; \t\tbool parts; \t\tpoint_formatter(std::stringstream &s) : ss(s),counter(0), parts(false) {} \t\tvoid operator() (ml::point_d const *begin, ml::point_d const *end) { \t\t\tif (parts) ss &lt;&lt; (counter ? &quot;,[&quot; : &quot;[&quot;); \t\t\tss &lt;&lt; &quot;[&quot; &lt;&lt; begin-&gt;x &lt;&lt; &quot;,&quot; &lt;&lt; begin-&gt;y &lt;&lt; &quot;]&quot;; \t\t\tfor(++begin;begin != end;++begin){ \t\t\t\tss &lt;&lt; &quot;,[&quot; &lt;&lt; begin-&gt;x &lt;&lt; &quot;,&quot; &lt;&lt; begin-&gt;y &lt;&lt; &quot;]&quot;; \t\t\t} \t\t\tif (parts) ss &lt;&lt; &quot;]&quot;; \t\t\t++counter; \t\t} \t\tpoint_formatter & make_parts(bool p) {parts = p; counter = 0; return *this;} \t}; \t \tstd::stringstream ss; \tpoint_formatter fmt(ss); \tss &lt;&lt; std::fixed &lt;&lt; std::showpoint &lt;&lt; std::setprecision(6); \tss &lt;&lt; &quot;{&quot;; \tswitch(type()) { \t\tcase wkb_point: { \t\t\tss &lt;&lt; &quot;\\&quot;type\\&quot;:\\&quot;Point\\&quot;,\\&quot;coordinates\\&quot;:&quot;; \t\t\tapply(fmt); \t\t} break; \t\t\t \t\tcase wkb_line_string: { \t\t\tss &lt;&lt; &quot;\\&quot;type\\&quot;:\\&quot;LineString\\&quot;,\\&quot;coordinates\\&quot;: [&quot;; \t\t\tapply(fmt); \t\t\tss &lt;&lt; &quot;]&quot;; \t\t} break; \t\t\t \t\tcase wkb_multi_line_string: { \t\t\tss &lt;&lt; &quot;\\&quot;type\\&quot;:\\&quot;MultiLineString\\&quot;,\\&quot;coordinates\\&quot;: [&quot;; \t\t\tapply(fmt.make_parts(true)); \t\t\tss &lt;&lt; &quot;]&quot;; \t\t} break; \t\t\t \t\tcase wkb_polygon: { \t\t\tss &lt;&lt; &quot;\\&quot;type\\&quot;:\\&quot;Polygon\\&quot;,\\&quot;coordinates\\&quot;: [&quot;; \t\t\tapply(fmt.make_parts(true)); \t\t\tss &lt;&lt; &quot;]&quot;; \t\t} break; \t\tcase wkb_multi_polygon: { \t\t\tss &lt;&lt; &quot;\\&quot;type\\&quot;:\\&quot;MultiPolygon\\&quot;,\\&quot;coordinates\\&quot;: [&quot;; \t\t\tfor(size_t i=0; i &lt; size(); ++i) { \t\t\t\tss &lt;&lt; (i ? &quot;,[&quot; : &quot;[&quot;); \t\t\t\tpolygon(i).apply(fmt.make_parts(true)); \t\t\t\tss &lt;&lt; &quot;]&quot;; \t\t\t} \t\t\tss &lt;&lt; &quot;]&quot;; \t\t} break; \t\tdefault: break; \t} \tss &lt;&lt; &quot;}&quot;; \treturn ss.str(); } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 WKB. \u0421\u0442\u0430\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. \u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  \u0412\u0435\u0441\u044c \u043a\u043e\u0434, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/github.com\/darkserj\/wkb_wrapper\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"https:\/\/github.com\/darkserj\/container\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <i>\u0415\u0440\u0448\u043e\u0432 \u0421\u0435\u0440\u0433\u0435\u0439,<br \/>  \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <nobr><a href=\"http:\/\/maps.mail.ru\">\u041a\u0430\u0440\u0442\u044b@\u00adMail.ru<\/a><\/nobr><br \/>  <\/i>    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/mailru\/blog\/167517\/\"> http:\/\/habrahabr.ru\/company\/mailru\/blog\/167517\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1d2\/ddd\/79b\/1d2ddd79b912f902060706cee1ea0f83.png\" align=\"left\"\/>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <nobr><a href=\"http:\/\/maps.mail.ru\">\u041a\u0430\u0440\u0442\u044b Mail.ru<\/a><\/nobr> \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Well-known_text\">WKB<\/a>. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"http:\/\/en.wikipedia.org\/wiki\/GDAL\">GDAL<\/a>, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u0435\u043d\u0438\u0435, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u044b\u043b\u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0438. \u0422\u0430\u043a \u0438 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u044d\u0442\u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434.<br \/>  \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\u0442\u043e\u0447\u043a\u0430<\/li>\n<li>\u043b\u0438\u043d\u0438\u044f<\/li>\n<li>\u043f\u043e\u043b\u0438\u0433\u043e\u043d<\/li>\n<li>\u043c\u0443\u043b\u044c\u0442\u0438\u043b\u0438\u043d\u0438\u044f<\/li>\n<li>\u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u043b\u0438\u0433\u043e\u043d<\/li>\n<\/ul>\n<p>  \u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0439\u0442 \u0432 \u0441\u043b\u043e\u0432\u0435. \u0410 \u0442\u0430\u043a \u2014 \u0431\u0435\u0440\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0441\u044f.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-167517","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/167517","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=167517"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/167517\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}