|
1 |
| -\name{baranja} |
2 |
| -\docType{data} |
3 |
| -\encoding{latin1} |
4 |
| -\alias{barxyz} |
5 |
| -\alias{bargrid} |
6 |
| -\alias{barstr} |
7 |
| -\title{Baranja hill case study} |
8 |
| -\description{Baranja hill is a 4 by 4 km large study area in the Baranja region, eastern Croatia (corresponds to a size of an aerial photograph). This data set has been extensively used to describe various DEM modelling and analysis steps (see \href{http://geomorphometry.org/book}{Hengl and Reuter, 2008}; Hengl et al., 2010; \doi{10.5194/hess-14-1153-2010}). Object \code{barxyz} contains 6370 precise observations of elevations (from field survey and digitized from the stereo images); \code{bargrid} contains \emph{observed} probabilities of streams (digitized from the 1:5000 topo map); \code{barstr} contains 100 simulated stream networks (\code{"SpatialLines"}) using \code{barxyz} point data as input (see examples below).} |
9 |
| -\usage{data(bargrid)} |
10 |
| -\format{ |
11 |
| -The \code{bargrid} data frame (regular grid at 30 m intervals) contains the following columns: |
12 |
| - \describe{ |
13 |
| - \item{\code{p.obs}}{observed probability of stream (0-1)} |
14 |
| - \item{\code{x}}{a numeric vector; x-coordinate (m) in the MGI / Balkans zone 6 } |
15 |
| - \item{\code{y}}{a numeric vector; y-coordinate (m) in the MGI / Balkans zone 6 } |
16 |
| -} |
17 |
| -} |
18 |
| -\author{ Tomislav Hengl } |
19 |
| -\references{ |
20 |
| -\itemize{ |
21 |
| -\item Hengl, T., Reuter, H.I. (eds), (2008) \href{http://geomorphometry.org/book}{Geomorphometry: Concepts, Software, Applications}. Developments in Soil Science, vol. 33, Elsevier, 772 p. |
22 |
| -\item Hengl, T., Heuvelink, G. B. M., van Loon, E. E., (2010) On the uncertainty of stream networks derived from elevation data: the error propagation approach. Hydrology and Earth System Sciences, 14:1153-1165. \doi{10.5194/hess-14-1153-2010} |
23 |
| -\item \url{http://geomorphometry.org/content/baranja-hill} |
24 |
| -} |
25 |
| -} |
26 |
| -\note{Consider using the 30 m resolution grid (see \code{bargrid}) as the target resolution (output maps). |
27 |
| -} |
28 |
| -\examples{ |
29 |
| -library(sp) |
30 |
| -library(gstat) |
31 |
| -## sampled elevations: |
32 |
| -data(barxyz) |
33 |
| -prj = "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +units=m |
34 |
| -+towgs84=550.499,164.116,475.142,5.80967,2.07902,-11.62386,0.99999445824" |
35 |
| -coordinates(barxyz) <- ~x+y |
36 |
| -proj4string(barxyz) <- CRS(prj) |
37 |
| -## grids: |
38 |
| -data(bargrid) |
39 |
| -data(barstr) |
40 |
| -coordinates(bargrid) <- ~x+y |
41 |
| -gridded(bargrid) <- TRUE |
42 |
| -proj4string(bargrid) <- barxyz@proj4string |
43 |
| -bargrid@grid |
44 |
| -\dontrun{## Example with simulated streams: |
45 |
| -data(R_pal) |
46 |
| -library(rgdal) |
47 |
| -library(RSAGA) |
48 |
| -pnt = list("sp.points", barxyz, col="black", pch="+") |
49 |
| -spplot(bargrid[1], sp.layout=pnt, |
50 |
| - col.regions = R_pal[["blue_grey_red"]]) |
51 |
| -## Deriving stream networks using geostatistical simulations: |
52 |
| -Z.ovgm <- vgm(psill=1831, model="Mat", range=1051, nugget=0, kappa=1.2) |
53 |
| -sel <- runif(length(barxyz$Z))<.2 |
54 |
| -N.sim <- 5 |
55 |
| -## geostatistical simulations: |
56 |
| -DEM.sim <- krige(Z~1, barxyz[sel,], bargrid, model=Z.ovgm, nmax=20, |
57 |
| - nsim=N.sim, debug.level=-1) |
58 |
| -## Note: this operation can be time consuming |
59 |
| - |
60 |
| -stream.list <- list(rep(NA, N.sim)) |
61 |
| -## derive stream networks in SAGA GIS: |
62 |
| -for (i in 1:N.sim) { |
63 |
| - writeGDAL(DEM.sim[i], paste("DEM", i, ".sdat", sep=""), |
64 |
| - drivername = "SAGA", mvFlag = -99999) |
65 |
| - ## filter the spurious sinks: |
66 |
| - rsaga.fill.sinks(in.dem=paste("DEM", i, ".sgrd", sep=""), |
67 |
| - out.dem="DEMflt.sgrd", check.module.exists = FALSE) |
68 |
| - ## extract the channel network SAGA GIS: |
69 |
| - rsaga.geoprocessor(lib="ta_channels", module=0, |
70 |
| - param=list(ELEVATION="DEMflt.sgrd", |
71 |
| - CHNLNTWRK=paste("channels", i, ".sgrd", sep=""), |
72 |
| - CHNLROUTE="channel_route.sgrd", |
73 |
| - SHAPES="channels.shp", |
74 |
| - INIT_GRID="DEMflt.sgrd", |
75 |
| - DIV_CELLS=3, MINLEN=40), |
76 |
| - check.module.exists = FALSE, |
77 |
| - show.output.on.console=FALSE) |
78 |
| - stream.list[[i]] <- readOGR("channels.shp", "channels", |
79 |
| - verbose=FALSE) |
80 |
| - proj4string(stream.list[[i]]) <- barxyz@proj4string |
81 |
| -} |
82 |
| -# plot all derived streams at top of each other: |
83 |
| -streams.plot <- as.list(rep(NA, N.sim)) |
84 |
| -for(i in 1:N.sim){ |
85 |
| - streams.plot[[i]] <- list("sp.lines", stream.list[[i]]) |
86 |
| -} |
87 |
| -spplot(DEM.sim[1], col.regions=grey(seq(0.4,1,0.025)), scales=list(draw=T), |
88 |
| -sp.layout=streams.plot) |
89 |
| -} |
90 |
| -} |
91 |
| -\keyword{datasets} |
| 1 | +\name{baranja} |
| 2 | +\docType{data} |
| 3 | +\encoding{latin1} |
| 4 | +\alias{barxyz} |
| 5 | +\alias{bargrid} |
| 6 | +\alias{barstr} |
| 7 | +\title{Baranja hill case study} |
| 8 | +\description{Baranja hill is a 4 by 4 km large study area in the Baranja region, eastern Croatia (corresponds to a size of an aerial photograph). This data set has been extensively used to describe various DEM modelling and analysis steps (see \href{https://geomorphometry.org/geomorphometry-concepts-software-applications/}{Hengl and Reuter, 2008}; Hengl et al., 2010; \doi{10.5194/hess-14-1153-2010}). Object \code{barxyz} contains 6370 precise observations of elevations (from field survey and digitized from the stereo images); \code{bargrid} contains \emph{observed} probabilities of streams (digitized from the 1:5000 topo map); \code{barstr} contains 100 simulated stream networks (\code{"SpatialLines"}) using \code{barxyz} point data as input (see examples below).} |
| 9 | +\usage{data(bargrid)} |
| 10 | +\format{ |
| 11 | +The \code{bargrid} data frame (regular grid at 30 m intervals) contains the following columns: |
| 12 | + \describe{ |
| 13 | + \item{\code{p.obs}}{observed probability of stream (0-1)} |
| 14 | + \item{\code{x}}{a numeric vector; x-coordinate (m) in the MGI / Balkans zone 6 } |
| 15 | + \item{\code{y}}{a numeric vector; y-coordinate (m) in the MGI / Balkans zone 6 } |
| 16 | +} |
| 17 | +} |
| 18 | +\author{ Tomislav Hengl } |
| 19 | +\references{ |
| 20 | +\itemize{ |
| 21 | +\item Hengl, T., Reuter, H.I. (eds), (2008) \href{https://geomorphometry.org/geomorphometry-concepts-software-applications/}{Geomorphometry: Concepts, Software, Applications}. Developments in Soil Science, vol. 33, Elsevier, 772 p. |
| 22 | +\item Hengl, T., Heuvelink, G. B. M., van Loon, E. E., (2010) On the uncertainty of stream networks derived from elevation data: the error propagation approach. Hydrology and Earth System Sciences, 14:1153-1165. \doi{10.5194/hess-14-1153-2010} |
| 23 | +\item \url{https://geomorphometry.org/baranja-hill/} |
| 24 | +} |
| 25 | +} |
| 26 | +\note{Consider using the 30 m resolution grid (see \code{bargrid}) as the target resolution (output maps). |
| 27 | +} |
| 28 | +\examples{ |
| 29 | +library(sp) |
| 30 | +library(gstat) |
| 31 | +## sampled elevations: |
| 32 | +data(barxyz) |
| 33 | +prj = "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +units=m |
| 34 | ++towgs84=550.499,164.116,475.142,5.80967,2.07902,-11.62386,0.99999445824" |
| 35 | +coordinates(barxyz) <- ~x+y |
| 36 | +proj4string(barxyz) <- CRS(prj) |
| 37 | +## grids: |
| 38 | +data(bargrid) |
| 39 | +data(barstr) |
| 40 | +coordinates(bargrid) <- ~x+y |
| 41 | +gridded(bargrid) <- TRUE |
| 42 | +proj4string(bargrid) <- barxyz@proj4string |
| 43 | +bargrid@grid |
| 44 | +\dontrun{## Example with simulated streams: |
| 45 | +data(R_pal) |
| 46 | +library(rgdal) |
| 47 | +library(RSAGA) |
| 48 | +pnt = list("sp.points", barxyz, col="black", pch="+") |
| 49 | +spplot(bargrid[1], sp.layout=pnt, |
| 50 | + col.regions = R_pal[["blue_grey_red"]]) |
| 51 | +## Deriving stream networks using geostatistical simulations: |
| 52 | +Z.ovgm <- vgm(psill=1831, model="Mat", range=1051, nugget=0, kappa=1.2) |
| 53 | +sel <- runif(length(barxyz$Z))<.2 |
| 54 | +N.sim <- 5 |
| 55 | +## geostatistical simulations: |
| 56 | +DEM.sim <- krige(Z~1, barxyz[sel,], bargrid, model=Z.ovgm, nmax=20, |
| 57 | + nsim=N.sim, debug.level=-1) |
| 58 | +## Note: this operation can be time consuming |
| 59 | + |
| 60 | +stream.list <- list(rep(NA, N.sim)) |
| 61 | +## derive stream networks in SAGA GIS: |
| 62 | +for (i in 1:N.sim) { |
| 63 | + writeGDAL(DEM.sim[i], paste("DEM", i, ".sdat", sep=""), |
| 64 | + drivername = "SAGA", mvFlag = -99999) |
| 65 | + ## filter the spurious sinks: |
| 66 | + rsaga.fill.sinks(in.dem=paste("DEM", i, ".sgrd", sep=""), |
| 67 | + out.dem="DEMflt.sgrd", check.module.exists = FALSE) |
| 68 | + ## extract the channel network SAGA GIS: |
| 69 | + rsaga.geoprocessor(lib="ta_channels", module=0, |
| 70 | + param=list(ELEVATION="DEMflt.sgrd", |
| 71 | + CHNLNTWRK=paste("channels", i, ".sgrd", sep=""), |
| 72 | + CHNLROUTE="channel_route.sgrd", |
| 73 | + SHAPES="channels.shp", |
| 74 | + INIT_GRID="DEMflt.sgrd", |
| 75 | + DIV_CELLS=3, MINLEN=40), |
| 76 | + check.module.exists = FALSE, |
| 77 | + show.output.on.console=FALSE) |
| 78 | + stream.list[[i]] <- readOGR("channels.shp", "channels", |
| 79 | + verbose=FALSE) |
| 80 | + proj4string(stream.list[[i]]) <- barxyz@proj4string |
| 81 | +} |
| 82 | +# plot all derived streams at top of each other: |
| 83 | +streams.plot <- as.list(rep(NA, N.sim)) |
| 84 | +for(i in 1:N.sim){ |
| 85 | + streams.plot[[i]] <- list("sp.lines", stream.list[[i]]) |
| 86 | +} |
| 87 | +spplot(DEM.sim[1], col.regions=grey(seq(0.4,1,0.025)), scales=list(draw=T), |
| 88 | +sp.layout=streams.plot) |
| 89 | +} |
| 90 | +} |
| 91 | +\keyword{datasets} |
0 commit comments