用矢量增强R中的线性图像分辨率

时间:2018-04-26 22:17:45

标签: r image-processing ggplot2 resolution ggmap

我正在使用谷歌在城市列表上迭代ggmap请求。使用styles参数,我删除除道路之外的所有元素。

请参阅下面的1280x1280图像输出。

City of Chengdu

图像的分辨率有限制(1280 x 1280),但我想以更高的分辨率(最好是4k x 4k)打印出城市。

鉴于图像实际上只是线条,是否有一种方法可以使用一组方向向量增强R中的锐度?

style <- c(c(feature = "administrative", visibility = "off"),
       c("&style=", feature = "all", element = "labels", visibility = "off"),
       c("&style=", feature = "road", color = "black"),
       c("&style=", feature = "landscape", color = "0xffffff"),
       c("&style=", feature = "water", color = "0xffffff"),
       c("&style=", feature = "poi", color = "0xffffff"),
       c("&style=", feature = "transit", color = "0xffffff"),
       c("&style=", feature = "transit.line", weight = "0"),
       c("&style=", feature = "transit.line", color = "black")
      )

ggmap(get_googlemap(center = "Chengdu", 
  zoom = 10, 
  source = "google", 
  maptype = "roadmap",
  #color = "bw",
  size = c(640, 640),
  format = "png8",
  messaging = FALSE,
  scale = 2,
  style = style),
  extent = "device")

0 个答案:

没有答案