{"id":804,"date":"2023-09-26T15:46:39","date_gmt":"2023-09-26T13:46:39","guid":{"rendered":"https:\/\/sigeo.cerege.fr\/?p=804"},"modified":"2023-09-26T15:46:39","modified_gmt":"2023-09-26T13:46:39","slug":"batch-download-tiles","status":"publish","type":"post","link":"https:\/\/sigeo.cerege.fr\/?p=804","title":{"rendered":"Batch download tiles"},"content":{"rendered":"\n<p>Imagine you need to download several tiles. Instead of interactive clicking you could save the list of tile names in a file and automatically download them with wget.<\/p>\n\n\n\n<p>For example, to download an area of LIDAR HD IGN, here is how to do:<\/p>\n\n\n\n<p>1- download the list of all tiles (&#8220;tableau d&#8217;assemblage&#8221;) in shapefile format<\/p>\n\n\n\n<p>2- open it on QGis, then draw a new shapefile containing your area. Select all tiles intersecting this area and export the attribute table of selection in CSV format. You obtain a file like this: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nom_pkk,url_telech<br>LHD_FXX_0945_6419_PTS_O_LAMB93_IGN69.copc.laz,https:\/\/storage.sbg.cloud.ovh.net\/v1\/AUTH_63234f509d6048bca3c9fd7928720ca1\/ppk-lidar\/QN\/LHD_FXX_0945_6419_PTS_O_LAMB93_IGN69.copc.laz<br>LHD_FXX_0953_6419_PTS_O_LAMB93_IGN69.copc.laz,https:\/\/storage.sbg.cloud.ovh.net\/v1\/AUTH_63234f509d6048bca3c9fd7928720ca1\/ppk-lidar\/QN\/LHD_FXX_0953_6419_PTS_O_LAMB93_IGN69.copc.laz<br>LHD_FXX_0959_6422_PTS_O_LAMB93_IGN69.copc.laz,https:\/\/storage.sbg.cloud.ovh.net\/v1\/AUTH_63234f509d6048bca3c9fd7928720ca1\/ppk-lidar\/QN\/LHD_FXX_0959_6422_PTS_O_LAMB93_IGN69.copc.laz<\/pre>\n\n\n\n<p>3- extract only the URLs from this file with awk<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>awk -F, '$2~\/https\/ {OFS=\",\";print $2}' input.csv > urls.csv<\/code><\/pre>\n\n\n\n<p>4- download all urls with wget<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -i urls.csv<\/code><\/pre>\n\n\n\n<p>This is it! Maybe one should add a verification step to be sure that all files are properly downloaded. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine you need to download several tiles. Instead of interactive clicking you could save the list of tile names in a file and automatically download them with wget. For example, to download an area of LIDAR HD IGN, here is how to do: 1- download the list of all tiles (&#8220;tableau d&#8217;assemblage&#8221;) in shapefile format &hellip; <a href=\"https:\/\/sigeo.cerege.fr\/?p=804\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Batch download tiles&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,1],"tags":[],"class_list":["post-804","post","type-post","status-publish","format-standard","hentry","category-donnees-ign-recherche-enseignement","category-sigeo"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=804"}],"version-history":[{"count":1,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts\/804\/revisions"}],"predecessor-version":[{"id":805,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts\/804\/revisions\/805"}],"wp:attachment":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}