Dear Barry, Excuse me for not being accurate. My problem is this: I have data in WGS84 (longitude / latitude) data. I wish to perform a Kernel Density Estimation using spatstat. This produces a PNG file. I've succesfully used it with Cairo to produce a transparent PNG. Next, I want to overlay this PNG on my google maps using the Google Maps Api. Using the Ground Overlays technique. An example can be found on: http://code.google.com/intl/nl/apis/maps/documentation/examples/groundoverlay-simple.html
I've figured that the PNG that is generated with R can be overlayed on my google map. However, how can I generate a PNG that has the exact same coordinates / bounding box as my google map? This way, the generated Kernel Density Estimation PNG is displayed correctly with the pinpoints on top of it. My problem is in getting the window in plot.ppp correctly. My data is already in EPSG:432 (since I've Geocoded my dataset with the Google Geocoder API) if I'm correct. Please let me know if I need to clarify myself. Kind regards, Michel 2009/2/28 Barry Rowlingson <[email protected]> > 2009/2/28 Michel Barbosa <[email protected]>: > > 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. > > I've read this about ten times to try and figure out what you want to do! > > Do you want to generate a grid in R and overlay it on Google Maps, > using the Google Maps API? And then is the problem because of the axes > and labels on the png produced from the R graphics device? > > In which case you are probably better off using one of the functions > in the rgdal package to create a georeferenced raster file - that has > no axes or titles etc. > > Google Maps uses lat-long with the EPSG:4326 coordinate system, so if > your data is in lat-long with the EPSG:4326 coordinate system then you > don't need any transformation. > > Barry > [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
