An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110203/5579f2a1/attachment.pl>
RgoogleMaps
4 messages · Meesters, Erik, Tomislav Hengl, Robert J. Hijmans
Hi, I have been breaking my head with this problem some time ago and then I got it running some time ago. See p. 103-104 in [http://spatial-analyst.net/book/download?size=thumbnail] Here is an example of a Google Earth image imported into a GIS: [http://spatial-analyst.net/book/node/399] HTH T. Hengl [http://www.wewur.wur.nl/popups/vcard.aspx?id=HENGL001] PS: As far as I understand, we are not supposed to download data from Google's repository. Op 3-2-2011 16:44, Meesters, Erik schreef:
Dear all, I'm using the package RgoogleMaps to import google earth maps into R. The object that is retrieved with function GetMap contains a number of slots which I think can be used to translate the google picture into a geoTiff to for example import into ArgGis. If anyone would have an example of how to accomplish that or what function to use, I'd be very greatful. Best wishes, Erik Meesters Researcher Wageningen IMARES Dept. Ecosystems The Netherlands [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Dear all, I'm using the package RgoogleMaps to import google earth maps into R. The object that is retrieved with function GetMap contains a number of slots which I think can be used to translate the google picture into a geoTiff to for example import into ArgGis. If anyone would have an example of how to accomplish that or what function to use, I'd be very greatful. Best wishes, Erik Meesters
Here is how you can get a single tile
library(dismo)
library(maptools)
library(rgdal)
# get a google map
g <- gmap("Australia")
plot(g)
# overlay boundaries, after projecting to Mercator
data(wrld_simpl)
w = wrld_simpl[wrld_simpl at data[,"NAME"] != "Antarctica", ]
m = spTransform(w, projection(g, asText=F))
plot(m, add=T)
# export to png
filename <- 'oz.png'
png(filename, width=ncol(g), height=nrow(g))
par(mar=c(0,0,0,0))
image(g, col=g at legend@colortable)
dev.off()
# create 'world file' for georferencing png
r <- raster(filename)
extent(r) <- extent(g)
hdr(r, 'worldfile', 'pgw')
# now open the file in ArcMap
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/RgoogleMaps-tp5989261p5990287.html Sent from the R-sig-geo mailing list archive at Nabble.com.
Dear all, I'm using the package RgoogleMaps to import google earth maps into R. The object that is retrieved with function GetMap contains a number of slots which I think can be used to translate the google picture into a geoTiff to for example import into ArgGis. If anyone would have an example of how to accomplish that or what function to use, I'd be very greatful. Best wishes, Erik Meesters
Erik, it is is actually much simpler:
g <- gmap("Amsterdam, Netherlands", type='satellite', filename="adam.gif")
hdr(g, 'worldfile', 'gfw')
Now open "adam.gif" in ArcMap, but set the projection of the ArcGIS
"data.frame" to Mercator.
Robert
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/RgoogleMaps-tp5989261p5990349.html Sent from the R-sig-geo mailing list archive at Nabble.com.