Dear Torleif,

Thanks for your code example. In the case of the longleaf data, in which
coordinates where they recorded? In a non WGS84 right? My dataset has been
geocoded with the Google Geocoder API. It's in longitude / latitude. So no
need to transform into another projection, am I right?

What I want to do is create Google Maps map inside a certain webpage. I want
the Google Map to be centered at the user's current location. The Google map
contains the pinpoint of that user's current location. Surrounding this
user, there are nearby restaurants. I want to overlay a Kernel Density
Estimation PNG on top of the Google Map. I need the window of plot.ppp to be
in the same position/bounding box as my Google Maps. Or in other words, I
need the Kernel Density Estimation to match the exact locations of the
restaurants. Otherwise, it would distort the view.

My problem right now is that I'm able to create a PNG, but am stuck in
getting the window of the plot to be exactly the window + position of the
Google Map. For example,

http://code.google.com/intl/nl/apis/maps/documentation/examples/groundoverlay-simple.html

I want to overlay my PNG from the bottom left where the Google logo is, to
the top right above "New Jersey. So the PNG would overlay my entire Google
Map. This is what I'm trying to achieve. Hope you guys can help me out.

Kind regards,

Michel

2009/2/28 Torleif Markussen Lunde <Torleif.Lunde@cih.uib.no>

> 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@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@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>

	[[alternative HTML version deleted]]

