[R-sig-Geo] Point pattern analysis | Kernel estimation and GoogleMaps

Torleif Markussen Lunde Torleif.Lunde at cih.uib.no
Sat Feb 28 19:20:47 CET 2009


If I understand your question correctly
Something like this? Note that the longleaf data are "wrong" in this case since coordinates were recorded in meters.
 
require(sp)
require(spatstat)
data(longleaf)
 
a <- with(longleaf, data.frame(cbind(x, y, marks)))
coordinates(a) <- ~x+y
#Original projection
my.proj <- CRS("+proj=lonlat +datum=WGS84")
proj4string(a) <- my.proj
bbox(a)
str(a)
 
Later on you can use spTransform. Please correct me if I am wrong.
 
Best wishes, and good luck
Torleif
 
 

________________________________

Fra: r-sig-geo-bounces at stat.math.ethz.ch på vegne av Michel Barbosa
Sendt: lø 28.02.2009 16:56
Til: R-sig-geo
Emne: [R-sig-Geo] Point pattern analysis | Kernel estimation and GoogleMaps



Dear list,

I'm having troubles with matching the Google Map's bounding box with the
window of plot.ppp (spatstat). My coordinates are in longitude / latitude.
Ultimately, I'd like to have the bounding box of my Google Maps map to be
equal to the rectangle (window) in R. I've seen suggestions that UTM would
be a better way to go. Could you provide me with tips / ideas to tackle this
problem? My intent is to have the Kernel Estimation png overlayed on my
Google Maps map.

Kind regards,

Michel

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list