{"id":200902,"date":"2013-11-08T10:58:02","date_gmt":"2013-11-08T06:58:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=200902"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=200902","title":{"rendered":"<span class=\"post_title\">\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c OpenStreetMap \u0432 MySQL<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 \u0443\u043b\u0438\u0446 \u0438 \u0434\u043e\u043c\u043e\u0432 \u041c\u0438\u043d\u0441\u043a\u0430. \u041a\u0430\u043a\u043e\u0432\u043e \u0436\u0435 \u0431\u044b\u043b\u043e \u043c\u043e\u0435 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u043f\u043e\u043b\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435\u0442, \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0443\u043b\u0438\u0446\u044b \u0438 \u0434\u043e\u043c\u0430. \u0412\u043e\u0442 \u0442\u0443\u0442 \u0438 \u043f\u0440\u0438\u0448\u0435\u043b \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 <b>OpenStreetMap <\/b>\u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u0411\u0435\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 xml \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043e\u0431\u044a\u0451\u043c\u043e\u043c \u0430\u0436 \u0446\u0435\u043b\u044b\u0445 2 \u0413\u0431 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u043e\u043c\u0430\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435:   <\/p>\n<pre><code class=\"xml\">&lt;way id=&quot;25324320&quot; &gt;   &lt;nd ref=&quot;275904968&quot;\/&gt;   &lt;nd ref=&quot;275904882&quot;\/&gt;   &lt;nd ref=&quot;275904881&quot;\/&gt;   &lt;nd ref=&quot;275904969&quot;\/&gt;   &lt;nd ref=&quot;275904968&quot;\/&gt;   &lt;tag k=&quot;addr:housenumber&quot; v=&quot;17&quot;\/&gt;   &lt;tag k=&quot;addr:postcode&quot; v=&quot;220013&quot;\/&gt;   &lt;tag k=&quot;addr:street&quot; v=&quot;\u0443\u043b\u0438\u0446\u0430 \u042f\u043a\u0443\u0431\u0430 \u041a\u043e\u043b\u0430\u0441\u0430&quot;\/&gt;   &lt;tag k=&quot;building&quot; v=&quot;yes&quot;\/&gt;  &lt;\/way&gt;   <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c 1.5 \u0413\u0431 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0449\u0435, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u044b \u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a. \u0422\u0430\u043a \u043c\u043d\u043e\u0439 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414. \u0421\u043a\u0430\u0437\u0430\u043d\u043e \u2013 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u044b: Eclipse(Java SE) \u0438 \u0434\u0436\u0435\u043d\u0442\u0435\u043b\u044c\u043c\u0435\u043d\u0441\u043a\u0438 \u043d\u0430\u0431\u043e\u0440 \u0434\u0435\u043d\u0432\u0435\u0440\u0430. <\/p>\n<h5>\u041d\u0435\u043c\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h5>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 xml \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u043e\u0447\u043a\u0430 (<b>node<\/b>), \u043b\u0438\u043d\u0438\u044f (<b>way<\/b>) \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 (<b>relation<\/b>). \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/04c\/854\/e15\/04c854e15e532c1d3a75256bbfa82db4.jpg\" alt=\"\u0421\u0445\u0435\u043c\u0430\"\/><\/p>\n<p>  <b>Node<\/b> \u2013 \u0442\u043e\u0447\u043a\u0430. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0445\u0440\u0430\u043d\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0430: \u0448\u0438\u0440\u043e\u0442\u0430, \u0434\u043e\u043b\u0433\u043e\u0442\u0430 (<b>lat<\/b>, <b>lon<\/b>). \u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0441\u0432\u043e\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <b>id<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441 <b>id <\/b> <b>way <\/b>\u0438\u043b\u0438 <b>relation<\/b>. \u0412 XML \u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"xml\">&lt;node id=&quot;1877995696&quot; lat=&quot;53.9216820&quot; lon=&quot;27.5883786&quot;\/&gt; <\/code><\/pre>\n<p>  <b>Way<\/b> \u2013\u043b\u0438\u043d\u0438\u044f. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u0435\u043a, \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>id<\/b>. <br \/>  \u0421\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u0435\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0433\u043e\u043c <b>nd<\/b>, \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <b>ref<\/b>, \u0433\u0434\u0435<b> ref<\/b> \u044d\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430<b> id <\/b>\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <b>node<\/b>. <br \/>  \u0412 XML \u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"xml\">&lt;way id=&quot;83643843&quot;&gt; &lt;nd ref=&quot;1270318960&quot;\/&gt;  &lt;nd ref=&quot;974055589&quot;\/&gt;  &lt;nd ref=&quot;974055636&quot;\/&gt;  &lt;nd ref=&quot;974055581&quot;\/&gt;  &lt;nd ref=&quot;974055604&quot;\/&gt; &lt;\/way&gt; <\/code><\/pre>\n<p>  <b>Relation <\/b>\u2013 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>id<\/b>. \u0421\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0433\u043e\u043c <b>member<\/b>. \u0422\u0435\u0433 <b>member <\/b>\u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432: <b>type <\/b>\u2013 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, <b>ref <\/b>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <b>id <\/b>\u043e\u0431\u044a\u0435\u043a\u0442\u0430, <b>role <\/b>\u2013 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u043e\u043b\u0435\u0439, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. <br \/>  \u0414\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u0433 <b>Tag<\/b>, \u043e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 <b>k \u2013 key<\/b>(<i>\u043a\u043b\u044e\u0447<\/i>), <b>v- value<\/b>(<i>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/i>). \u0412 \u044d\u0442\u043e\u043c \u0442\u0435\u0433\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0435. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/wiki.openstreetmap.org\/wiki\/Map_Features\">\u0437\u0434\u0435\u0441\u044c <\/a>.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f \u043f\u043e\u0434\u0435\u043b\u0438\u043b \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0430\u0441\u0442\u0438:<\/h5>\n<p>  <b>1.<\/b> <i>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <\/i><br \/>  <b>2.<\/b> <i>\u0418\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 SQL<\/i><br \/>  <b>3.<\/b> <i>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/i><br \/>  <b>4.<\/b> <i>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 XML \u0444\u0430\u0439\u043b\u0430.<\/i><br \/>  \u0421\u0430\u043c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/VitaminPSG\/OpenStreetMap\/\">github.com<\/a> \u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435!)<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/h5>\n<p>  \u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <b>Swing<\/b>. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 \u0432\u0432\u043e\u0434\u0430, \u043c\u0435\u0442\u043e\u043a, \u0434\u0432\u0443\u0445 \u043a\u043d\u043e\u043f\u043e\u043a, \u043f\u043e\u043b\u043e\u0441\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u043a\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<br \/>  <b>DB URL<\/b> \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442:<b> jdbc:subprotocol:subname<\/b>, <br \/>  \u0433\u0434\u0435 <b>subprotocol <\/b>\u2014 \u0438\u043c\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0438\u043b\u0438 \u0438\u043c\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (<i>mysql<\/i>),<br \/>  <b>subname <\/b>\u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0441\u0442, \u043f\u043e\u0440\u0442, \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445(<i>\/\/localhost\/<\/i>). <br \/>  \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f: <b>jdbc:mysql:\/\/localhost\/<\/b><br \/>  <b>User<\/b> \u2014 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  <b>Password <\/b>\u2013 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  <b>DB Name<\/b> \u2014 \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438.<br \/>  <b>FilePath<\/b> \u2013 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <b>Connect <\/b> \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414<br \/>  <b>Start <\/b> \u2013 \u043d\u0430\u0447\u0430\u043b\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<br \/>  \u041a\u043d\u043e\u043f\u043a\u0430 <b>Start <\/b>\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414.<\/p>\n<p>  \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043e\u043a\u043d\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5ae\/1e5\/473\/5ae1e5473b25e2a1c54f70e45e947e48.jpg\" alt=\"image\"\/>  <\/p>\n<h6>\u041a\u043e\u0434<\/h6>\n<p>  <\/p>\n<pre><code class=\"java\">public class Window extends Thread {  \tprivate JFrame window; \tprivate JTextField userValue; \tprivate JTextField passValue; \tprivate JTextField dbNameValue; \tprivate TextArea textArea; \tprivate JButton btnConnected; \tprivate JButton btnExport; \tprivate JTextField filePathValue; \tprivate JTextField urlValue; \tprivate JProgressBar progressBar;  \tpublic Window() { \t\tinitialize(); \t}  \t@Override \tpublic void run() {  \t}  \tprivate void initialize() { \t\twindow = new JFrame(); \t\twindow.setTitle(&quot;OSMtoMySQL&quot;); \t\twindow.setResizable(false); \t\twindow.setBounds(100, 100, 420, 450); \t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \t\twindow.getContentPane().setLayout(null);  \t\tJLabel dbUrl = new JLabel(&quot;DB URL&quot;); \t\tdbUrl.setBounds(10, 29, 100, 14); \t\twindow.getContentPane().add(dbUrl);  \t\turlValue = new JTextField(); \t\turlValue.setText(&quot;jdbc:mysql:\/\/localhost\/&quot;); \t\turlValue.setBounds(120, 26, 203, 20); \t\twindow.getContentPane().add(urlValue); \t\turlValue.setColumns(10);  \t\tJLabel user = new JLabel(&quot;User&quot;); \t\tuser.setBounds(10, 54, 100, 14); \t\twindow.getContentPane().add(user);  \t\tuserValue = new JTextField(); \t\tuserValue.setText(&quot;root&quot;); \t\tuserValue.setBounds(120, 51, 203, 20); \t\twindow.getContentPane().add(userValue); \t\tuserValue.setColumns(10);  \t\tJLabel pass = new JLabel(&quot;Password&quot;); \t\tpass.setBounds(10, 79, 100, 14); \t\twindow.getContentPane().add(pass);  \t\tpassValue = new JTextField(); \t\tpassValue.setBounds(120, 76, 203, 20); \t\twindow.getContentPane().add(passValue); \t\tpassValue.setColumns(10);  \t\tJLabel dbName = new JLabel(&quot;DB Name&quot;); \t\tdbName.setBounds(10, 104, 100, 14); \t\twindow.getContentPane().add(dbName);  \t\tdbNameValue = new JTextField(); \t\tdbNameValue.setText(&quot;Belarus&quot;);  \t\tdbNameValue.setBounds(120, 101, 203, 20); \t\twindow.getContentPane().add(dbNameValue); \t\tdbNameValue.setColumns(10);  \t\tbtnConnected = new JButton(&quot;Connect&quot;);  \t\tbtnConnected.setBounds(120, 159, 89, 23); \t\twindow.getContentPane().add(btnConnected);  \t\tbtnExport = new JButton(&quot;Start&quot;); \t\tbtnExport.setBounds(234, 159, 89, 23); \t\tbtnExport.setEnabled(false); \t\twindow.getContentPane().add(btnExport);  \t\ttextArea = new TextArea(); \t\ttextArea.setEditable(false); \t\ttextArea.setBounds(10, 237, 394, 175); \t\twindow.getContentPane().add(textArea);  \t\tJLabel filePath = new JLabel(&quot;FilePath&quot;); \t\tfilePath.setBounds(10, 129, 46, 14); \t\twindow.getContentPane().add(filePath);  \t\tfilePathValue = new JTextField(); \t\tfilePathValue.setText(&quot;BY.osm&quot;); \t\tfilePathValue.setColumns(10); \t\tfilePathValue.setBounds(120, 126, 203, 20); \t\twindow.getContentPane().add(filePathValue);  \t\tprogressBar = new JProgressBar(); \t\tprogressBar.setMaximum(1000); \t\tprogressBar.setBounds(10, 202, 394, 20); \t\tprogressBar.setStringPainted(true); \t\twindow.getContentPane().add(progressBar);  \t}  \tpublic void addLog(String str) { \t\tCalendar cal = Calendar.getInstance(); \t\tSimpleDateFormat sdf = new SimpleDateFormat(&quot;HH:mm:ss&quot;); \t\tthis.textArea.append(sdf.format(cal.getTime()) + &quot; &gt; &quot; + str + &quot;\\n&quot;); \t}  \t }  <\/code><\/pre>\n<h5>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h5>\n<p>  \u0411\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435.  <\/p>\n<pre><code class=\"sql\">CREATE TABLE IF NOT EXISTS node ( id INT (10) UNSIGNED  NOT NULL,  lat FLOAT (10,7) NOT NULL,  lon FLOAT (10,7) NOT NULL,  PRIMARY KEY (id)  ); CREATE TABLE IF NOT EXISTS way ( id INT (10) UNSIGNED  NOT NULL ,PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS relation ( id INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS nd ( id INT (10) UNSIGNED  NOT NULL ,id_way INT (10) UNSIGNED  NOT NULL, id_node INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_way) REFERENCES way(id), FOREIGN KEY (id_node) REFERENCES node(id) ); CREATE TABLE IF NOT EXISTS tag_key ( id INT (10) UNSIGNED  NOT NULL, k VARCHAR(25)  NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS tag_value ( id INT (10) UNSIGNED  NOT NULL, v VARCHAR(255)  NOT NULL, id_tag_key INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_tag_key) REFERENCES tag_key(id) ); CREATE TABLE IF NOT EXISTS node_tag ( id INT (10) UNSIGNED  NOT NULL, id_node INT (10) UNSIGNED  NOT NULL, id_tag INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_node) REFERENCES node(id), FOREIGN KEY (id_tag) REFERENCES tag_value(id) ); CREATE TABLE IF NOT EXISTS way_tag ( id INT (10) UNSIGNED  NOT NULL, id_way INT (10) UNSIGNED  NOT NULL, id_tag INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_way) REFERENCES way(id), FOREIGN KEY (id_tag) REFERENCES tag_value(id) ); CREATE TABLE IF NOT EXISTS relation_tag ( id INT (10) UNSIGNED  NOT NULL, id_relation INT (10) UNSIGNED  NOT NULL, id_tag INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_relation) REFERENCES relation(id), FOREIGN KEY (id_tag) REFERENCES tag_value(id) ); CREATE TABLE IF NOT EXISTS role ( id INT (10) UNSIGNED  NOT NULL, v VARCHAR(25) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS member_node ( id INT (10) UNSIGNED  NOT NULL, id_node INT (10) UNSIGNED  NOT NULL, id_relation INT (10) UNSIGNED  NOT NULL, id_role INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_relation) REFERENCES relation(id), FOREIGN KEY (id_role) REFERENCES role(id) ); CREATE TABLE IF NOT EXISTS member_way ( id INT (10) UNSIGNED  NOT NULL, id_way INT (10) UNSIGNED  NOT NULL, id_relation INT (10) UNSIGNED  NOT NULL, id_role INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id),FOREIGN KEY (id_relation) REFERENCES relation(id), FOREIGN KEY (id_role) REFERENCES role(id) ); CREATE TABLE IF NOT EXISTS member_relation ( id INT (10) UNSIGNED  NOT NULL, id_rel INT (10) UNSIGNED  NOT NULL, id_relation INT (10) UNSIGNED  NOT NULL, id_role INT (10) UNSIGNED  NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_relation) REFERENCES relation(id), FOREIGN KEY (id_role) REFERENCES role(id) );\t INSERT INTO `tag_key` (`id`,`k`) VALUES  ('1',  'aerialway'),('2',  'aeroway'),('3',  'amenity'),('4',  'barrier'),('5',  'boundary'),('6',  'building'),('7',  'craft'),('8',  'emergency'),('9',  'geological'),('10',  'highway'),('11',  'historic'),('12',  'landuse'),('13',  'leisure'),('14',  'man_made'),('15',  'military'),('16',  'natural'),('17',  'office'),('18',  'place'),('19','cycleway'),('20','bridge'),('21',  'power'),('22',  'public_transport'),('23',  'railway'),('24',  'route'),('25',  'shop'),('26',  'sport'),('27',  'tourism'),('28',  'waterway'),('29','tunnel'),('30','type'),('31','admin_level'),('100',  'addr:housenumber'),('101',  'addr:housename'),('102',  'addr:street'),('103',  'addr:place'),('104',  'addr:postcode'),('105',  'addr:city'),('106',  'addr:country'),('107',  'addr:province'),('108',  'addr:state'),('109',  'addr:interpolation'),('110',  'attribution'),('111',  'description'),('112',  'email'),('113',  'fax'),('114',  'phone'),('115',  'name'),('116',  'official_name');  <\/code><\/pre>\n<h6>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/h6>\n<p>  <b>node <\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, <i>lat, lon<\/i> \u2013 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b.<br \/>  <b>way<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447.<br \/>  <b>relation <\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. <br \/>  <b>nd <\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/u>), <i>id_way <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>way<\/i>,<i> id_node<\/i> \u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>node<\/i>.<br \/>  <b>tag_key<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, <i>k<\/i> \u2013 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (<u>\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430<\/u>)<br \/>  <b>tag_value<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/u>), <i>v<\/i> \u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (<u>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430<\/u>), <b>id_tag_key<\/b> \u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <i>tag_key<\/i>.<br \/>  <b>node_tag<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/u>), <i>id_node<\/i> \u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>node<\/i>, <i>id_tag <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <i>tag_value<\/i>.<br \/>  <b>way _ tag<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/u>), <i>id_way <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>way<\/i>, <i>id_tag <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <i>tag_value<\/i>.<br \/>  <b>relation_tag<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/u>), <i>id_relation <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>relation<\/i>, <i>id_tag<\/i> \u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <i>tag_value<\/i>.<br \/>  <b>role<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/u>), <i>v<\/i> \u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (<u>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430<\/u>).<br \/>  <b>member_node <\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 member<\/u>), <i>id_node <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>node<\/i>, <i>id_relation <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>relation<\/i>.<br \/>  <b>member_way <\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 member<\/u>), <i>id_way <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>way<\/i>, <i>id_relation <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>relation<\/i>.<br \/>  <b>member_ relation<\/b>: <i>id <\/i>\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(<u>\u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 member<\/u>), <i>id_rel <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>relation<\/i>, <i>id_relation <\/i>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <i>id <\/i>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>relation<\/i>.<\/p>\n<h5>\u041a\u043e\u0434<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\"> public final class SqlDriver { \tprivate long iTagKey; \tprivate long iTagUK; \tprivate long iTagValue; \tprivate long iTagUValue; \tprivate long iNd; \tprivate long iTagNode; \tprivate long iTagWay; \tprivate long iTagRelation; \tprivate long iMember; \tprivate long iRole; \tprivate Statement statement; \tprivate Connection connection; \tprivate Window window; \tprivate Element e;  \tpublic SqlDriver(Window w) { \t\tthis.window = w; \t\tthis.iRole = 1; \t\tthis.iNd = 1; \t\tthis.iMember = 1; \t\tthis.iTagNode = 1; \t\tthis.iTagWay = 1; \t\tthis.iTagRelation = 1; \t\tthis.iTagUK = 1; \t\tthis.iTagUValue = 1; \t\tthis.iTagValue = 1; \t\tthis.e = new Element(&quot;node&quot;, 0); \t} \/\/\u041f\u043e\u0438\u0441\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d, \u0432\u0435\u0440\u043d\u0435\u0442 true \u0438 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \tprivate boolean initStart() { \t\tboolean result = false; \t\tif (update(&quot;USE &quot; + window.getDbNameValue().getText()) &gt;= 0) { \t\t\ttry { \t\t\t\tResultSet rs = execute(&quot;SELECT * FROM `relation`  ORDER BY `id` DESC LIMIT 1&quot;); \t\t\t\tif (rs != null) { \t\t\t\t\tif (rs.next()) { \t\t\t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\t\t\tupdate(&quot;DELETE FROM `member_node` WHERE `id_relation` = &quot; \t\t\t\t\t\t\t\t+ id); \t\t\t\t\t\tupdate(&quot;DELETE FROM `member_way` WHERE `id_relation` = &quot; \t\t\t\t\t\t\t\t+ id); \t\t\t\t\t\tupdate(&quot;DELETE FROM `member_relation` WHERE `id_relation` = &quot; \t\t\t\t\t\t\t\t+ id); \t\t\t\t\t\tupdate(&quot;DELETE FROM `relation_tag` WHERE `id_relation` = &quot; \t\t\t\t\t\t\t\t+ id); \t\t\t\t\t\tthis.e = new Element(&quot;relation&quot;, id); \t\t\t\t\t\trs.close(); \t\t\t\t\t\trs = null; \t\t\t\t\treturn true;                                         } \t\t\t\t}  \t\t\t\trs = execute(&quot;SELECT * FROM `way` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\t\tif (rs != null) { \t\t\t\t\tif (rs.next()) { \t\t\t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\t\t\tupdate(&quot;DELETE FROM `way_tag` WHERE `id_way` = &quot; + id); \t\t\t\t\t\tupdate(&quot;DELETE FROM `nd` WHERE `id_way` = &quot; + id); \t\t\t\t\t\tthis.e = new Element(&quot;way&quot;, id); \t\t\t\t\t\trs.close(); \t\t\t\t\t\trs = null;                                                return true; \t\t\t\t\t} \t\t\t\t} \t\t\t\trs = execute(&quot;SELECT * FROM `node` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\t\tif (rs != null) { \t\t\t\t\tif (rs.next()) { \t\t\t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\t\t\tupdate(&quot;DELETE FROM `node_tag` WHERE `id_node` = &quot; + id); \t\t\t\t\t\tthis.e = new Element(&quot;node&quot;, id); \t\t\t\t\t\trs.close(); \t\t\t\t\t\trs = null;                                                 return true; \t\t\t\t\t} \t\t\t\t} \t\t\t} catch (SQLException e) { \t\t\t\tSystem.out.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430&quot;); \t\t\t} \t\t} \t\treturn result; \t} \/\/\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432(\u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432) \u0434\u043b\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \tprivate void setIndex() { \t\ttry { \t\t\tResultSet rs = execute(&quot;SELECT `id` FROM `member_node` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiMember = rs.getLong(&quot;id&quot;); \t\t\t\tSystem.out.println(&quot;iMemberNode: &quot; + iMember); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `member_relation` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiMember = iMember &gt; rs.getLong(&quot;id&quot;) ? iMember : rs \t\t\t\t\t\t.getLong(&quot;id&quot;); \t\t\t\tSystem.out.println(&quot;iMemberRelation: &quot; + iMember); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `member_way` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiMember = iMember &gt; rs.getLong(&quot;id&quot;) ? iMember : rs \t\t\t\t\t\t.getLong(&quot;id&quot;); \t\t\t\tSystem.out.println(&quot;iMemberWay: &quot; + iMember); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\tiMember++; \t\t\trs = execute(&quot;SELECT `id` FROM `nd` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiNd = rs.getLong(&quot;id&quot;) + 1; \t\t\t\tSystem.out.println(&quot;iNd: &quot; + iNd); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `node_tag` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiTagNode = rs.getLong(&quot;id&quot;) + 1; \t\t\t\tSystem.out.println(&quot;iTagNode: &quot; + iTagNode); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `relation_tag` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiTagRelation = rs.getLong(&quot;id&quot;) + 1; \t\t\t\tSystem.out.println(&quot;iTagRelation: &quot; + iTagRelation); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `role` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiRole = rs.getLong(&quot;id&quot;) + 1; \t\t\t\tSystem.out.println(&quot;iRole: &quot; + iRole); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `tag_value` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiTagValue = rs.getLong(&quot;id&quot;) + 1; \t\t\t\tSystem.out.println(&quot;iTagValue: &quot; + iTagValue); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\trs = execute(&quot;SELECT `id` FROM `way_tag` ORDER BY `id` DESC LIMIT 1&quot;); \t\t\tif (rs.next()) { \t\t\t\tiTagWay = rs.getLong(&quot;id&quot;) + 1; \t\t\t\tSystem.out.println(&quot;iTagWay: &quot; + iTagWay); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t}  \t} \/\/\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0445\u0435\u043c\u044b \u0435\u0441\u043b\u0438 \u0411\u0414 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e  \tpublic void loadSchema() { \t\tif (initStart()) { \t\t\twindow.addLog(&quot;\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430&quot;); \t\t\tsetIndex(); \t\t} else { \t\t\twindow.addLog(&quot;\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0445\u0435\u043c\u0443&quot;); \t\t\tupdate(&quot;CREATE DATABASE IF NOT EXISTS &quot; \t\t\t\t\t+ window.getDbNameValue().getText()); \t\t\tupdate(&quot;USE &quot; + window.getDbNameValue().getText()); \t\t\tgetShema(&quot;shema.sh&quot;);  \t\t}  \t} \/\/\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0411\u0414 \tpublic boolean getConnection() { \t\tString url = window.getUrlValue().getText(); \t\tString user = window.getUserValue().getText(); \t\tString pass = window.getPassValue().getText(); \t\twindow.addLog(&quot;Connected to: &quot; + url); \t\tboolean result = false; \t\ttry { \t\t\tDriverManager.registerDriver(new com.mysql.jdbc.Driver()); \t\t\tconnection = DriverManager.getConnection(url, user, pass); \t\t\tif (connection != null) { \t\t\t\twindow.addLog(&quot;Connection Successful !\\n&quot;); \t\t\t\tresult = true; \t\t\t} \t\t\tif (connection == null) { \t\t\t\twindow.addLog(&quot;Connection Error !\\n&quot;); \t\t\t\tresult = false; \t\t\t} \t\t\tstatement = connection.createStatement(); \t\t} catch (SQLException e) { \t\t\twindow.addLog(e.toString()); \t\t\tresult = false; \t\t} \t\treturn result; \t}  \tpublic int update(String sql) {  \t\tint rs = -1; \t\ttry { \t\t\trs = statement.executeUpdate(sql); \t\t} catch (SQLException e) { \t\t} \t\tSystem.out.println(&quot;sql [&quot; + rs + &quot;]-&gt; &quot; + sql); \t\treturn rs; \t}  \tpublic ResultSet execute(String sql) { \t\tResultSet rs = null; \t\ttry { \t\t\trs = this.statement.executeQuery(sql); \t\t} catch (SQLException e) { \t\t\tSystem.out.println(&quot;sql [ ]&lt;- &quot; + sql); \t\t} \t\treturn rs; \t} \/\/\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 \tpublic ArrayList&lt;Element&gt; getTagKey() { \t\tArrayList&lt;Element&gt; tagKey = new ArrayList&lt;Element&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM  `tag_key`&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;k&quot;); \t\t\t\tElement e = new Element(name, id); \t\t\t\ttagKey.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tagKey; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tagKey; \t} \/\/\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \tpublic ArrayList&lt;TagElement&gt; getHouseNumber() { \t\tArrayList&lt;TagElement&gt; tag = new ArrayList&lt;TagElement&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM `tag_value` WHERE `id_tag_key` = 100&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;v&quot;); \t\t\t\tTagElement e = new TagElement(id, name, 100); \t\t\t\ttag.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tag; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tag; \t}  \tpublic ArrayList&lt;TagElement&gt; getCity() { \t\tArrayList&lt;TagElement&gt; tag = new ArrayList&lt;TagElement&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM `tag_value` WHERE `id_tag_key` = 105&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;v&quot;); \t\t\t\tTagElement e = new TagElement(id, name, 105); \t\t\t\ttag.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tag; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tag; \t} \tpublic ArrayList&lt;TagElement&gt; getStreet() { \t\tArrayList&lt;TagElement&gt; tag = new ArrayList&lt;TagElement&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM `tag_value` WHERE `id_tag_key` = 102&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;v&quot;); \t\t\t\tTagElement e = new TagElement(id, name, 102); \t\t\t\ttag.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tag; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tag; \t}  \tpublic ArrayList&lt;TagElement&gt; getPostCode() { \t\tArrayList&lt;TagElement&gt; tag = new ArrayList&lt;TagElement&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM `tag_value` WHERE `id_tag_key` = 104&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;v&quot;); \t\t\t\tTagElement e = new TagElement(id, name, 104); \t\t\t\ttag.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tag; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tag; \t}  \tpublic ArrayList&lt;TagElement&gt; getName() { \t\tArrayList&lt;TagElement&gt; tag = new ArrayList&lt;TagElement&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM `tag_value` WHERE `id_tag_key` = 115&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;v&quot;); \t\t\t\tTagElement e = new TagElement(id, name, 115); \t\t\t\ttag.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tag; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tag; \t}  \tpublic ArrayList&lt;TagElement&gt; getCountry() { \t\tArrayList&lt;TagElement&gt; tag = new ArrayList&lt;TagElement&gt;(); \t\tResultSet rs = execute(&quot;SELECT * FROM `tag_value` WHERE `id_tag_key` = 106&quot;); \t\ttry { \t\t\twhile (rs.next()) { \t\t\t\tlong id = rs.getLong(&quot;id&quot;); \t\t\t\tString name = rs.getString(&quot;v&quot;); \t\t\t\tTagElement e = new TagElement(id, name, 32); \t\t\t\ttag.add(e); \t\t\t} \t\t\trs.close(); \t\t\trs = null; \t\t\treturn tag; \t\t} catch (SQLException e) { \t\t\te.printStackTrace(); \t\t} \t\treturn tag; \t} \/\/\u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.  \tpublic boolean insertNode(long id, float lat, float lon) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `node`(`id`, `lat`, `lon`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, id); \t\t\tps.setFloat(2, lat); \t\t\tps.setFloat(3, lon); \t\t\tps.executeUpdate(); \t\t\tps.close(); \t\t\tps = null; \t\t\tresult = true; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `node`(`id`, `lat`, `lon`) VALUES (&quot; \t\t\t\t\t\t\t+ id + &quot;, &quot; + lat + &quot;, &quot; + lon + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertWay(long id) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `way`(`id`) VALUES (?)&quot;); \t\t\tps.setLong(1, id); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t} catch (SQLException e) { \t\t\tSystem.out.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `way`(`id`) VALUES (&quot; + id \t\t\t\t\t+ &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertRelation(long id) {  \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `relation`(`id`) VALUES (?)&quot;); \t\t\tps.setLong(1, id); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t} catch (SQLException e) { \t\t\tSystem.out.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `relation`(`id`) VALUES (&quot; \t\t\t\t\t+ id + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertNd(long idWay, long idNode) {  \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `nd`(`id`,`id_way`,`id_node`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, this.iNd); \t\t\tps.setLong(2, idWay); \t\t\tps.setLong(3, idNode); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tthis.iNd++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `nd`(`id`,`id_way`,`id_node`)  VALUES (&quot; \t\t\t\t\t\t\t+ this.iNd + &quot;, &quot; + idWay + &quot;, &quot; + idNode + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertTagKey(String k) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `tag_key`(`id`,`k`) VALUES (?,?)&quot;); \t\t\tps.setLong(1, iTagKey); \t\t\tps.setString(2, k); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiTagKey++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `tag_key`(`id`,`k`)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagKey + &quot;, &quot; + k + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertUcertainKey(String k) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `uncertain_key`(`id`,`k`) VALUES (?,?)&quot;); \t\t\tps.setLong(1, iTagUK); \t\t\tps.setString(2, k); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiTagUK++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `uncertain_key`(`id`,`k`)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagUK + &quot;, &quot; + k + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertTagValue(String v, Long id) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `tag_value`(`id`,`v`,`id_tag_key`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, iTagValue); \t\t\tps.setString(2, v); \t\t\tps.setLong(3, id); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiTagValue++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `tag_value`(`id`,`v`,,`id_tag_key)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagValue + &quot;, &quot; + v + &quot;,&quot; + id + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertUcertainValue(String v, int idKey) {  \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `uncertain_value`(`id`,`v`,`id_tag_key`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, iTagUValue); \t\t\tps.setString(2, v); \t\t\tps.setInt(3, idKey); \t\t\tps.executeUpdate(); \t\t\tps.close(); \t\t\tps = null; \t\t\tresult = true; \t\t\tiTagUValue++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `uncertain_value`(`id`,`v`,`id_tag_key)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagUValue + &quot;, &quot; + v + &quot;,&quot; + idKey + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertNodeTag(long idNode, long idTag) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `node_tag`(`id`,`id_node`,`id_tag`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, iTagNode); \t\t\tps.setLong(2, idNode); \t\t\tps.setLong(3, idTag); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiTagNode++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `node_tag`(`id`,`id_node`,`id_tag)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagNode + &quot;, &quot; + idNode + &quot;,&quot; + idTag + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertWayTag(long idWay, long l) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `way_tag`(`id`,`id_way`,`id_tag`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, iTagWay); \t\t\tps.setLong(2, idWay); \t\t\tps.setLong(3, l); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiTagWay++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `way_tag`(`id`,`id_way`,`id_tag)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagWay + &quot;, &quot; + idWay + &quot;,&quot; + l + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertRelationTag(long idRelation, long idValue) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `relation_tag`(`id`,`id_relation`,`id_tag`) VALUES (?,?,?)&quot;); \t\t\tps.setLong(1, iTagRelation); \t\t\tps.setLong(2, idRelation); \t\t\tps.setLong(3, idValue); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiTagRelation++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `relation_tag`(`id`,`id_relation`,`id_tag)  VALUES (&quot; \t\t\t\t\t\t\t+ iTagRelation \t\t\t\t\t\t\t+ &quot;, &quot; \t\t\t\t\t\t\t+ idRelation \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idValue \t\t\t\t\t\t\t+ &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertMemberNode(long idNode, long idRelation, long idRole) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `member_node` (`id`,`id_node`, `id_relation`, `id_role` ) VALUES (?,?,?,?)&quot;); \t\t\tps.setLong(1, iMember); \t\t\tps.setLong(2, idNode); \t\t\tps.setLong(3, idRelation); \t\t\tps.setLong(4, idRole); \t\t\tps.executeUpdate(); \t\t\tresult = true; \t\t\tps.close(); \t\t\tps = null; \t\t\tiMember++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `member_node`(`id`,`id_node`,`id_relation`, `id_role`)  VALUES (&quot; \t\t\t\t\t\t\t+ iMember \t\t\t\t\t\t\t+ &quot;, &quot; \t\t\t\t\t\t\t+ idNode \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idRelation \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idRole + &quot;)&quot;); \t\t} \t\treturn result; \t}  \tpublic boolean insertMemberWay(long idWay, long idRelation, long idRole) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `member_way` (`id`,`id_way`, `id_relation`, `id_role` ) VALUES (?,?,?,?)&quot;); \t\t\tps.setLong(1, iMember); \t\t\tps.setLong(2, idWay); \t\t\tps.setLong(3, idRelation); \t\t\tps.setLong(4, idRole); \t\t\tps.executeUpdate(); \t\t\tps.close(); \t\t\tps = null; \t\t\tresult = true; \t\t\tiMember++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `member_way`(`id`,`id_way`,`id_relation`, `id_role`)  VALUES (&quot; \t\t\t\t\t\t\t+ iMember \t\t\t\t\t\t\t+ &quot;, &quot; \t\t\t\t\t\t\t+ idWay \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idRelation \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idRole + &quot;)&quot;);  \t\t} \t\treturn result; \t}  \tpublic boolean insertMemberRelation(long idRel, long idRelation, long idRole) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `member_relation` (`id`,`id_rel`, `id_relation`, `id_role` ) VALUES (?,?,?,?)&quot;); \t\t\tps.setLong(1, iMember); \t\t\tps.setLong(2, idRel); \t\t\tps.setLong(3, idRelation); \t\t\tps.setLong(4, idRole); \t\t\tps.executeUpdate(); \t\t\tps.close(); \t\t\tps = null; \t\t\tresult = true; \t\t\tiMember++; \t\t} catch (SQLException e) { \t\t\tSystem.out \t\t\t\t\t.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! INSERT INTO `member_relation`(`id`,`id_way`,`id_relation`, `id_role`)  VALUES (&quot; \t\t\t\t\t\t\t+ iMember \t\t\t\t\t\t\t+ &quot;, &quot; \t\t\t\t\t\t\t+ idRel \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idRelation \t\t\t\t\t\t\t+ &quot;,&quot; \t\t\t\t\t\t\t+ idRole + &quot;)&quot;);  \t\t} \t\treturn result; \t}  \tpublic boolean insertRole(String v) { \t\tboolean result = false; \t\ttry { \t\t\tPreparedStatement ps = connection \t\t\t\t\t.prepareStatement(&quot;INSERT INTO `role` (`id`,`v`) VALUES (?,?)&quot;); \t\t\tps.setLong(1, iRole); \t\t\tps.setString(2, v); \t\t\tps.executeUpdate(); \t\t\tps.close(); \t\t\tps = null; \t\t\tresult = true; \t\t\tiRole++; \t\t} catch (SQLException e) { \t\t\tSystem.out.println(&quot;\u041e\u0448\u0438\u0431\u043a\u0430&quot; + e.getMessage() \t\t\t\t\t+ &quot;! INSERT INTO `role`(`id`,`v`)  VALUES (&quot; + iRole + &quot;, &quot; \t\t\t\t\t+ v + &quot;)&quot;); \t\t} \t\treturn result; \t} \/\/\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0441\u0445\u0435\u043c\u044b \tprivate void getShema(String file) { \t\tBufferedReader shema = null; \t\ttry { \t\t\tshema = new BufferedReader(new FileReader(file));  \t\t\tString line; \t\t\tline = shema.readLine(); \t\t\twhile (line != null) { \t\t\t\tupdate(line); \t\t\t\tline = shema.readLine(); \t\t\t}  \t\t} catch (FileNotFoundException e) { \t\t\te.printStackTrace(); \t\t} catch (IOException e) { \t\t\te.printStackTrace(); \t\t} finally { \t\t\ttry { \t\t\t\tshema.close(); \t\t\t\tshema = null; \t\t\t} catch (IOException e) { \t\t\t\te.printStackTrace(); \t\t\t} \t\t} \t} } <\/code><\/pre>\n<p>  <\/p>\n<h5>\u041b\u043e\u0433\u0438\u043a\u0430<\/h5>\n<pre><code class=\"java\">\/\/ver 1.0 public class LogicOSM { \tprivate Element eParent; \tprivate SqlDriver sql; \tprivate ArrayList&lt;Element&gt; role; \tprivate ArrayList&lt;Element&gt; tagKey; \tprivate ArrayList&lt;TagElement&gt; tagValue; \tprivate ArrayList&lt;TagElement&gt; houseNumber; \tprivate ArrayList&lt;TagElement&gt; postCode; \tprivate ArrayList&lt;TagElement&gt; street; \tprivate ArrayList&lt;TagElement&gt; name; \tprivate ArrayList&lt;TagElement&gt; country;  \tpublic LogicOSM(SqlDriver sql) { \t\tthis.sql = sql;                 \/\/\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \t\tthis.tagKey = sql.getTagKey(); \t\tthis.tagValue = sql.getTagValue(); \t\tthis.houseNumber = sql.getHouseNumber(); \t\tthis.postCode = sql.getPostCode(); \t\tthis.street = sql.getStreet(); \t\tthis.postCode = sql.getPostCode(); \t\tthis.name = sql.getName(); \t\tthis.country = sql.getCountry(); \t\tthis.role = new ArrayList&lt;Element&gt;(); \t}        \/\/\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c id \u043a\u043b\u044e\u0447\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \tpublic long getTagKeyId(String key) { \t\tlong id = -1; \t\tfor (Element e : tagKey) { \t\t\tif (e.getName().equals(key)) { \t\t\t\tid = e.getId(); \t\t\t\treturn id; \t\t\t} \t\t} \t\treturn id; \t}         \/\/\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 Tag, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0435\u0441\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \tpublic TagElement getTag(Long id, String value) { \t\tTagElement tagElement; \t\tif (id &lt; 100) { \t\t\tfor (TagElement tE : this.tagValue) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.tagValue.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} else if (id == 100) { \t\t\tfor (TagElement tE : this.houseNumber) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.houseNumber.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} else if (id == 102) { \t\t\tfor (TagElement tE : this.street) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.street.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} else if (id == 104) { \t\t\tfor (TagElement tE : this.postCode) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.postCode.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} else if (id == 105) { \t\t\tfor (TagElement tE : this.city) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.city.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t}  \t\telse if (id == 106) { \t\t\tfor (TagElement tE : this.country) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.country.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} else if (id == 115) { \t\t\tfor (TagElement tE : this.name) { \t\t\t\tif ((tE.getName().equals(value)) && (tE.getKeyId() == id)) { \t\t\t\t\ttagElement = new TagElement(tE.getId(), value, id); \t\t\t\t\treturn tagElement; \t\t\t\t} \t\t\t} \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tthis.name.add(tagElement); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} else { \t\t\ttagElement = new TagElement(sql.getiTagValue(), value, id); \t\t\tsql.insertTagValue(value, id); \t\t\treturn tagElement; \t\t} \t}        \/\/\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 role \tpublic long getRoleIndex(String r) { \t\tlong index = 1; \t\tfor (Element e : this.role) { \t\t\tif (e.getName().equals(r)) { \t\t\t\tindex = e.getId(); \t\t\t\treturn index; \t\t\t} \t\t} \t\tsql.insertRole(r); \t\tindex = sql.getiRole(); \t\tElement e = new Element(r, index); \t\trole.add(e);  \t\treturn index; \t}         \/\/\u041c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u0430\u0440\u0441\u0435\u0440\u0430, \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b         \/\/\u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0433\u043e \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443  \tpublic void newElement(String eName, Attributes attr) { \t\tswitch (eName) { \t\tcase &quot;node&quot;: \t\t\tNode node = new Node(attr); \t\t\teParent = null; \t\t\teParent = new Element(&quot;node&quot;, node.getId()); \t\t\tsql.insertNode(node.getId(), node.getLat(), node.getLon()); \t\t\tnode = null; \t\t\tbreak; \t\tcase &quot;way&quot;: \t\t\tWay way = new Way(attr); \t\t\teParent = null; \t\t\teParent = new Element(&quot;way&quot;, way.getId()); \t\t\tsql.insertWay(way.getId()); \t\t\tway = null; \t\t\tbreak; \t\tcase &quot;relation&quot;: \t\t\tRelation relation = new Relation(attr); \t\t\teParent = null; \t\t\teParent = new Element(&quot;relation&quot;, relation.getId()); \t\t\tsql.insertRelation(relation.getId()); \t\t\trelation = null; \t\t\tbreak; \t\tcase &quot;nd&quot;: \t\t\tNd nd = new Nd(attr); \t\t\tsql.insertNd(eParent.getId(), nd.getRef()); \t\t\tnd = null; \t\t\tbreak; \t\tcase &quot;member&quot;: \t\t\tMember member = new Member(attr); \t\t\tlong idRole = this.getRoleIndex(member.getRole()); \t\t\tif (member.getType().equals(&quot;node&quot;)) { \t\t\t\tsql.insertMemberNode(member.getRef(), eParent.getId(), idRole);  \t\t\t} else if (member.getType().equals(&quot;way&quot;)) { \t\t\t\tsql.insertMemberWay(member.getRef(), eParent.getId(), idRole); \t\t\t} else if (member.getType().equals(&quot;relation&quot;)) { \t\t\t\tsql.insertMemberRelation(member.getRef(), eParent.getId(), \t\t\t\t\t\tidRole); \t\t\t} else { \t\t\t\t\/\/ error \t\t\t} \t\t\tmember = null; \t\t\tbreak; \t\tcase &quot;tag&quot;: \t\t\tTag tag = new Tag(attr); \t\t\tlong keyId = getTagKeyId(tag.getK()); \t\t\tif (keyId &gt; 0) { \t\t\t\tTagElement tagElement = this.getTag(keyId, tag.getV()); \t\t\t\tif (eParent.getName().equals(&quot;node&quot;)) { \t\t\t\t\tsql.insertNodeTag(eParent.getId(), tagElement.getId()); \t\t\t\t} else if (eParent.getName().equals(&quot;way&quot;)) { \t\t\t\t\tsql.insertWayTag(eParent.getId(), tagElement.getId()); \t\t\t\t} else if (eParent.getName().equals(&quot;relation&quot;)) { \t\t\t\t\tsql.insertRelationTag(eParent.getId(), tagElement.getId()); \t\t\t\t} else { \t\t\t\t\t\/\/ error \t\t\t\t} \t\t\t} \t\t\ttag = null; \t\t\tbreak; \t\t}  \t} }  &lt;source lang=&quot;java&quot;&gt; <\/code><\/pre>\n<h5>SAX \u043f\u0430\u0440\u0441\u0435\u0440 XML<\/h5>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043e\u043a\u043d\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <b>Progress Bar<\/b> \u0447\u0442\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u0430, \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0411\u0414.  <\/p>\n<h5>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 XML<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">public class XML extends Thread { \tprivate Window window; \tprivate SqlDriver sql; \tpublic XML(SqlDriver sql, Window window ) \t{ \t\tthis.window = window; \t\tthis.sql = sql; \t} \t@Override \tpublic void run() \t{ \t\t SAXParserFactory factory = SAXParserFactory.newInstance(); \t        factory.setValidating(false); \t        factory.setNamespaceAware(false); \t        SAXParser parser; \t        InputStream xmlData = null; \t        try \t        { \t          xmlData = new FileInputStream(window.getFilePathValue().getText()); \t          parser = factory.newSAXParser(); \t           \t          XMLReader reader = new XMLReader(); \t          window.addLog(&quot;\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043a \u0447\u0442\u0435\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u0430&quot;); \t          parser.parse(xmlData, reader); \t          window.addLog(&quot;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0432\u043e \u0441\u0442\u0440\u043e\u043a: &quot; + Long.toString(reader.getLine())); \t          window.addLog(&quot;node: &quot; + Long.toString(reader.getNode())); \t          window.addLog(&quot;way: &quot; + Long.toString(reader.getWay())); \t          window.addLog(&quot;relation: &quot; + Long.toString(reader.getRelation())); \t          window.addLog(&quot;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 MySQL&quot;); \t          xmlData.close(); \t          xmlData = new FileInputStream(window.getFilePathValue().getText()); \t          XMLParser xml =new XMLParser(sql, window, reader.getLine()); \t          parser.parse(xmlData, xml); \t        } catch (FileNotFoundException e) \t        { \t            e.printStackTrace(); \t            \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043a\u0438, \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \t        } catch (ParserConfigurationException e) \t        { \t            e.printStackTrace(); \t            \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 Parser \t        } catch (SAXException e) \t        { \t            e.printStackTrace(); \t            \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 SAX \t        } catch (IOException e) \t        { \t            e.printStackTrace(); \t            \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0432\u043e\u0434\u0430 \t        }  \t}\t  \t} <\/code><\/pre>\n<p>  <\/p>\n<h5>XML Reader<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">public class XMLReader extends DefaultHandler { \tprivate long line; \tprivate long node; \tprivate long way; \tprivate long relation;  \tpublic XMLReader() { \t\tthis.line = 0; \t\tthis.node = 0; \t\tthis.way = 0; \t\tthis.relation = 0; \t} \t@Override \tpublic void startElement(String uri, String name, String eName, \t\t\tAttributes atts) { \t\tthis.line++; \t\tif (eName.equals(&quot;way&quot;)) \t\t\tthis.way++; \t\tif (eName.equals(&quot;node&quot;)) \t\t\tthis.node++; \t\tif (eName.equals(&quot;relation&quot;)) \t\t\tthis.relation++;                }  \t@Override \tpublic void endElement(String uri, String name, String eName) {  \t}  \t@Override \tpublic void startDocument() throws SAXException { \t\tsuper.startDocument();  \t}  \t@Override \tpublic void endDocument() throws SAXException { \t\tsuper.endDocument();  \t} } <\/code><\/pre>\n<p>  <\/p>\n<h5>XML Parser<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">public class XMLParser extends DefaultHandler { \tprivate int ipmplement; \tprivate long line; \tprivate LogicOSM logic; \tprivate Window widnow; \tprivate long onePercent; \tprivate long nextPercent; \tprivate boolean extension; \tprivate String elemName; \tprivate Long idStart;  \tpublic XMLParser(SqlDriver sql, Window window, long maxLine) { \t\tthis.line = 1; \t\tthis.widnow = window; \t\tthis.logic = new LogicOSM(sql); \t\tthis.onePercent = (long) (maxLine \/ 1000); \t\tthis.nextPercent = onePercent; \t\tif (sql.getE().getId() != 0) { \t\t\tthis.extension = true; \t\t\tthis.elemName = sql.getE().getName(); \t\t\tthis.idStart = sql.getE().getId(); \t\t\tthis.ipmplement = 0; \t\t} else \t\t\tthis.extension = false; \t}  \t@Override \tpublic void startElement(String uri, String name, String eName, \t\t\tAttributes atts) { \t\tif (ipmplement == 0) { \t\t\t\/\/ root element \t\t} else if (!extension) { \t\t\tlogic.newElement(eName, atts); \t\t} else { \t\t\tif (eName.equals(this.elemName)) { \t\t\t\tLong id = Long.valueOf(atts.getValue(&quot;&quot;, &quot;id&quot;)); \t\t\t\tif (id.equals(this.idStart)) { \t\t\t\t\textension = false; \t\t\t\t\tthis.widnow.addLog(&quot;\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440&quot;); \t\t\t\t\tlogic.newElement(eName, atts); \t\t\t\t} \t\t\t} \t\t} \t\tipmplement++; \t\tthis.line++; \t\tif (this.line &gt; this.nextPercent) { \t\t\tthis.nextPercent += this.onePercent; \t\t\tint curVal = this.widnow.getProgressBar().getValue(); \t\t\tint newVal = curVal + 1; \t\t\tthis.widnow.getProgressBar().setValue(newVal); \t\t\tthis.widnow.getProgressBar().setString( \t\t\t\t\tString.valueOf(((double) newVal) \/ 10) + &quot;%&quot;); \t\t} \t}  \t@Override \tpublic void endElement(String uri, String name, String eName) { \t\tipmplement--; \t}  \t@Override \tpublic void startDocument() throws SAXException {  \t\tthis.widnow.addLog(&quot;\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430!&quot;); \t\tif (extension) { \t\t\tthis.widnow.addLog(&quot;\u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0443\u0436\u0435 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d&quot;); \t\t\tthis.widnow.addLog(&quot;\u0418\u0449\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442: &quot; + this.elemName + &quot; id=&quot; \t\t\t\t\t+ this.idStart); \t\t} \t\tsuper.startDocument(); \t}  \t@Override \tpublic void endDocument() throws SAXException { \t\tsuper.endDocument(); \t\tthis.widnow.addLog(&quot;\u0420\u0430\u0437\u0431\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0435\u043d!&quot;); \t\tthis.widnow.addLog(&quot;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a: &quot; + this.line); \t} } <\/code><\/pre>\n<h5>\u041d\u0443 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">public class Controler{ \tprivate final Window window; \tprivate final SqlDriver sql; \t public Controler() { \tthis.window = new Window(); \twindow.start(); \tthis.sql = new SqlDriver(window); } public void init() { \tSystem.out.println(&quot;\u041c\u0435\u0442\u043e\u0434 run \u0438\u0437 Controller&quot;); \ttry { \t\twindow.getFrame().setVisible(true); \t\twindow.addLog(&quot;Hello&quot;); \t\twindow.getConnected().addActionListener(new ActionListener() { \t\t\t @Override  \t            public void actionPerformed(ActionEvent e) {  \t\t\t\tif(sql.getConnection()) sql.loadSchema(); \t\t\t\twindow.getConnected().setEnabled(false); \t\t\t\twindow.getExport().setEnabled(true); \t\t\t\t} \t\t}); \t\twindow.getExport().addActionListener(new ActionListener() { \t\t\t @Override  \t            public void actionPerformed(ActionEvent e) {  \t\t\t\t window.addLog(&quot;Export&quot;); \t\t\t\t window.getExport().setEnabled(false); \t\t\t\t XML xml = new XML(sql, window); \t\t\t\t xml.start(); \t\t\t } \t\t}); \t\t \t} catch (Exception e) { \t\te.printStackTrace(); \t} } <\/code><\/pre>\n<p>  <\/p>\n<h5>\u0418 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h5>\n<p>  <img decoding=\"async\" src=\"http:\/\/i047.radikal.ru\/1311\/01\/f62efe8f8060.jpg\" alt=\"image\"\/> \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\/post\/200902\/\"> http:\/\/habrahabr.ru\/post\/200902\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 \u0443\u043b\u0438\u0446 \u0438 \u0434\u043e\u043c\u043e\u0432 \u041c\u0438\u043d\u0441\u043a\u0430. \u041a\u0430\u043a\u043e\u0432\u043e \u0436\u0435 \u0431\u044b\u043b\u043e \u043c\u043e\u0435 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u043f\u043e\u043b\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435\u0442, \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0443\u043b\u0438\u0446\u044b \u0438 \u0434\u043e\u043c\u0430. \u0412\u043e\u0442 \u0442\u0443\u0442 \u0438 \u043f\u0440\u0438\u0448\u0435\u043b \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 <b>OpenStreetMap <\/b>\u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u0411\u0435\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 xml \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043e\u0431\u044a\u0451\u043c\u043e\u043c \u0430\u0436 \u0446\u0435\u043b\u044b\u0445 2 \u0413\u0431 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u043e\u043c\u0430\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435:   <\/p>\n<pre><code class=\"xml\">&lt;way id=&quot;25324320&quot; &gt;   &lt;nd ref=&quot;275904968&quot;\/&gt;   &lt;nd ref=&quot;275904882&quot;\/&gt;   &lt;nd ref=&quot;275904881&quot;\/&gt;   &lt;nd ref=&quot;275904969&quot;\/&gt;   &lt;nd ref=&quot;275904968&quot;\/&gt;   &lt;tag k=&quot;addr:housenumber&quot; v=&quot;17&quot;\/&gt;   &lt;tag k=&quot;addr:postcode&quot; v=&quot;220013&quot;\/&gt;   &lt;tag k=&quot;addr:street&quot; v=&quot;\u0443\u043b\u0438\u0446\u0430 \u042f\u043a\u0443\u0431\u0430 \u041a\u043e\u043b\u0430\u0441\u0430&quot;\/&gt;   &lt;tag k=&quot;building&quot; v=&quot;yes&quot;\/&gt;  &lt;\/way&gt;   <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c 1.5 \u0413\u0431 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0449\u0435, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u044b \u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a. \u0422\u0430\u043a \u043c\u043d\u043e\u0439 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414. \u0421\u043a\u0430\u0437\u0430\u043d\u043e \u2013 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u044b: Eclipse(Java SE) \u0438 \u0434\u0436\u0435\u043d\u0442\u0435\u043b\u044c\u043c\u0435\u043d\u0441\u043a\u0438 \u043d\u0430\u0431\u043e\u0440 \u0434\u0435\u043d\u0432\u0435\u0440\u0430. <\/p>\n<h5>\u041d\u0435\u043c\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h5>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 xml \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u043e\u0447\u043a\u0430 (<b>node<\/b>), \u043b\u0438\u043d\u0438\u044f (<b>way<\/b>) \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 (<b>relation<\/b>). \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/04c\/854\/e15\/04c854e15e532c1d3a75256bbfa82db4.jpg\" alt=\"\u0421\u0445\u0435\u043c\u0430\"\/><\/p>\n<p>  <b>Node<\/b> \u2013 \u0442\u043e\u0447\u043a\u0430. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0445\u0440\u0430\u043d\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0430: \u0448\u0438\u0440\u043e\u0442\u0430, \u0434\u043e\u043b\u0433\u043e\u0442\u0430 (<b>lat<\/b>, <b>lon<\/b>). \u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0441\u0432\u043e\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <b>id<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441 <b>id <\/b> <b>way <\/b>\u0438\u043b\u0438 <b>relation<\/b>. \u0412 XML \u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"xml\">&lt;node id=&quot;1877995696&quot; lat=&quot;53.9216820&quot; lon=&quot;27.5883786&quot;\/&gt; <\/code><\/pre>\n<p>  <b>Way<\/b> \u2013\u043b\u0438\u043d\u0438\u044f. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u0435\u043a, \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>id<\/b>. <br \/>  \u0421\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u0435\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0433\u043e\u043c <b>nd<\/b>, \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <b>ref<\/b>, \u0433\u0434\u0435<b> ref<\/b> \u044d\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430<b> id <\/b>\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <b>node<\/b>. <br \/>  \u0412 XML \u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"xml\">&lt;way id=&quot;83643843&quot;&gt; &lt;nd ref=&quot;1270318960&quot;\/&gt;  &lt;nd ref=&quot;974055589&quot;\/&gt;  &lt;nd ref=&quot;974055636&quot;\/&gt;  &lt;nd ref=&quot;974055581&quot;\/&gt;  &lt;nd ref=&quot;974055604&quot;\/&gt; &lt;\/way&gt; <\/code><\/pre>\n<p>  <b>Relation <\/b>\u2013 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>id<\/b>. \u0421\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0433\u043e\u043c <b>member<\/b>. \u0422\u0435\u0433 <b>member <\/b>\u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432: <b>type <\/b>\u2013 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, <b>ref <\/b>\u2013 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <b>id <\/b>\u043e\u0431\u044a\u0435\u043a\u0442\u0430, <b>role <\/b>\u2013 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u043e\u043b\u0435\u0439, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. <br \/>  \u0414\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u0433 <b>Tag<\/b>, \u043e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 <b>k \u2013 key<\/b>(<i>\u043a\u043b\u044e\u0447<\/i>), <b>v- value<\/b>(<i>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/i>). \u0412 \u044d\u0442\u043e\u043c \u0442\u0435\u0433\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0435. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/wiki.openstreetmap.org\/wiki\/Map_Features\">\u0437\u0434\u0435\u0441\u044c <\/a>.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f \u043f\u043e\u0434\u0435\u043b\u0438\u043b \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0430\u0441\u0442\u0438:<\/h5>\n<p>  <b>1.<\/b> <i>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <\/i><br \/>  <b>2.<\/b> <i>\u0418\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 SQL<\/i><br \/>  <b>3.<\/b> <i>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/i><br \/>  <b>4.<\/b> <i>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 XML \u0444\u0430\u0439\u043b\u0430.<\/i><br \/>  \u0421\u0430\u043c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/VitaminPSG\/OpenStreetMap\/\">github.com<\/a> \u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435!)  <\/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-200902","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/200902","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=200902"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/200902\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}