Skip to content

Commit 8d817cd

Browse files
author
Tomislav Hengl
committed
fixes for CRAN
1 parent 0b94823 commit 8d817cd

File tree

5 files changed

+338
-338
lines changed

5 files changed

+338
-338
lines changed

DESCRIPTION

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
Package: plotKML
2-
Version: 0.8-1
3-
Date: 2021-04-12
4-
Title: Visualization of Spatial and Spatio-Temporal Objects in Google Earth
5-
Author: Tomislav Hengl [cre, aut], Andrea Gilardi [ctb], Pierre Roudier [ctb], Dylan Beaudette [ctb], Edzer Pebesma [ctb], Michael Blaschek [ctb]
6-
Authors@R: c(person("Tomislav", "Hengl", role = c("cre", "aut"),
7-
email = "tom.hengl@opengeohub.org"),
8-
person("Andrea", "Gilardi", role = "ctb"),
9-
person("Pierre", "Roudier", role = "ctb"),
10-
person("Dylan", "Beaudette", role = "ctb"),
11-
person("Edzer", "Pebesma", role = "ctb"),
12-
person("Michael", "Blaschek", role = "ctb"))
13-
Maintainer: Tomislav Hengl <tom.hengl@opengeohub.org>
14-
Depends: R (>= 3.5.0)
15-
Imports: methods, tools, utils, XML, landmap, sp, raster, rgdal, aqp, gstat, spacetime, colorspace, plotrix, dismo, pixmap, plyr, stringr, colorRamps, scales, zoo, RColorBrewer, RSAGA, classInt, sf, stars
16-
Suggests:
17-
adehabitatLT,
18-
maptools,
19-
fossil,
20-
rjson,
21-
animation,
22-
spatstat,
23-
spatstat.linnet,
24-
spatstat.geom,
25-
RCurl,
26-
rgbif,
27-
Hmisc,
28-
uuid,
29-
intervals,
30-
reshape,
31-
gdalUtils,
32-
snowfall,
33-
parallel,
34-
tinytex,
35-
testthat
36-
Description: Writes sp-class, spacetime-class, raster-class and similar spatial and spatio-temporal objects to KML following some basic cartographic rules.
37-
License: GPL
38-
URL: https://github.com/Envirometrix/plotKML
39-
LazyLoad: yes
1+
Package: plotKML
2+
Version: 0.8-2
3+
Date: 2021-10-06
4+
Title: Visualization of Spatial and Spatio-Temporal Objects in Google Earth
5+
Author: Tomislav Hengl [cre, aut], Andrea Gilardi [ctb], Pierre Roudier [ctb], Dylan Beaudette [ctb], Edzer Pebesma [ctb], Michael Blaschek [ctb]
6+
Authors@R: c(person("Tomislav", "Hengl", role = c("cre", "aut"),
7+
email = "tom.hengl@opengeohub.org"),
8+
person("Andrea", "Gilardi", role = "ctb"),
9+
person("Pierre", "Roudier", role = "ctb"),
10+
person("Dylan", "Beaudette", role = "ctb"),
11+
person("Edzer", "Pebesma", role = "ctb"),
12+
person("Michael", "Blaschek", role = "ctb"))
13+
Maintainer: Tomislav Hengl <tom.hengl@opengeohub.org>
14+
Depends: R (>= 3.5.0)
15+
Imports: methods, tools, utils, XML, landmap, sp, raster, rgdal, aqp, gstat, spacetime, colorspace, plotrix, dismo, pixmap, plyr, stringr, colorRamps, scales, zoo, RColorBrewer, RSAGA, classInt, sf, stars
16+
Suggests:
17+
adehabitatLT,
18+
maptools,
19+
fossil,
20+
rjson,
21+
animation,
22+
spatstat,
23+
spatstat.linnet,
24+
spatstat.geom,
25+
RCurl,
26+
rgbif,
27+
Hmisc,
28+
uuid,
29+
intervals,
30+
reshape,
31+
gdalUtils,
32+
snowfall,
33+
parallel,
34+
tinytex,
35+
testthat
36+
Description: Writes sp-class, spacetime-class, raster-class and similar spatial and spatio-temporal objects to KML following some basic cartographic rules.
37+
License: GPL
38+
URL: https://github.com/Envirometrix/plotKML
39+
LazyLoad: yes

man/baranja.Rd

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
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

Comments
 (0)