{"id":258772,"date":"2015-06-05T21:13:02","date_gmt":"2015-06-05T17:13:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258772"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258772","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenStreetMap Nominatim \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b \u043f\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443"},"content":{"rendered":"<p>             <img decoding=\"async\" src=\"http:\/\/cs624728.vk.me\/v624728285\/340b4\/BIU9pRjGVrs.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0425\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0432\u0435\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u0435\u043e\u043a\u043e\u0434\u0435\u0440\u0430 Nominatim \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0439\u043c\u0451\u0442 \u0443 \u043c\u0435\u043d\u044f \u043e\u043a\u043e\u043b\u043e 5-7 \u0447\u0430\u0441\u043e\u0432, \u043d\u043e \u043d\u0435 \u0442\u0443\u0442 \u0442\u043e \u0431\u044b\u043b\u043e\u2026 \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f Nominatim \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430. \u041d\u043e \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0433\u0435\u043e\u043a\u043e\u0434\u0435\u0440\u0430\u043c\u0438, \u043d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0434\u0435\u0441\u044c \u0438\u0445 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443: <a href=\"http:\/\/habrahabr.ru\/post\/31424\/\">\u00abGeocoding with PHP and the Google Maps API\u00bb<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/154581\/\">\u00ab\u042f\u043d\u0434\u0435\u043a\u0441 \u041a\u0430\u0440\u0442\u044b: \u041f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\u00bb<\/a>.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435: <b>Geocoding<\/b> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b \u043f\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443.<br \/>  \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 Nominatim, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OSM \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0438 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<h4>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h4>\n<p>  \u0421\u0430\u0439\u0442 \u0441 \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: <a href=\"http:\/\/nominatim.openstreetmap.org\/\">OpenStreetMap Nominatim<\/a><br \/>  \u0410 \u0432\u043e\u0442 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: <a href=\"http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim\">Wiki nominatim<\/a><br \/>  \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Nominatim <a href=\"http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim\/Installation\">Installation<\/a>. \u041d\u043e \u044d\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430, \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0430\u043d\u0446\u0435\u0432\u0430\u0442\u044c \u0441 \u0431\u0443\u0431\u043d\u043e\u043c. \u0412\u0441\u0451 \u043d\u0438\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435, \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u0431\u0443\u0431\u043d\u0430.<br \/>  \u0410 \u0442\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u043a\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <a href=\"https:\/\/registry.hub.docker.com\/u\/nicopace\/nominatim-docker\/\">nominatim docker<\/a>. \u041f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0437-\u0437\u0430 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0438 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f.<\/p>\n<h4>\u0428\u0430\u0433 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b<\/h4>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u0438\u0437 \u043e\u0431\u043b\u0430\u043a\u0430 Microsoft Azure \u0441\u0435\u0440\u0438\u0438 standart D2 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438: 2 cores, 7 GB RAM, 100 GB SSD. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Nominatim. 100GB \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u0430\u0440\u0442\u0430 \u0423\u043a\u0440\u0430\u0438\u043d\u044b \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 70%.<\/p>\n<h4>\u0428\u0430\u0433 2: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/h4>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo apt-get update sudo apt-get -y install wget sudo apt-get -y install build-essential automake sudo apt-get -y install libxml2-dev sudo apt-get -y install libgeos-dev sudo apt-get -y install libpq-dev sudo apt-get -y install libbz2-dev sudo apt-get -y install libtool libproj-dev sudo apt-get -y install libgeos++-dev sudo apt-get -y install gcc proj-bin libgeos-c1 git osmosis sudo apt-get -y install php5 php-pear php5-pgsql php5-json sudo apt-get -y install bc sudo apt-get -y install postgresql-9.4 postgresql-9.4-postgis-2.1 postgresql-contrib-9.4 postgresql-server-dev-9.4 sudo apt-get -y install libboost-chrono1.55-dev libboost-thread1.55-dev libboost-filesystem1.55-dev sudo apt-get -y install python-software-properties && add-apt-repository -y ppa:kakrueger\/openstreetmap && apt-get update && apt-get --no-install-recommends install -y osm2pgsql <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0428\u0430\u0433 3: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h4>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo -i pear install DB sudo -u username sudo mkdir -p \/app\/nominatim sudo -i useradd -m -p password1234 -d \/app\/nominatim nominatim chown nominatim: \/app\/nominatim cd \/app\/nominatim wget http:\/\/www.nominatim.org\/release\/Nominatim-2.4.0.tar.bz2 tar xvf Nominatim-2.4.0.tar.bz2 rm Nominatim-2.4.0.tar.bz2 mv Nominatim-2.4.0\/* . rm Nominatim-2.4.0\/ sudo -u nominatim .\/autogen.sh .\/configure && make <\/code><\/pre>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0432 \u044d\u0442\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c <i>chmod -R 755 \/app<\/i>. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <i>make<\/i>. \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u044d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <i>sudo make clean<\/i>, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0436\u0435 <i>.\/configure &#038;&#038; make<\/i>.<\/p>\n<h4>\u0428\u0430\u0433 4: PostgreSQL<\/h4>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, postgres \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0435 \u0434\u043b\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0441\u043e\u0432\u0435\u0442\u044b \u043e\u0442 wiki \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 nominatim:   <\/p>\n<blockquote><p>Ubuntu location \/etc\/postgresql\/9.x\/main\/postgresql.conf<br \/>  CentOS location \/var\/lib\/pgsql\/data\/postgresql.conf<\/p>\n<p>  shared_buffers (4GB)<br \/>  maintenance_work_mem (10GB)<br \/>  work_mem (50MB)<br \/>  effective_cache_size (24GB)<br \/>  synchronous_commit = off<br \/>  checkpoint_segments = 100<br \/>  checkpoint_timeout = 10min<br \/>  checkpoint_completion_target = 0.9<br \/>  The numbers in brackets behind some parameters seem to work fine for 32GB RAM machine  <\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo passwd postgres sudo usermod -a -G sudo postgres service postgresql start && pg_dropcluster --stop 9.4 main service postgresql start && pg_createcluster --start -e UTF-8 9.4 main  service postgresql start && sudo -u postgres psql postgres -tAc &quot;SELECT 1 FROM pg_roles WHERE rolname='nominatim'&quot; | grep -q 1 || sudo -u postgres createuser -s nominatim && sudo -u postgres psql postgres -tAc &quot;SELECT 1 FROM pg_roles WHERE rolname='www-data'&quot; | grep -q 1 || sudo -u postgres createuser -SDR www-data && sudo -u postgres psql postgres -c &quot;DROP DATABASE IF EXISTS nominatim&quot; <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0445\u0430\u0440\u0434\u043a\u043e\u0440, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u0418 \u043f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<h4>\u0428\u0430\u0433 5: \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 osm \u043a\u0430\u0440\u0442<\/h4>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u043a\u0430\u0440\u0442\u0443 \u0438\u0437 \u0441\u0430\u0439\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 *.pbf: <a href=\"http:\/\/download.geofabrik.de\/\">OpenStreetMap Data Extracts<\/a>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e \u043a\u0430\u0440\u0442\u0443 \u0423\u043a\u0440\u0430\u0438\u043d\u044b \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u044e \u0432 data.pbf.<\/p>\n<pre><code class=\"bash\">wget --output-document=data.pbf http:\/\/download.geofabrik.de\/europe\/ukraine-latest.osm.pbf chown nominatim: data.pbf touch local.php \/app\/nominatim\/settings\/local.php nano \/app\/nominatim\/settings\/local.php <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 nominatim. \u0412 \u0444\u0430\u0439\u043b local.php \u043d\u0443\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0438\u0436\u0435. <\/p>\n<pre><code class=\"php\">&lt;?php    \/\/ Paths    @define('CONST_Postgresql_Version', '9.4');    @define('CONST_Postgis_Version', '2.1');        \/\/ Website settings    @define('CONST_Website_BaseURL', 'http:\/\/geocoder.cloudapp.net\/'); ?&gt; <\/code><\/pre>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 BaseURL \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d nominatim.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 nominatim. \u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0430\u043a\u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043a\u0430\u0440\u0442\u043e\u0439 \u0423\u043a\u0440\u0430\u0438\u043d\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u043b\u0438\u043b\u0430\u0441\u044c \u043e\u043a\u043e\u043b\u043e 7 \u0447\u0430\u0441\u043e\u0432. \u0412 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0447\u0435\u0440\u0435\u0437 ssh, \u0438 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <a href=\"http:\/\/help.ubuntu.ru\/wiki\/screen\">\u0441\u043a\u0440\u0438\u043d\u0435<\/a>.<\/p>\n<pre><code class=\"bash\">screen service postgresql start && sudo -u nominatim -- .\/utils\/setup.php --osm-file \/app\/nominatim\/data.pbf --all --threads 2 2&gt;&1; sudo -u nominatim -- .\/utils\/setup.php --index --create-search-indices <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0441\u043a\u0440\u0438\u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 Ctrl+A \u0437\u0430\u0442\u0435\u043c Ctrl+D. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <i>screen -r<\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0441\u043a\u0440\u0438\u043d. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0430\u0439\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"bash\">.\/utils\/setup.php --create-website \/var\/www\/html rm \/var\/www\/html\/index.html \/etc\/init.d\/apache2 restart <\/code><\/pre>\n<p>  \u042f \u043e\u0431\u043e\u0448\u0435\u043b\u0441\u044f \u0431\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 apache \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 nginx, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431 \u044d\u0442\u043e\u043c \u0432\u044b \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445. \u0414\u0430 \u0438 \u0431\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0430\u0439\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h4>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u0439\u0442<\/h4>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435, \u043a\u0430\u043a \u043d\u0430 \u043c\u043e\u0451\u043c \u0441\u043a\u0440\u0438\u043d\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cs624728.vk.me\/v624728285\/34110\/80A1GvjFx6M.jpg\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 api, \u0441\u0434\u0435\u043b\u0430\u0432 \u0437\u0430\u043f\u0440\u043e\u0441:<br \/>  <a href=\"http:\/\/geocoder.cloudapp.net\/?format=json&amp;addressdetails=1&amp;q=Odessa&amp;format=json&amp;limit=1\">http:\/\/geocoder.cloudapp.net\/?format=json&#038;addressdetails=1&#038;q=Odessa&#038;format=json&#038;limit=1<\/a><br \/>  Response:<\/p>\n<pre><code class=\"javascript\">[{&quot;place_id&quot;:&quot;1145869&quot;,&quot;licence&quot;:&quot;Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\\\/\\\/www.openstreetmap.org\\\/copyright&quot;,&quot;osm_type&quot;:&quot;relation&quot;,&quot;osm_id&quot;:&quot;1413934&quot;,&quot;boundingbox&quot;:[&quot;46.342707&quot;,&quot;46.6291187&quot;,&quot;30.6114013&quot;,&quot;30.8313753&quot;],&quot;lat&quot;:&quot;46.4858883&quot;,&quot;lon&quot;:&quot;30.68365101101&quot;,&quot;display_name&quot;:&quot;\u041e\u0434\u0435\u0441\u0441\u0430, \u041e\u0434\u0435\u0441\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u0423\u043a\u0440\u0430\u0438\u043d\u0430&quot;,&quot;class&quot;:&quot;place&quot;,&quot;type&quot;:&quot;city&quot;,&quot;importance&quot;:0.45,&quot;icon&quot;:&quot;http:\\\/\\\/geocoder.cloudapp.net\\\/images\\\/mapicons\\\/poi_place_city.p.20.png&quot;,&quot;address&quot;:{&quot;city&quot;:&quot;\u041e\u0434\u0435\u0441\u0441\u0430&quot;,&quot;county&quot;:&quot;\u041e\u0434\u0435\u0441\u0441\u0430&quot;,&quot;state&quot;:&quot;\u041e\u0434\u0435\u0441\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c&quot;,&quot;country&quot;:&quot;\u0423\u043a\u0440\u0430\u0438\u043d\u0430&quot;,&quot;country_code&quot;:&quot;ua&quot;}}] <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0440\u0442\u044b \u0417\u0435\u043c\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e \u043c\u043e\u0449\u043d\u0435\u0435, \u0447\u0435\u043c \u0441\u0435\u0440\u0438\u044f D2, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 *\u043d\u0435\u0434\u0435\u043b\u044e \u0436\u0434\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043e \u0441\u0435\u0440\u0438\u0438 D14 (16 \u044f\u0434\u0435\u0440, 112 \u0413\u0411 \u043f\u0430\u043c\u044f\u0442\u0438). \u0410 \u0432\u043e\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434\u0443\u0435\u0442: \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0423\u043a\u0440\u0430\u0438\u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 300\u043c\u0441.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 Nominatim \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e. \u041c\u043e\u0436\u0435\u0442 \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u044f\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0438\u0437 \u0445\u0430\u0431\u0440\u043e\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0441 Nominatim, \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0434\u0435\u0438 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435, \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0434 \u043f\u043e\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f.             <\/p>\n<div class=\"clear\"><\/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\/259667\/\"> http:\/\/habrahabr.ru\/post\/259667\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             <img decoding=\"async\" src=\"http:\/\/cs624728.vk.me\/v624728285\/340b4\/BIU9pRjGVrs.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0425\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0432\u0435\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u0435\u043e\u043a\u043e\u0434\u0435\u0440\u0430 Nominatim \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0439\u043c\u0451\u0442 \u0443 \u043c\u0435\u043d\u044f \u043e\u043a\u043e\u043b\u043e 5-7 \u0447\u0430\u0441\u043e\u0432, \u043d\u043e \u043d\u0435 \u0442\u0443\u0442 \u0442\u043e \u0431\u044b\u043b\u043e\u2026 \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f Nominatim \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430. \u041d\u043e \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.  <\/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-258772","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258772","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=258772"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258772\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}