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:
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
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 -