[R-sig-Geo] Crosstab fails on large rasters with block of NA values

2013-04-18 Thread Gaz D
Hi, I have recently ran into a problem with the 'crosstab' function, using R.3.0 on windows 7 64 bit. The raster package was downloaded with > install.packages('raster') yesterday (18/04/2013). I did not have the problem using earlier versions of R (2.15.2) and raster. When crosstabulating some

Re: [R-sig-Geo] Help with ENFA in R

2013-04-18 Thread Mathieu Basille
Jonathan, I think you are confusing many aspects here... The ENFA works on two objects: * a PCA, which provides the environmental data; * a vector, which provides the utilization distribution. 1) The PCA is build on the "data" slot of a SpatialPixelsDataFrame, which stores all environmental ra

Re: [R-sig-Geo] closest points between 2 polygons

2013-04-18 Thread Juan Tomas Sayago Gomez
Someone in this server suggested me to use this code too. A while ago. I just can't find the email This code finds the closer between two set of points. coords=coordinates(housing) housing$x1=coords[,2] housing$y1=coords[,1] summary(housing) DBout1810<-NULL date() for(i in 1:length(housing))

Re: [R-sig-Geo] Create a buffer around a series of Lat-Long pairs

2013-04-18 Thread Steven Ranney
Thanks Jim. You're right; that sounds much simpler and it makes much more sense. SR Steven H. Ranney On Thu, Apr 18, 2013 at 3:08 PM, Robert J. Hijmans wrote: > Steven, > > It would be much simpler to compute the distances between the two sets of > points and then ask if there are any that ar

Re: [R-sig-Geo] Create a buffer around a series of Lat-Long pairs

2013-04-18 Thread Robert J. Hijmans
Steven, It would be much simpler to compute the distances between the two sets of points and then ask if there are any that are less than your threshold. a <- cbind(c(1,5,55),c(3,7,20)) b <- cbind(c(4,2,8,65),c(50,-90,20,32)) library(raster) d <- pointDistance(a, b, longlat=TRUE) any(d < 200) R

[R-sig-Geo] Create a buffer around a series of Lat-Long pairs

2013-04-18 Thread Steven Ranney
I'm new to the world of spatial analyses in R. I've done some searching and reading around, but haven't found answer to my question. I may not be looking in the correct place. I have a series of references lat/long pairs (listA) that I'd like to import into R and have R create a 200m buffer arou

Re: [R-sig-Geo] make polygons transparent in plotKML

2013-04-18 Thread MacQueen, Don
Just a pointer to hopefully get you started: see ?col2rgb and look at the alpha parameter. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/18/13 9:03 AM, "Seth Bigelow" wrote: >Greetings: > > > >Could anyone advis

Re: [R-sig-Geo] How to calculate the latlng of a point in a certain distance away from another?

2013-04-18 Thread Ashton Shortridge
Hi Endri, I assumed your distances were in a planar coordinate system. "Distances" in decimal degrees don't really make sense, as decimal degrees are a spherical system and distances need to be calculated and handled differently. The results you got with: simCoords(p,500) [1] 125.7413 512.6246

Re: [R-sig-Geo] How to calculate the latlng of a point in a certain distance away from another?

2013-04-18 Thread Endri Raco
Thanx Ashton, Experimenting on a starting point from Google maps p<-c(41.32217,19.802721) > simCoords(p,500)[1] 125.7413 512.6246. I suppose these are in radians and need to be converted? using > distances <- c(0., 0.02725136, 1.07634471, 1.15963225,+ >1.71421571,

Re: [R-sig-Geo] How to calculate the latlng of a point in a certain distance away from another?

2013-04-18 Thread Ashton Shortridge
Dear Endri, do you simply wish to simulate coordinates for these locations? Because, assuming you are working on a planar system and those distances are euclidean, each of those distances is a radius for an infinite number of locations on a circle around your bus stop. Code like this might th

Re: [R-sig-Geo] (no subject)

2013-04-18 Thread Endri Raco
Hi Roman, This distances reflect the distance of points (which coordinates I need to calculate) from the starting point (bus stop). They represent bus travel distance in different moments of time from a selected bus stop.I saw the package* "geosphere"* has some of needed functions like *destPointRh

Re: [R-sig-Geo] (no subject)

2013-04-18 Thread Roman Luštrik
What do these distances reflect? How did you calculate the distances? Cheers, Roman On Thu, Apr 18, 2013 at 7:32 PM, Endri Raco wrote: > Hi group, > I am stacked in a problem like this. > I have a bus stop with known coordinates. > I generate in R language distances from this bus stop. Values

[R-sig-Geo] How to calculate the latlng of a point in a certain distance away from another?

2013-04-18 Thread Endri Raco
Hi group, I am stacked in a problem like this. I have a bus stop with known coordinates. I generate in R language distances from this bus stop. Values of these distances are like below (in km) 0. 0.02725136 1.07634471 1.15963225 1.71421571 2.54945626 4.29135102 4.53532958 4.5851271

[R-sig-Geo] (no subject)

2013-04-18 Thread Endri Raco
Hi group, I am stacked in a problem like this. I have a bus stop with known coordinates. I generate in R language distances from this bus stop. Values of these distances are like below (in km) 0. 0.02725136 1.07634471 1.15963225 1.71421571 2.54945626 4.29135102 4.53532958 4.5851271

Re: [R-sig-Geo] closest points between 2 polygons

2013-04-18 Thread Robert J. Hijmans
Pascal, For polygons with a longitude/latitude CRS only, I think the function below should work (based on Edzer's example and Bastien's suggestion to use dist2Line (which, by the way, also works for polygons)). dfun <- function(p1, p2) { p1 <- makePoly(p1) p2 <- makePoly(p2) asPts = function(x)

[R-sig-Geo] make polygons transparent in plotKML

2013-04-18 Thread Seth Bigelow
Greetings: Could anyone advise me how to make transparent polygons in plotKML? I am overlaying polygons in a SpatialPolygonsDataFrame object into Google Earth - Seems I can make the polygons any color (e.g., yellow - see example) except transparent plotKML(mySPDF, colour_scale ="#00")

[R-sig-Geo] driving distance between coordinates in minutes and miles

2013-04-18 Thread Abby Rudolph
Hello, Is there an R package that interacts with google maps in a way that it is able to calculate the distance in miles and minutes between a series of x and y coordinates by car and walking (4 total distance measures) as you would be able to do by manually plugging the coordinates into google

Re: [R-sig-Geo] warnings and errors from grass to R via spgrass6GG

2013-04-18 Thread Rainer M. Krug
rai...@krugs.de (Rainer M. Krug) writes: > Roger Bivand writes: > >> On Tue, 16 Apr 2013, Rainer M. Krug wrote: >> >>> Hi >>> >>> I am using spgrass6 with grass 7 and can report that it works so far >>> without problems. >>> >>> Nevertheless, I have one question, which I already had about grass 6

Re: [R-sig-Geo] closest points between 2 polygons

2013-04-18 Thread Bastien.Ferland-Raymond
Hello, I don't have a clear solution for your problem, but I'll try to give you ideas to where to look that may help you. If I understand well your problem, the difficulty comes from the fact that you have two POLYGONS and that you are looking for the COORDINATES. You could transform your pol