0

I want to extract google satellite images in r.

I actually manage to get my image using the coordinates but not with the bounding bx

first you need to get a google api key and register it then

GE <- get_map(location = c(long =36.8595894, lat=-0.7688972) , 
    maptype = "satellite", zoom=18)
ggmap(GE)

This works

then i want to make a bounding box

box<-make_bbox(c(36.8594652,36.8597136),c(-0.7691144,-0.7686799 ) )
GE <- get_map(box , 
    maptype = "satellite", source="google",
    zoom=18)

This however does not return a satellite image, why?
it seems to return a ggmap but not from google and it is not viewable with ggmap(GE)

camille
  • 16,432
  • 18
  • 38
  • 60
  • 2
    So what does it return instead? Based on the docs for `get_googlemap`, it seems like Google requires a center and zoom, whereas Stamen can take a bounding box. – camille May 15 '19 at 17:26
  • @camille, thanks a lot, you are right... my issue is that i am extracting the images for many different place with different size, so basically i need to make my scale dependent on the image size... let me dig into this now... thanks a lot again – Catherine Pfeifer May 16 '19 at 08:54

1 Answers1

0

Ok, Camille is right, it is just not an option ind get_googlemap, this is however not straight forward when just looking at vignette of the wrapper function get_map.

I found this post ggmap extended zoom or boundaries that shows how to handle the boundaries and zoom with google image.