Circular density estimate to a raster for mapping in GIS - help
Raphael: This sounds a bit like how one does skyview calculations with solar models -- same type of output. Can you simply have one raster layer per angle, and then stack all of them? The z-profile for each pixel would then be the probability as a function of the angle for that given pixel. --j
On Mon, Mar 3, 2014 at 9:47 AM, Rapha?l Lavoie <lavoie.raphael at gmail.com> wrote:
Hi all,
I created a circular density estimate using package "circular" from bearings
(directions) from 0 to 360? assuming a von Mises distribution.
#############
library(circular)
Bearing<-
c(186,197,158,206,206,185,186,224,183,173,175,240,201,197,
175,173,226,227,233,193,175,217,171,193,190,186,222,185,
208,194,230,184,223,183,190,229,228,234,187)
circular(Bearing, type=c("angles", "directions"), units=c("degrees"),
template=c("geographics"))
plot(Bear <- circular(Bearing, type=c("angles"), units=c("degrees"),
rotation = c("clock"), zero=1.570796), ticks=T, stack=T, bins=360,
xlim=c(-2,1), ylim=c(-2,1))
mle.vonmises(Bear, mu=NULL, kappa=NULL, bias=FALSE,
control.circular=list(units="degrees")) ## estimated (?SE)
x <- rvonmises(n=39, mu=199.2, kappa=7.351,
control.circular=list(units="degrees"))
res25 <- density(x, bw=25, control.circular=list(units="degrees"),
kernel="vonmises")
circularp(res25$x)
lines(res25, points.plot=F, xlim=c(-2,1))
#############
The output is probabilities that an object is going in a given direction
(destination) from a specific location (origin). More specifically, there is
a probability estimate for each direction (each 360 degree wedge).
I would then like to create raster (0.5 x 0.5?) from that circular
distribution with the center being the point of origin and the different
directions displaying the underlying probabilities that an object is going
in a direction (destination). Imagine a pie chart with 360 pie slices having
each a specific probability. I tried to use the "raster" package, but can't
figure out how to include the probability density to create the raster. Can
anyone help?
Thanks!
Raph
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Jonathan A. Greenberg, PhD Assistant Professor Global Environmental Analysis and Remote Sensing (GEARS) Laboratory Department of Geography and Geographic Information Science University of Illinois at Urbana-Champaign 259 Computing Applications Building, MC-150 605 East Springfield Avenue Champaign, IL 61820-6371 Phone: 217-300-1924 http://www.geog.illinois.edu/~jgrn/ AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007