简体   繁体   English

无法使用边界框获取谷歌卫星图像

[英]cannot get the google satelite image with a bounding box

I want to extract google satellite images in r. 我想在r中提取谷歌卫星图像。

I actually manage to get my image using the coordinates but not with the bounding bx 我实际上设法使用坐标获取我的图像,但不使用边界bx

first you need to get a google api key and register it then 首先,你需要获得一个谷歌API密钥并注册它

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) 它似乎返回一个ggmap但不是谷歌,它不能用ggmap(GE)查看

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. 好的,Camille是对的,它不是get_googlemap的选项,但是当看到包装函数get_map的插图时,这不是直截了当的。

I found this post ggmap extended zoom or boundaries that shows how to handle the boundaries and zoom with google image. 我发现这个帖子ggmap扩展缩放或边界 ,显示如何处理边界和使用谷歌图像缩放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM