Re: [R-sig-Geo] Error: identicalCRS(x, y) is not TRUE after using the over() command

2014-10-27 Thread Jon Skoien
Hi Angel, We cannot reproduce your problem as we dont have access to your files, but it seems only one of the objects in your over-command is projected (border). Probably it will work better if you set proj4string also for pts1. Cheers, Jon On 10/24/2014 5:12 PM, Angel Ferrero wrote:

[R-sig-Geo] Calculate the length of hail paths

2014-10-27 Thread St John Brown
Hello, I am trying to calculate the the length of the trajectory of historic hail storms in the United States. I have written the R code to do this but my results do not seem valid. The majority of my results are around 14 meters which does not seem correct. My data comes from the NOAA in the

Re: [R-sig-Geo] Generate a vector of names of intersecting polgons

2014-10-27 Thread Robert J. Hijmans
Steven, I believe you can use something like the below library(raster) # example data (p, d) p - shapefile(system.file(external/lux.shp, package=raster)) r - raster(p) values(r) - 1:ncell(r) d - as(r, 'SpatialPolygonsDataFrame') # approach 1 x - intersect(p, d) # approach 2 y - union(p,d) y -