[R-sig-Geo] spacetime EOF implementation - interpretation question

2014-10-23 Thread Andrew Vitale
Hello, I'm performing an empirical orthogonal function analysis on sea level pressure using the spacetime package, and I'm having trouble determining which elements of the function output I should use to interpret the results. It seems that most examples in the literature calculate empirical orth

[R-sig-Geo] visualizing a 5D kernel density estimation

2014-10-23 Thread Ferra Xu
I have a question regarding kernel density estimation in R. I have a 5-dimensional data, which consists of (x,y,z) locations, time of happening and size of some events (for example earthquake). I wrote the following code in R in order to find the 5D kernel density estimation: library(ks) libra

Re: [R-sig-Geo] distance between centroids

2014-10-23 Thread Robert J. Hijmans
Alessandra, This is pretty straightforward but you need to do your part (show us what you have done) using a simple reproducible example. For example, you can use the North Carolina data that comes with spdep. That package also allows you to identify neighbors. library(spdep) library(raster) nc

Re: [R-sig-Geo] How to segment or split a spatial line in R

2014-10-23 Thread Robert J. Hijmans
I should add that you can use geosphere::midPoint if you wanted the great circle (longitude/latitude) mid-point instead of the Cartesian midpoint. But I now also see that you did not ask for splitting into pre-existing segments, but into new ones Edzer's solution seems appropriate for that...

Re: [R-sig-Geo] How to segment or split a spatial line in R

2014-10-23 Thread Robert J. Hijmans
I think the below is a solution: library(raster) # create some lines cds1 <- rbind(c(-180,-20), c(-140,55), c(10, 0), c(-140,-60)) cds2 <- rbind(c(-10,0), c(140,60), c(160,0), c(140,-55)) cds3 <- rbind(c(-125,0), c(0,60), c(40,5), c(15,-45)) lns <- SpatialLines(list(Lines(list(Line(cds1)), "1"),

Re: [R-sig-Geo] How to segment or split a spatial line in R

2014-10-23 Thread Edzer Pebesma
sp::spsample also offers regular sampling of points on SpatialLines objects. On 10/23/2014 05:21 PM, Mathieu Basille wrote: > May be a little bit far fetched, but maybe check 'redisltraj' from the > adehabitatLT package (and section 4.2.2 of the vignette [1]). Note that > it was intended for anima

Re: [R-sig-Geo] How to segment or split a spatial line in R

2014-10-23 Thread Mathieu Basille
May be a little bit far fetched, but maybe check 'redisltraj' from the adehabitatLT package (and section 4.2.2 of the vignette [1]). Note that it was intended for animal trajectories so might be a little bit out of scope for you. Mathieu. [1] http://cran.r-project.org/web/packages/adehabita

Re: [R-sig-Geo] How to segment or split a spatial line in R

2014-10-23 Thread Mathieu Rajerison
Hi, With spatstat, you can find the mid point of line segments http://lojze.lugos.si/~darja/software/r/library/spatstat/html/midpoints.psp.html But I don't know any package that would split your line into equal segments. One method would be to arrange equally spaced points along your line with s

[R-sig-Geo] How to segment or split a spatial line in R

2014-10-23 Thread Manuel Spínola
Dear list members, How to segment or split a spatial line in shorter equal segments, and also, how to get the mid point of ecah segment. Best, Manuel -- *Manuel Spínola, Ph.D.* Instituto Internacional en Conservación y Manejo de Vida Silvestre Universidad Nacional Apartado 1350-3000 Heredia CO

[R-sig-Geo] fattening certain portions of a city map in R with using projections

2014-10-23 Thread Anthony Damico
hi, i'm trying to map new york city and wondering if it's possible to pick a projection that will have an effect that brings the map a bit closer to the shapes seen in the nyc mta subway map ( http://i.stack.imgur.com/YT50F.jpg). the bonne and azimuthal projections on this page ( https://en.wikip

[R-sig-Geo] distance between centroids

2014-10-23 Thread Alessandra Carioli
Dear all, I am trying to compute the average distance between centroids and between neighbors, starting from a spatial polygon shape file. What I am doing is compute the average distance between all centroids and compute the average distance between neighbors for different regions in order to b

Re: [R-sig-Geo] Overlaying time designated spatial points from a data frame to match the time of a raster image in a rasterStack

2014-10-23 Thread Oscar Perpiñán Lamigueiro
Hi, > Works great Frede. Didn’t think that xyplot could just be overlaid > like this on a raster stack. Got carried away by the example Oscar has > in the rasterVis tutorial, where "sp. points" is used within a layer. With the latticeExtra::+.trellis function you can overlay trellis objects. You