-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
233bcef
commit ddad548
Showing
20 changed files
with
124 additions
and
149 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 @@ | ||
NT27SE_50CM_DSM_PHASE5.tif |
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,38 @@ | ||
## code to prepare `holyroodpark` dataset goes here | ||
|
||
# Data from https://remotesensingdata.gov.scot/ | ||
# Scotland Lidar Phase 5 DSM NT27SE | ||
# License: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/ | ||
|
||
|
||
library(terra) | ||
r <- rast("data-raw/dems/NT27SE_50CM_DSM_PHASE5.tif") | ||
|
||
# Cut to fit Holyrood Park | ||
hopark <- rast() | ||
|
||
ext(hopark) <- c(-3.178208, -3.142817, 55.939184, 55.95418) | ||
|
||
hopark <- project(hopark, terra::crs(r)) | ||
res(hopark) <- c(2.5, 2.5) | ||
|
||
final_rast <- terra::project(r, hopark) | ||
ncell(final_rast) | ||
names(final_rast) <- "elevation" | ||
plot(final_rast) | ||
# Extra clip | ||
xa <- 1000 | ||
xb <- 200 | ||
ya <- 300 | ||
yb <- 300 | ||
f2 <- as.vector(ext(final_rast)) | ||
f2_x <- f2 - c(xa, xb, ya, yb) | ||
|
||
xtraclip <- crop(final_rast, ext(f2_x)) | ||
plot(xtraclip) | ||
ncell(xtraclip) | ||
|
||
unlink("data-raw/holyroodpark.tif") | ||
unlink("vignettes/articles/holyroodpark.tif") | ||
writeRaster(final_rast, "data-raw/holyroodpark.tif") | ||
writeRaster(final_rast, "vignettes/articles/holyroodpark.tif") |
Binary file not shown.
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
Binary file added
BIN
+75.9 KB
vignettes/articles/OpenStreetMap/3ff88f2a659533f469cb56031b4fb4b2.tif
Binary file not shown.
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
Binary file added
BIN
+86.4 KB
vignettes/articles/OpenStreetMap/9f654eb084cc35bf3b45121bab5cc4ba.tif
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-301 KB
vignettes/articles/OpenStreetMap/b476e80163f3d56debe74eb23a2db84d.tif
Binary file not shown.
Binary file removed
BIN
-338 KB
vignettes/articles/OpenStreetMap/f3163ae294202a708cc764ee77b4c828.tif
Binary file not shown.
Oops, something went wrong.