I want to download 17,613 tiles from a shapefile that has links to download each DEM.
What would be the best way to do this?
I want to download 17,613 tiles from a shapefile that has links to download each DEM.
What would be the best way to do this?
My solution requires a little Python knowledge, so if you're comfortable with coding this problem becomes much easier to solve. There are several ways of achieving the same thing, with different packages, so I will offer stepwise instructions of what you can try rather than specific code, and you can experiment with packages you're comfortable with.
Export the attribute table of the shapefile to a csv or some other text file format you can easily access in Python.
In a Python script, read in the new file you've created, probably with something like Pandas, and extract the column of download links as a list.
Loop over each download link in the list and use one of Python's built-in libraries such as urrlib or requests to download each DEM to a directory in an automated fashion.
In terms of compression, I guess you will have to check and see if the DEMs are already in a compressed format or not. Try downloading just one and use QGIS layer properties to see if it has compression applied. If it doesn't have compression applied, you can use GDAL to apply a compression to each file after it downloads, which will shrink the file size. If it already has compression applied, you might be out of luck on the file size.