{"id":326488,"date":"2021-07-15T15:00:09","date_gmt":"2021-07-15T15:00:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326488"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326488","title":{"rendered":"\u041a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043a\u0430\u0440\u0442 \u043d\u0430 \u0441\u0432\u0435\u0440\u0445\u0437\u0432\u0443\u043a \u0438 \u043d\u0435\u2026"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/r2\/1k\/s9\/r21ks94utck5u6_3xwrhnyhzgjy.png\" width=\"237\" height=\"378\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u043b \u0442\u0430\u0439\u043b\u0435\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 openstreetmaps \u043d\u0430 \u0421++\/Qt. \u0417\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e-\u0441\u043f\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0440\u044f\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0446\u0435\u043b\u044b\u0435 \u0441\u0443\u0442\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e \u0441\u0442\u043e\u044f\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043e\u0444\u0444\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c\u0435<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0441\u043e\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 <\/p>\n<\/li>\n<\/ul>\n<p>OpenStreetMaps \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u0438\u0437-\u0437\u0430 open source, \u0434\u0430 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a \u043d\u0435\u043c\u0443 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e. \u041e\u0441\u043d\u043e\u0432\u0443 \u0442\u0430\u0439\u043b\u0435\u0440\u0430 \u044f \u0432\u0437\u044f\u043b \u0443 libosmscout, \u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043d \u0438\u043c\u0435\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h2>\u041f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0435\u0440\u0430<\/h2>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/Framstag\/libosmscout\/blob\/master\/Demos\/src\/Tiler.cpp\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u0439\u043b\u0435\u0440<\/a> \u0438\u043c\u0435\u043b \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0447\u0435\u0440\u0435\u0437 args \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u043e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0436\u0443\u0436\u0430\u0442\u044c. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434 \u041e\u041e\u041f \u0438 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u043b \u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u0442\u043e \u0442\u0430\u043a\u043e\u0435: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bi\/u2\/oo\/biu2ooypcr9ise-xo7z27l7l1iy.png\" alt=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0435\u0440\u0430\" title=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0435\u0440\u0430\" width=\"1133\" height=\"624\"><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0435\u0440\u0430<\/figcaption><\/figure>\n<p>      \u041f\u043e\u0441\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438, \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u043b\u0438 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433. \u041a\u043b\u0430\u0441\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438(QueueBuilder) \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u0432\u0441\u0435\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c, \u0438 \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u0430 \u043e \u0442\u0430\u0439\u043b\u0435 \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043b\u043e \u043a \u0434\u0435\u043b\u0443 \u043f\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0430\u0439\u043b\u0430\u0445 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0435\u0451 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u0430\u0436\u0435 \u043d\u0430 18 \u0437\u0443\u043c\u043e\u0432 \u0411\u0435\u043b\u0430\u0440\u0443\u0441\u0438, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043b\u0435\u0436\u0438\u0442 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u043f\u043e 30 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0442\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441 \u043d\u0438\u043c\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2\u0433\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u044b, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u043a.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">for (quint32 y=yTileStart; y&lt;=yTileEnd; y++) {     for (quint32 x=xTileStart; x&lt;=xTileEnd; x++) {         tileData = new TileDataClass(x,y,level.Get(),0,0,0,0);         countLatLon(x,y,level.Get());         if(counterOfTiles&gt;=30000000)         {             filesVector.at(i)-&gt;flush();             i++;             counterOfTiles = 0;              QTemporaryFile * file = new QTemporaryFile(QDir::tempPath() + \"\/TileQueue\/\" + fileName);             filesVector.push_back(file);             if(filesVector.at(i)-&gt;open())             {                 qDebug()&lt;&lt;\"Opened \"&lt;&lt;filesVector.at(i)-&gt;fileName();             }             else             {                 qDebug()&lt;&lt;\"Not opened\";             }             dataStream.setDevice(filesVector.at(i));         }          counterOfTiles++;         dataStream &lt;&lt; TileDataClass(tileData-&gt;x,tileData-&gt;y,tileData-&gt;zoom,stepLongitude, stepLattitude, 0,0);         delete tileData;     } }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0430, QueueBuilder \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u0439\u043b\u0430. \u0418 \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442 \u043f\u043e\u0442\u043e\u043a\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0430, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043a \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0437\u043d\u0430\u043b (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e \u0442\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u044e 4 \u043f\u043e\u0442\u043e\u043a\u0430, \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u0439\u043b\u044b \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0442\u0451\u043c\u043d\u044b\u0435 \u0434\u0435\u043b\u0430 (\u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u0439\u043c\u0451\u0442 \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0441\u0442\u0430\u0442\u044c\u044e), \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0442\u0430\u0439\u043b\u0430, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438 \u0442\u0430\u043a \u043f\u043e\u043a\u0430 \u0441\u043e\u043b\u043d\u0446\u0435 \u043d\u0435 \u0437\u0430\u0448\u043b\u043e. \u041f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u0442\u0430\u0439\u043b\u043e\u0432 \u0443\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0435\u0440\u0435\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h2>\u041a\u0430\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u0430\u0440\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0432<\/h2>\n<p>\u041f\u043e \u0438\u0434\u0435\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u0442\u0430\u0439\u043b\u044b \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u044b, \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435, \u0431\u0435\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u0430\u0440\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439. \u041d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0447\u0442\u043e \u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0430\u0440\u0442\u044b \u0438 \u0441\u043a\u0440\u043e\u043b\u043b\u0430 \u0442\u0443\u0434\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0430\u0439\u043b\u043e\u0432 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043e, \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0437\u0443\u043c, \u0438 \u043f\u0440\u0438 \u0447\u0438\u0441\u043b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a 256\u0445256 \u0432 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430, \u043f\u043e\u0438\u0441\u043a \u0432 \u043f\u0430\u043f\u043a\u0435 \u043d\u0443\u0436\u043d\u043e\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.  <\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438\u0448\u043b\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u043d\u043e \u043f\u0440\u0438\u0448\u043b\u043e, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0443\u043c\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 <\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0430\u0439\u043b\u043e\u0432 \u043f\u043e x \u0438 \u043f\u043e y \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430 <\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u043f\u043e x \u0438 \u043f\u043e y, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u043e\u0437\u0436\u0435.    <\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">struct ConstantStruct {     uint32_t countOfTiles;     uint32_t xTileStart;     uint32_t yTileStart;     uint32_t xTileCount;     uint32_t yTileCount; };<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u0430\u0441\u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u0430\u0439\u043b\u0430\u0445 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>class TileDataClass { public:     TileDataClass() : x( 0 ), y( 0 ), zoom(0), size(0), startPoint(0) { }     uint32_t x;     uint32_t y;     uint8_t zoom;     double stepLattitude;     double stepLongitude;     uint32_t size;     uint32_t startPoint;     friend QDataStream&amp; operator&gt;&gt;(QDataStream &amp;stream, TileDataClass &amp;data);     friend QDataStream&amp; operator&lt;&lt;(QDataStream &amp;stream, TileDataClass data); };<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary><\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">void SaveToFileClass::run() {     QFile file(\"file.bin\");     if(file.open(QIODevice::WriteOnly))     {          QDataStream stream(&amp;file);         for(int i =0; i&lt;constants.size(); i++)\/\/\u0437\u0430\u043f\u0438\u0441\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0432 \u0444\u0430\u0439\u043b         {             stream&lt;&lt;constants.at(i).countOfTiles;             stream&lt;&lt;constants.at(i).xTileStart;             stream&lt;&lt;constants.at(i).yTileStart;             stream&lt;&lt;constants.at(i).xTileCount;             stream&lt;&lt;constants.at(i).yTileCount;         }         int countInputTiles = 0;         for(int i=0;i&lt;files.size();i++)\/\/\u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0442\u0430\u0439\u043b\u0430\u0445         {             files.at(i)-&gt;open();             QDataStream dataStream(files.at(i));             while(!dataStream.atEnd())             {                 TileDataClass *tiles = new TileDataClass();                 dataStream&gt;&gt;*tiles;                 countInputTiles++;                 stream&lt;&lt;*tiles;                 delete tiles;             }             files.at(i)-&gt;close();         }         file.close();         file.open(QIODevice::ReadWrite);         file.seek(sizeof(constants.at(0))*constants.size());         QDataStream dataStream(&amp;file);         int countOutputTiles = 0;         while(countOutputTiles!=countInputTiles)\/\/\u0432\u044b\u0432\u043e\u0434 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0441\u0430\u043c\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438         {             TileDataClass *tiles = new TileDataClass();             dataStream&gt;&gt;*tiles;              QString a = \"offline_tiles\/osm_custom_100-l-1-\"+QString::number(tiles-&gt;zoom)+                     +\"-\"+QString::number(tiles-&gt;x)+\"-\"+QString::number(tiles-&gt;y)+\".png\";             QFile tilePic(a);             tilePic.open(QIODevice::ReadOnly);             tiles-&gt;size = tilePic.size();              tiles-&gt;startPoint = file.size();             file.seek(sizeof(constants.at(0))*constants.size()+sizeof(TileDataClass)*countOutputTiles);             dataStream&lt;&lt;*tiles;             file.seek(tiles-&gt;startPoint);              file.write(tilePic.readAll());             countOutputTiles++;             file.seek(sizeof(constants.at(0))*constants.size()+sizeof(TileDataClass)*countOutputTiles);          }         if(stream.status() != QDataStream::Ok)         {             qDebug() &lt;&lt; \"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438\";         }\/\/\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u043e\u0432\u0435\u0441\u0442\u0438\u0442 \u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0435\u0451 \u0432 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430.         QElapsedTimer timer;         timer.start();         getTile(147,82,8);         qDebug() &lt;&lt; \"The slow operation took \" &lt;&lt; timer.nsecsElapsed() &lt;&lt; \" nanoseconds\";         exit(0);     }     else     {         qDebug()&lt;&lt;\"\u0424\u0430\u0439\u043b \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\";     }     this-&gt;exec();  }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u044f \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432 \u0444\u0430\u0439\u043b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u0430\u0439\u043b\u0430\u0445, \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u0439\u043b \u0441\u0432\u043e\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435:<\/p>\n<ul>\n<li>\n<p> x y \u0442\u0430\u0439\u043b\u0430<\/p>\n<\/li>\n<li>\n<p> \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p> \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0433\u043e\u0442\u044b \u0448\u0438\u0440\u043e\u0442\u044b \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u0435(\u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432, \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0435\u0441\u043b\u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0447\u0442\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 4\u0445 \u0447\u0435\u043b\u043e\u0432\u0435\u043a)<\/p>\n<\/li>\n<li>\n<p> \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0442\u0430\u0439\u043b\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 <\/p>\n<\/li>\n<li>\n<p> \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435<\/p>\n<p>\u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0442\u0430\u0439\u043b\u0430 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0443\u043a\u0430\u0437\u0442\u0435\u043b\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441 \u0438\u043d\u0444\u043e\u0439 \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u0430\u0439\u043b\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043b\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zl\/ww\/gb\/zlwwgbhagszuxigjt_76zcmsphu.png\" alt=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\" title=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\" width=\"839\" height=\"129\"><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/figcaption><\/figure>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0442\u0430\u0439\u043b\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2l\/yc\/8o\/2lyc8ogtpjv-rpghycerr_rzy7m.png\" alt=\"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430\" title=\"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430\" width=\"800\" height=\"233\"><figcaption>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430<\/figcaption><\/figure>\n<p>\u041f\u043e\u043a\u0430\u0436\u0443 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u0439\u043b\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0431\u0435\u0437 \u0433\u043e\u043b\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"CountX = X - StartPosX\" alt=\"CountX = X - StartPosX\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f9\/1b2\/b94\/1f91b2b941069cd08a33b8cbb6792c8b.svg\" width=\"250\" height=\"19\"><\/p>\n<p>\u0422\u043e\u0435\u0441\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 1 &#8212; 0, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e X \u0443 \u043d\u0430\u0441 \u043b\u0435\u0436\u0438\u0442 1 \u0442\u0430\u0439\u043b \u043f\u0435\u0440\u0435\u0434 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u043c, \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043e y \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f 2. StartPosX \u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"TileCount = XtileCount*CountY + CountX\" alt=\"TileCount = XtileCount*CountY + CountX\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/63f\/00d\/fda\/63f00dfda75db819aa5132961829e6c9.svg\" width=\"426\" height=\"19\"><\/p>\n<p>\u0413\u0434\u0435<\/p>\n<ul>\n<li>\n<p>XtileCount &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 X \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 Y<\/p>\n<\/li>\n<li>\n<p>CountY &#8212; \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 4*2+1 = 9, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0432\u0441\u0451 \u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0437\u0443\u043c\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 seek \u043f\u0435\u0440\u0435\u0441\u043a\u043e\u0447\u0438\u0442\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439. \u041f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0437\u0443\u043c\u043e\u0432 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u044f \u043a TileCount. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f 14 \u0442\u0430\u0439\u043b\u043e\u0432 \u043b\u0435\u0436\u0438\u0442 \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c.<\/p>\n<p>\u0418 \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430 \u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0451.<\/p>\n<pre><code>    if(file.open(QIODevice::ReadOnly))     {         file.seek(sizeof(constants)*20 + sizeof(QTileDataClass)*(countTls));         QDataStream dataStream(&amp;file);         dataStream&gt;&gt;*tile;     }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0435\u0440\u0451\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0435\u0451 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0442\u0430\u0439\u043b.<\/p>\n<pre><code>    QPixmap pixmap;     QByteArray arr;     QDataStream stream(&amp;file);     file.seek(tile-&gt;startPoint);     arr = file.read(tile-&gt;size);     QPixmap img;     img.loadFromData(arr);     QImage image(img.toImage());<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0436\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435? \u0412 \u0438\u0442\u043e\u0433\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u044b \u0444\u043e\u0440\u043c\u0443\u043b, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e seek \u043f\u043e \u0444\u0430\u0439\u043b\u0443, \u043d\u0443 \u0438 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u0437\u0443\u043c\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<\/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=\"https:\/\/habr.com\/ru\/post\/567936\/\"> https:\/\/habr.com\/ru\/post\/567936\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u043b \u0442\u0430\u0439\u043b\u0435\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 openstreetmaps \u043d\u0430 \u0421++\/Qt. \u0417\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e-\u0441\u043f\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0440\u044f\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0446\u0435\u043b\u044b\u0435 \u0441\u0443\u0442\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e \u0441\u0442\u043e\u044f\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043e\u0444\u0444\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c\u0435<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0441\u043e\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 <\/p>\n<\/li>\n<\/ul>\n<p>OpenStreetMaps \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u0438\u0437-\u0437\u0430 open source, \u0434\u0430 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a \u043d\u0435\u043c\u0443 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e. \u041e\u0441\u043d\u043e\u0432\u0443 \u0442\u0430\u0439\u043b\u0435\u0440\u0430 \u044f \u0432\u0437\u044f\u043b \u0443 libosmscout, \u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043d \u0438\u043c\u0435\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h2>\u041f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0435\u0440\u0430<\/h2>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/Framstag\/libosmscout\/blob\/master\/Demos\/src\/Tiler.cpp\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u0439\u043b\u0435\u0440<\/a> \u0438\u043c\u0435\u043b \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0447\u0435\u0440\u0435\u0437 args \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u043e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0436\u0443\u0436\u0430\u0442\u044c. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434 \u041e\u041e\u041f \u0438 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u043b \u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u0442\u043e \u0442\u0430\u043a\u043e\u0435: <\/p>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0435\u0440\u0430<\/figcaption><\/figure>\n<p>      \u041f\u043e\u0441\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438, \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u043b\u0438 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433. \u041a\u043b\u0430\u0441\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438(QueueBuilder) \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u0432\u0441\u0435\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c, \u0438 \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u0430 \u043e \u0442\u0430\u0439\u043b\u0435 \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043b\u043e \u043a \u0434\u0435\u043b\u0443 \u043f\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0430\u0439\u043b\u0430\u0445 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0435\u0451 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u0430\u0436\u0435 \u043d\u0430 18 \u0437\u0443\u043c\u043e\u0432 \u0411\u0435\u043b\u0430\u0440\u0443\u0441\u0438, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043b\u0435\u0436\u0438\u0442 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u043f\u043e 30 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0442\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441 \u043d\u0438\u043c\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2\u0433\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u044b, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u043a.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">for (quint32 y=yTileStart; y&lt;=yTileEnd; y++) {     for (quint32 x=xTileStart; x&lt;=xTileEnd; x++) {         tileData = new TileDataClass(x,y,level.Get(),0,0,0,0);         countLatLon(x,y,level.Get());         if(counterOfTiles&gt;=30000000)         {             filesVector.at(i)-&gt;flush();             i++;             counterOfTiles = 0;              QTemporaryFile * file = new QTemporaryFile(QDir::tempPath() + \"\/TileQueue\/\" + fileName);             filesVector.push_back(file);             if(filesVector.at(i)-&gt;open())             {                 qDebug()&lt;&lt;\"Opened \"&lt;&lt;filesVector.at(i)-&gt;fileName();             }             else             {                 qDebug()&lt;&lt;\"Not opened\";             }             dataStream.setDevice(filesVector.at(i));         }          counterOfTiles++;         dataStream &lt;&lt; TileDataClass(tileData-&gt;x,tileData-&gt;y,tileData-&gt;zoom,stepLongitude, stepLattitude, 0,0);         delete tileData;     } }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0430, QueueBuilder \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u0439\u043b\u0430. \u0418 \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442 \u043f\u043e\u0442\u043e\u043a\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0430, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043a \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0437\u043d\u0430\u043b (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e \u0442\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u044e 4 \u043f\u043e\u0442\u043e\u043a\u0430, \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u0439\u043b\u044b \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0442\u0451\u043c\u043d\u044b\u0435 \u0434\u0435\u043b\u0430 (\u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u0439\u043c\u0451\u0442 \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0441\u0442\u0430\u0442\u044c\u044e), \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0442\u0430\u0439\u043b\u0430, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438 \u0442\u0430\u043a \u043f\u043e\u043a\u0430 \u0441\u043e\u043b\u043d\u0446\u0435 \u043d\u0435 \u0437\u0430\u0448\u043b\u043e. \u041f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u0442\u0430\u0439\u043b\u043e\u0432 \u0443\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0435\u0440\u0435\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h2>\u041a\u0430\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u0430\u0440\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0432<\/h2>\n<p>\u041f\u043e \u0438\u0434\u0435\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u0442\u0430\u0439\u043b\u044b \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u044b, \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435, \u0431\u0435\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u0430\u0440\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439. \u041d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0447\u0442\u043e \u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0430\u0440\u0442\u044b \u0438 \u0441\u043a\u0440\u043e\u043b\u043b\u0430 \u0442\u0443\u0434\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0430\u0439\u043b\u043e\u0432 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043e, \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0437\u0443\u043c, \u0438 \u043f\u0440\u0438 \u0447\u0438\u0441\u043b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a 256\u0445256 \u0432 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430, \u043f\u043e\u0438\u0441\u043a \u0432 \u043f\u0430\u043f\u043a\u0435 \u043d\u0443\u0436\u043d\u043e\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.  <\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438\u0448\u043b\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u043d\u043e \u043f\u0440\u0438\u0448\u043b\u043e, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0443\u043c\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 <\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0430\u0439\u043b\u043e\u0432 \u043f\u043e x \u0438 \u043f\u043e y \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430 <\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u043f\u043e x \u0438 \u043f\u043e y, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u043e\u0437\u0436\u0435.    <\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">struct ConstantStruct {     uint32_t countOfTiles;     uint32_t xTileStart;     uint32_t yTileStart;     uint32_t xTileCount;     uint32_t yTileCount; };<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u0430\u0441\u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u0430\u0439\u043b\u0430\u0445 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>class TileDataClass { public:     TileDataClass() : x( 0 ), y( 0 ), zoom(0), size(0), startPoint(0) { }     uint32_t x;     uint32_t y;     uint8_t zoom;     double stepLattitude;     double stepLongitude;     uint32_t size;     uint32_t startPoint;     friend QDataStream&amp; operator&gt;&gt;(QDataStream &amp;stream, TileDataClass &amp;data);     friend QDataStream&amp; operator&lt;&lt;(QDataStream &amp;stream, TileDataClass data); };<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary><\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">void SaveToFileClass::run() {     QFile file(\"file.bin\");     if(file.open(QIODevice::WriteOnly))     {          QDataStream stream(&amp;file);         for(int i =0; i&lt;constants.size(); i++)\/\/\u0437\u0430\u043f\u0438\u0441\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0432 \u0444\u0430\u0439\u043b         {             stream&lt;&lt;constants.at(i).countOfTiles;             stream&lt;&lt;constants.at(i).xTileStart;             stream&lt;&lt;constants.at(i).yTileStart;             stream&lt;&lt;constants.at(i).xTileCount;             stream&lt;&lt;constants.at(i).yTileCount;         }         int countInputTiles = 0;         for(int i=0;i&lt;files.size();i++)\/\/\u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0442\u0430\u0439\u043b\u0430\u0445         {             files.at(i)-&gt;open();             QDataStream dataStream(files.at(i));             while(!dataStream.atEnd())             {                 TileDataClass *tiles = new TileDataClass();                 dataStream&gt;&gt;*tiles;                 countInputTiles++;                 stream&lt;&lt;*tiles;                 delete tiles;             }             files.at(i)-&gt;close();         }         file.close();         file.open(QIODevice::ReadWrite);         file.seek(sizeof(constants.at(0))*constants.size());         QDataStream dataStream(&amp;file);         int countOutputTiles = 0;         while(countOutputTiles!=countInputTiles)\/\/\u0432\u044b\u0432\u043e\u0434 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0441\u0430\u043c\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438         {             TileDataClass *tiles = new TileDataClass();             dataStream&gt;&gt;*tiles;              QString a = \"offline_tiles\/osm_custom_100-l-1-\"+QString::number(tiles-&gt;zoom)+                     +\"-\"+QString::number(tiles-&gt;x)+\"-\"+QString::number(tiles-&gt;y)+\".png\";             QFile tilePic(a);             tilePic.open(QIODevice::ReadOnly);             tiles-&gt;size = tilePic.size();              tiles-&gt;startPoint = file.size();             file.seek(sizeof(constants.at(0))*constants.size()+sizeof(TileDataClass)*countOutputTiles);             dataStream&lt;&lt;*tiles;             file.seek(tiles-&gt;startPoint);              file.write(tilePic.readAll());             countOutputTiles++;             file.seek(sizeof(constants.at(0))*constants.size()+sizeof(TileDataClass)*countOutputTiles);          }         if(stream.status() != QDataStream::Ok)         {             qDebug() &lt;&lt; \"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438\";         }\/\/\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u043e\u0432\u0435\u0441\u0442\u0438\u0442 \u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0435\u0451 \u0432 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430.         QElapsedTimer timer;         timer.start();         getTile(147,82,8);         qDebug() &lt;&lt; \"The slow operation took \" &lt;&lt; timer.nsecsElapsed() &lt;&lt; \" nanoseconds\";         exit(0);     }     else     {         qDebug()&lt;&lt;\"\u0424\u0430\u0439\u043b \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\";     }     this-&gt;exec();  }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u044f \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432 \u0444\u0430\u0439\u043b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u0430\u0439\u043b\u0430\u0445, \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u0439\u043b \u0441\u0432\u043e\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435:<\/p>\n<ul>\n<li>\n<p> x y \u0442\u0430\u0439\u043b\u0430<\/p>\n<\/li>\n<li>\n<p> \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p> \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0433\u043e\u0442\u044b \u0448\u0438\u0440\u043e\u0442\u044b \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u0435(\u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432, \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0435\u0441\u043b\u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0447\u0442\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 4\u0445 \u0447\u0435\u043b\u043e\u0432\u0435\u043a)<\/p>\n<\/li>\n<li>\n<p> \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0442\u0430\u0439\u043b\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 <\/p>\n<\/li>\n<li>\n<p> \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435<\/p>\n<p>\u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0442\u0430\u0439\u043b\u0430 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0443\u043a\u0430\u0437\u0442\u0435\u043b\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441 \u0438\u043d\u0444\u043e\u0439 \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u0430\u0439\u043b\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043b\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/figcaption><\/figure>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0442\u0430\u0439\u043b\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"full-width\"><figcaption>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0441\u0435\u0442\u043a\u0435 \u043c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430<\/figcaption><\/figure>\n<p>\u041f\u043e\u043a\u0430\u0436\u0443 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u0439\u043b\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0431\u0435\u0437 \u0433\u043e\u043b\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b.<\/p>\n<p>\u0422\u043e\u0435\u0441\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 1 &#8212; 0, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e X \u0443 \u043d\u0430\u0441 \u043b\u0435\u0436\u0438\u0442 1 \u0442\u0430\u0439\u043b \u043f\u0435\u0440\u0435\u0434 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u043c, \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043e y \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f 2. StartPosX \u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>\u0413\u0434\u0435<\/p>\n<ul>\n<li>\n<p>XtileCount &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 X \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 Y<\/p>\n<\/li>\n<li>\n<p>CountY &#8212; \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 4*2+1 = 9, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0432\u0441\u0451 \u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0437\u0443\u043c\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 seek \u043f\u0435\u0440\u0435\u0441\u043a\u043e\u0447\u0438\u0442\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439. \u041f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0437\u0443\u043c\u043e\u0432 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u044f \u043a TileCount. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f 14 \u0442\u0430\u0439\u043b\u043e\u0432 \u043b\u0435\u0436\u0438\u0442 \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c.<\/p>\n<p>\u0418 \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430 \u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0451.<\/p>\n<pre><code>    if(file.open(QIODevice::ReadOnly))     {         file.seek(sizeof(constants)*20 + sizeof(QTileDataClass)*(countTls));         QDataStream dataStream(&amp;file);         dataStream&gt;&gt;*tile;     }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0435\u0440\u0451\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0435\u0451 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0442\u0430\u0439\u043b.<\/p>\n<pre><code>    QPixmap pixmap;     QByteArray arr;     QDataStream stream(&amp;file);     file.seek(tile-&gt;startPoint);     arr = file.read(tile-&gt;size);     QPixmap img;     img.loadFromData(arr);     QImage image(img.toImage());<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0436\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435? \u0412 \u0438\u0442\u043e\u0433\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043a\u0430\u0440\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u044b \u0444\u043e\u0440\u043c\u0443\u043b, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e seek \u043f\u043e \u0444\u0430\u0439\u043b\u0443, \u043d\u0443 \u0438 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u0437\u0443\u043c\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<\/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=\"https:\/\/habr.com\/ru\/post\/567936\/\"> https:\/\/habr.com\/ru\/post\/567936\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-326488","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326488","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=326488"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326488\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}