I am looking for a way to automate the process of loading satellite imagery. The screenshot shows the type and format of the files that interest me when downloading (.ntf and 150 MB files).
I came across the following code from TheBioBucket , which looks promising, although the R XML package is deprecated.
require(XML) dir.create("D:/GIS_DataBase/DEM/") setwd("D:/GIS_DataBase/DEM/") doc <- htmlParse("http://www.viewfinderpanoramas.org/dem3.html#alps") urls <- paste0("http://www.viewfinderpanoramas.org", xpathSApply(doc,'//*/a[contains(@href,"/dem1/N4")]/@href')) names <- gsub(".*dem1/(\\w+\\.zip)", "\\1", urls) for (i in 1:length(urls)) download.file(urls[i], names[i])
Is there a good way to automate the process of loading .ntf files programmatically using R or Python?

source share