[R] dismo help

Hasan Diwan hasan.diwan at gmail.com
Sun Nov 27 20:39:49 CET 2011


savePngCentredAt <- function(address) {
  require(dismo)
  x <- geocode(address)
  range <- as.numeric(x[4:7]) + c(-0.01, 0.01, -0.01, 0.01)
  e <- extent(range)
  g <- gmap(e, type = "roadmap")
  require(digest)
  png(path.expand(paste('~/public_html/',digest(address,
algo='sha1'),'.png',sep='')))
  plot(g)
  dev.off()
}

The code above saves a PNG corresponding to a roadmap for given
address. How do I add a marker for the address given to the PNG? Many
thanks! -- H
-- 
Sent from my mobile device
Envoyait de mon portable



More information about the R-help mailing list