{"id":1342,"date":"2022-10-21T08:26:01","date_gmt":"2022-10-21T08:26:01","guid":{"rendered":"https:\/\/www.kios.ucy.ac.cy\/aiders\/?page_id=1342"},"modified":"2022-10-26T14:14:27","modified_gmt":"2022-10-26T14:14:27","slug":"offline-maps","status":"publish","type":"page","link":"https:\/\/www.kios.ucy.ac.cy\/aiders\/offline-maps\/","title":{"rendered":"Offline Maps"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-21-11-27-07-1024x576.png\" alt=\"\" class=\"wp-image-1345\" srcset=\"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-21-11-27-07-1024x576.png 1024w, https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-21-11-27-07-300x169.png 300w, https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-21-11-27-07-768x432.png 768w, https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-21-11-27-07-1536x864.png 1536w, https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-21-11-27-07.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n<p>In AIDERS platform, it is possible to host your own OpenStreetMap PNG tile server locally on your machine. This allows you to deploy and run the 3D map environment in an offline-mode (does not need internet connection).<\/p>\n<p>For this to work, you have to download the map data for the region you want. All the data for each region (country or continent) can be downloaded from here: <a href=\"https:\/\/download.geofabrik.de\/\">https:\/\/download.geofabrik.de\/<\/a>.<\/p>\n<p>You will need to download two files in order to display the offline data for a region; The <kbd>*-latest.osm.pbf<\/kbd> (contains all the map data) and the <kbd>*.poly<\/kbd> file (contains the boundaries of the region). Instructions below explain step by step how to download and serve the map data for Cyprus. The steps however are the same for any other country or continent. Before moving on, make sure that the <a href=\"https:\/\/www.kios.ucy.ac.cy\/aiders\/aiders-ai-toolkit\/\">AIDERS platform is installed<\/a> on your machine.<\/p>\n<p><em><strong>Instructions:<\/strong><\/em><\/p>\n<ol>\n<li>Download the <kbd>cyprus-latest.osm.pbf<\/kbd> file <a href=\"https:\/\/download.geofabrik.de\/europe\/cyprus-latest.osm.pbf\">from here\u00a0<\/a> and put it on your Desktop folder<\/li>\n<li>Download the <kbd>cyprus.poly<\/kbd> file by clicking <a href=\"https:\/\/download.geofabrik.de\/europe\/cyprus.poly\">here<\/a> and then right click &gt; Save As ..\u00a0 \u00a0and put it on your Desktop folder with the name <kbd>cyprus.poly<\/kbd><\/li>\n<li>Note the paths for the files you just downloaded from <kbd>step 1<\/kbd> and <kbd>step 2<\/kbd><\/li>\n<li>Open a terminal on any directory and run the following command (remember to replace the paths with your own) to start the import process of the map data. The <kbd>import<\/kbd> process <strong><strong>requires an internet connection:<\/strong><\/strong>\n<ul>\n<li>Replace <kbd>\/absolute\/path\/to\/cyprus-latest.osm.pbf<\/kbd> with the path you noted on <kbd>step 1<\/kbd>.<\/li>\n<li>Replace <kbd>\/absolute\/path\/to\/cyprus.poly<\/kbd> with the path you noted on <kbd>step 2<\/kbd>.<\/li>\n<\/ul>\n<\/li>\n<li style=\"list-style-type: none;\">\n<pre class=\"wp-block-code\"><strong>time docker run -v <strong>\/absolute\/path\/to\/cyprus-latest.osm.pbf<\/strong>:\/data\/region.osm.pbf -v <strong>\/absolute\/path\/to\/cyprus.poly<\/strong>:\/data\/region.poly -v osm-data:\/data\/database\/\u00a0 overv\/openstreetmap-tile-server:2.2.0 import<\/strong><\/pre>\n<\/li>\n<li>After the <kbd>import<\/kbd> process is finished, you should see a new directory <kbd>osm-data<\/kbd> in your <kbd>aiders_installation_files<\/kbd> directory. This folder contains all of the map data for the region you&#8217;ve downloaded!<\/li>\n<li>You can now start the platform by executing: <kbd>.\/start_platform.sh --netip &lt;your_ip_here&gt; <\/kbd> (example: <kbd>.\/start_platform.sh --netip 192.168.5.2<\/kbd>).<\/li>\n<li>At this point, no internet connection is required anymore and the map data can be served offline. Further information about the tool that is used for the offline map functionality can be found here: <a href=\"_wp_link_placeholder\" data-wplink-edit=\"true\">https:\/\/github.com\/Overv\/openstreetmap-tile-server<\/a><\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>In AIDERS platform, it is possible to host your own OpenStreetMap PNG tile server locally on your machine. This allows you to deploy and run the 3D map environment in an offline-mode (does not need internet connection). For this to work, you have to download the map data for the region you want. All the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1342","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/pages\/1342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/comments?post=1342"}],"version-history":[{"count":29,"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/pages\/1342\/revisions"}],"predecessor-version":[{"id":1394,"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/pages\/1342\/revisions\/1394"}],"wp:attachment":[{"href":"https:\/\/www.kios.ucy.ac.cy\/aiders\/wp-json\/wp\/v2\/media?parent=1342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}