Description Usage Arguments Value Author(s) See Also Examples
as.kasc
converts a list of matrices of class asc
into a
data frame of class kasc
.
getkasc
converts one of the components of a data frame of class
kasc
into a matrix of class asc
.
image.kasc
displays a image of maps of
class kasc
.
1 2 3 4 5 6 7 8 9 |
l |
a list of objects of class |
x |
an object of class |
var |
for |
mar |
this parameter is passed as the parameter |
axes |
logical. If |
clfac |
an optional list of vectors of character strings. Each
element of the list is a vector corresponding to one factor in |
col |
a character vector. For numeric maps, the colors to be used |
mfrow |
A vector of the form |
... |
additional parameters to be passed to the generic
functions |
as.kasc
returns an object of class kasc
. The matrices
of class asc
are converted into vectors and coerced into a data
frame of class kasc
. This data frame has the following
attributes:
xll |
the x coordinate of the center of the lower left pixel of the map |
yll |
the y coordinate of the center of the lower left pixel of the map |
cellsize |
the size of a pixel on the studied map |
nrow |
the number of rows of the map. Caution ! the number of
rows of the raster map is the number of columns of the matrix of
class |
ncol |
the number of columns of the map. Caution ! the number of
columns of the raster map is the number of rows of the matrix of
class |
The different maps in the input list of objects of class asc
should describe the same area (same attributes: same cellsize
,
same xll
, same yll
, and same dimensions).
Clement Calenge clement.calenge@oncfs.gouv.fr
asc
for additionnal information on
objects of class asc
. image.kasc
and
explore.kasc
for graphical displays of objects of class
kasc
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | data(puechabon)
## kasc is a list of class kasc
(kasc <- puechabon$kasc)
## Stores two elements of the kasc in objects
## of class asc
(asp <- getkasc(kasc, "Aspect"))
(sl <- getkasc(kasc, "Slope"))
## Displays the slopes on the area (numeric)
image(sl, main = "Slope", xlab = "Lambert X", ylab = "Lambert Y")
## Aspect is a factor:
## cl is the list of color associated with the levels
## of asp
cl <- colasc(asp, NorthEast = "blue", SouthEast = "red",
SouthWest = "orange", NorthWest = "green")
image(asp, clfac = cl, main = "Aspect", xlab = "Lambert X",
ylab = "Lambert Y")
legend(706500, 3162000, legend=levels(asp), fill=cl, cex=0.7)
## Creation of a new kasc with elevation
## and slopes
cuicui <- as.kasc(list(Slope = sl, Aspect = asp))
## Displays the kasc object
## with random colors for aspect and grey levels for slopes
image(cuicui)
## with cm.colors for slopes (numeric)
## and cl for aspect (factor)
image(cuicui, col = cm.colors(256), clfac = list(Aspect = cl))
## plots only slope
image(cuicui, var = "Slope", main="Slope")
## similar to
image(cuicui, var = 1, main = "Slope")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.