-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for downloading from GUGIK with rgugik package
- Loading branch information
1 parent
6efae68
commit 6088ec9
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
#' Title | ||
#' | ||
#' @param x - path to your shapefile | ||
#' @param y - integer of length 1 or 2, number of grid cells in x and y direction (columns, rows) | ||
#' | ||
#' @return | ||
#' @export | ||
#' | ||
#' @examples | ||
dem_download_big_area_rgugik=function(x,y){ | ||
aoi=sf::st_read(x) | ||
grid=sf::st_make_grid(aoi, n=y) | ||
aoi=sf::st_intersection(aoi,grid) | ||
plot(aoi) | ||
result=data_frame() | ||
for (i in 1:length(aoi$geometry)) { | ||
req_df=rgugik::DEM_request(aoi[i,]) | ||
result=dplyr::bind_rows(req_df, result) | ||
} | ||
return(result) | ||
print("This tools is based on https://github.com/kadyb/rgugik") | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.